[Go to BBS]
All articles in a thread
SubjectSAD Update V1.0.10.5a FFS$NumericalDerivative
Article No967
Date: 2011/10/11(Tue) 12:48:33
ContributorK. Oide
Dear Users,

1. A new Variable FFS$NumericalDerivative will be introduced: If FFS$NumericalDerivative=True, all calculations of response matrix in GO will be done numerically with finite difference. It is useful to reduce computing time when there are huge dependencies between elements defined by ElementValues. The default is FFS$NumericalDerivative=False which should be equal to what has been before this change. As the new routine may have issues, it needs time to be stabilized anyway.

SubjectRe: SAD Update V1.0.10.5a21 Min, Max, MinMax
Article No972
Date: 2011/11/05(Sat) 10:55:42
ContributorK. Oide
Dear Users,

1. A change has been made of functions Min, Max, MinMax not to cause an error when the arguments are not numerical, like as other math functions.

SubjectRe^2: SAD Update V1.0.10.5a21 Min, Max, MinMax
Article No973
Date: 2011/11/07(Mon) 15:37:09
ContributorAkio Morita
> Dear Users,
>
> 1. A change has been made of functions Min, Max, MinMax not to cause an error when the arguments are not numerical, like as other math functions.
>
これらの関数はComplex型を扱うことが出来ますが、複素数の順序に関して自然な定義が存在しないので、
数学的には何を返しても良いのかも知れませんが、以下の結果はあまり直感的とは言えないと思います

(*1) Min[Complex[+1,-1], Complex[-1,+1]] -> Complex[-1, -1]
(*2) Max[Complex[+1,-1], Complex[-1,+1]] -> Complex[+1, +INF]

(*1)のケースでは、Min[]の引数中に現れない元を返しています。
(*2)のケースでは、Max[]の引数中に現れない要素(INF)が含まれています、おそらく内部変数の初期化不良です。

自然な順序が存在しない集合へ拡張するなら、言語的には Sortの CanonicalOrderを用いた以下の定義(*3)の方が自然に思えます。
Min := First[Sort[Flatten[{##}]]]&
Max := Last[Sort[Flatten[{##}]]]&
あるいは、順序集合でないものを対象とした場合、値が存在しないので Nullを返すのも有りかもしれません。

現行の定義は、次のような直感的な定義と結果が整合しません
Min[arg1_] := arg1;
Min[arg1_, argv__] := If[arg1 < Min[argv], arg1, Min[argv]]
(*3)の定義は、Less演算子の順序を数学的な順序から CanonicalOrderへ拡張したものと整合します。

SubjectRe: SAD Update V1.0.10.5a30 Transfer matrix between normal coordinate.
Article No974
Date: 2011/11/23(Wed) 07:25:29
ContributorK. Oide
Dear Users,

1. The next version will display the one turn transfer matrix in the normal coordinate with EMIOUT EMIT. It is equivalent to R.M.R^-1 where R and M are the normal coordinate and the physical transfer matrix, respectively.

SubjectSAD Update V1.0.10.5a40 DISPLAY commands.
Article No975
Date: 2011/11/25(Fri) 09:22:20
ContributorK. Oide
Dear Users,

1. Now DISP commands shows the names of elements completely even if they are long. It also tries to keep the length of each line as far as possible.

SubjectRe: SAD Update V1.0.10.5a41 bug fix for DISPLAY commands.
Article No976
Date: 2011/12/01(Thu) 14:30:02
ContributorK. Oide
Dear Users,

1. A bug, introduced by the previous change, was found in the length of chars to used in DISP commands.

SubjectRe: SAD Update V1.0.10.5a50 Some error message in MAIN.
Article No977
Date: 2011/12/07(Wed) 07:49:37
ContributorK. Oide
Dear Users,

1. A few messages in the MAIN level have been changed to show the name of input element which caused the error.

SubjectRe: SAD Update V1.0.10.5a60 A bug in FFS.
Article No978
Date: 2011/12/07(Wed) 12:23:28
ContributorK. Oide
Dear Users,

1. A bug was found in FFS to miss the initialization of an internal table to identify Bz. It caused Seg Fault during geometry matching even there is no SOL elements.

SubjectRe: SAD Update V1.0.10.5.1a Crossing a difference resonance.
Article No979
Date: 2011/12/20(Tue) 15:52:45
ContributorK. Oide
Dear Users,

1. For an off-momentum matching of a ring, crossing a difference resonance line is added to the "Unstable" condition. Crossing a sum resonance has been treated as unstable for years, but now a difference resonance is also included.

SubjectRe: SAD Update V1.0.10.5.2a Fringe of K0 & SK0.
Article No980
Date: 2011/12/29(Thu) 18:06:52
ContributorK. Oide
Dear Users,

1. The fringe field of K0 and SK0 in MULT has been wrong both in tracking and EMIT/CALC, in different ways. Also BEND may have some problem when the incident vertical angle of the orbit is large.

SubjectRe^2: SAD Update V1.0.10.5.2a Fringe of K0 & SK0.
Article No981
Date: 2011/12/30(Fri) 10:07:18
ContributorK. Oide
Dear Users,

1. Actually the K0/SK0 fringe of MULT was not wrong in FFS/EMIT. There was a mistake in the tracking.

SubjectSAD Update V1.0.10.5a21 Fringe of MULT, etc.
Article No982
Date: 2012/01/07(Sat) 07:16:01
ContributorK. Oide
Dear Users,

1. The Maxwellian fringe of MULT is changed, The fringes of Kn and Skn have been applied alternatively, but they are now unified in a single transformation.

2. The message "???-FFS-Info-Different types of variables match ..." is suppressed to just once.

SubjectRe: SAD Update V1.0.10.5a22 Fringe of MULT, etc.
Article No983
Date: 2012/01/07(Sat) 09:28:38
ContributorK. Oide
Dear Users,

1. Also the fringes of Kn/SKn (n>2) is turned off in the tracking if

Abs(Kn + I SKn) * (0.005)^(n+1)/(n+1) < 0.005*EPS

For n <=2, it is on, depending on the flags DISFRIN and FRINGE.

SubjectRe: SAD Update V1.0.10.5.2a30 Accelerate LINE, etc.
Article No984
Date: 2012/01/09(Mon) 00:59:56
ContributorK. Oide
Dear Users,

1. The LINE function and element-value commands such as "QF 0.1" have been accelerated using cache.

SubjectRe: SAD Update V1.0.10.5.3a Output during matching.
Article No985
Date: 2012/01/12(Thu) 14:53:36
ContributorK. Oide
Dear Users,

1. According to responses at SAD School, the output during matching will be somewhat changed. Also messages like "closed orbit not found" will be less frequently shown.

SubjectRe^2: SAD Update V1.0.10.5.3a Output during matching.
Article No986
Date: 2012/01/13(Fri) 20:55:41
ContributorS.Kamada < >
このバージョン、今までと同じsad.confを使ったコンパイルで反応が少し違う。
正常に進行したように見えて、次の画面で止まり、terminalに戻らない。
http://db.tt/GLr0InMb
出来たモジュールは *** Welcome to SAD Ver.1.0.10.5.3a built at 2012-01-13 20:29:28 +0900 ***と表示するので、いけない事じゃないかも知れないが、何が違うのでしょうね?

SubjectRe: SAD Update V1.0.10.5.3a01 DynamicApertureSurvey
Article No987
Date: 2012/01/16(Mon) 09:08:49
ContributorK. Oide
Dear Users,

1. The internal logic of DynamicApertureSurvey(trackd.f) was somewhat simplified, hoping to be a little bit more efficient.

SubjectRe^2: SAD Update V1.0.10.5.3a01 DynamicApertureSurvey
Article No988
Date: 2012/01/16(Mon) 10:37:09
ContributorS.Kamada < >
SAD Ver.1.0.10.5.3a01においてbench2.sadを走らせると、以下のエラーメッセージが出て途中で止まります。
--------
Print[" \n******* Function Test CPU used = ",tf=TimeUsed[]-t0," sec\n"]);

];
ft=FunctionTest[];
ft@Test[];
{.10137299448251724,"Instance"}
{.05845999717712402,"D"}
{.06842601299285889,"Fit"}
{.054653018712997437,"Sort"}
???General::wrongtype: Argument must be List or composition for all args in Join[Legend,{"",""}]
???General::wrongtype: Argument must be List or composition for all args in Join[Legend,{"",""}]
???General::wrongtype: Argument must be Rule or List of rules in ({MaxBend,PlotPoints,PlotDivision,PlotJoined,StepRatio,Plot,
GridLines}/.{(DisplayFunction->),(Dashing->{1}),(PlotColor->"black"),(Legend->Legend->Legend->{"",""}),(DisplayFunction->Identity)
}/.{(MaxBend->.04),(PlotPoints->25),(PlotDivision->250),(PlotJoined->1),(StepRatio->1),(Plot->0),(GridLines->{Automatic,Automatic}
)})
???General::wrongtype: Argument must be Symbol, Symbol (:)= value, {Symbol1, ..} (:)= {Value1, ..} in Module[{({Plots`maxb,
Plots`minp,Plots`minx,pj,Plots`sr,Plots`pt,Plots`gr}=({MaxBend,PlotPoints,PlotDivision,PlotJoined,StepRatio,Plot,GridLines}
/.{(DisplayFunction->Null),(Dashing->{1}),(PlotColor->"black"),(Legend->Legend->Legend->{"",""}),(DisplayFunction->Identity)}
/.{(MaxBend->.04),(PlotPoints->25),(PlotDivision->250),(PlotJoined->1),(StepRatio->1),(Plot->0),(GridLines->{Automatic,Automatic})
}))},L ...
???General::wrongtype: Argument must be Rule or List of rules in ({MaxBend,PlotPoints,PlotDivision,PlotJoined,StepRatio,Plot,
GridLines}/.{(DisplayFunction->),(Dashing->{.75,.25}),(PlotColor->"red3"),(Legend->Legend->Legend->{"",""}),
(DisplayFunction->Identity)}/.{(MaxBend->.04),(PlotPoints->25),(PlotDivision->250),(PlotJoined->1),(StepRatio->1),(Plot->0),
(GridLines->{Automatic,Automatic})})
???General::wrongtype: Argument must be Symbol, Symbol (:)= value, {Symbol1, ..} (:)= {Value1, ..} in Module[{({Plots`maxb,
Plots`minp,Plots`minx,pj,Plots`sr,Plots`pt,Plots`gr}=({MaxBend,PlotPoints,PlotDivision,PlotJoined,StepRatio,Plot,GridLines}
/.{(DisplayFunction->Null),(Dashing->{.75,.25}),(PlotColor->"red3"),(Legend->Legend->Legend->{"",""}),(DisplayFunction->Identity)}
/.{(MaxBend->.04),(PlotPoints->25),(PlotDivision->250),(PlotJoined->1),(StepRatio->1),(Plot->0),(GridLines->{Automatic,Automatic})
} ...
???General::wrongtype: Argument must be Rule or List of rules in ({MaxBend,PlotPoints,PlotDivision,PlotJoined,StepRatio,Plot,
GridLines}/.{(DisplayFunction->),(Dashing->{1}),(PlotColor->"black"),(Legend->Legend->Legend->{"",""}),(DisplayFunction->Identity)
}/.{(MaxBend->.04),(PlotPoints->25),(PlotDivision->250),(PlotJoined->1),(StepRatio->1),(Plot->0),(GridLines->{Automatic,Automatic}
)})
???General::wrongtype: Argument must be Symbol, Symbol (:)= value, {Symbol1, ..} (:)= {Value1, ..} in Module[{({Plots`maxb,
Plots`minp,Plots`minx,pj,Plots`sr,Plots`pt,Plots`gr}=({MaxBend,PlotPoints,PlotDivision,PlotJoined,StepRatio,Plot,GridLines}
/.{(DisplayFunction->Null),(Dashing->{1}),(PlotColor->"black"),(Legend->Legend->Legend->{"",""}),(DisplayFunction->Identity)}
/.{(MaxBend->.04),(PlotPoints->25),(PlotDivision->250),(PlotJoined->1),(StepRatio->1),(Plot->0),(GridLines->{Automatic,Automatic})
}))},L ...
???General::wrongtype: Argument must be Rule or List of rules in ({MaxBend,PlotPoints,PlotDivision,PlotJoined,StepRatio,Plot,
GridLines}/.{(DisplayFunction->),(Dashing->{.75,.25}),(PlotColor->"red3"),(Legend->Legend->Legend->{"",""}),
(DisplayFunction->Identity)}/.{(MaxBend->.04),(PlotPoints->25),(PlotDivision->250),(PlotJoined->1),(StepRatio->1),(Plot->0),
(GridLines->{Automatic,Automatic})})
???General::wrongtype: Argument must be Symbol, Symbol (:)= value, {Symbol1, ..} (:)= {Value1, ..} in Module[{({Plots`maxb,
Plots`minp,Plots`minx,pj,Plots`sr,Plots`pt,Plots`gr}=({MaxBend,PlotPoints,PlotDivision,PlotJoined,StepRatio,Plot,GridLines}
/.{(DisplayFunction->Null),(Dashing->{.75,.25}),(PlotColor->"red3"),(Legend->Legend->Legend->{"",""}),(DisplayFunction->Identity)}
/.{(MaxBend->.04),(PlotPoints->25),(PlotDivision->250),(PlotJoined->1),(StepRatio->1),(Plot->0),(GridLines->{Automatic,Automatic})
} ...
???General::wrongtype: Argument must be List or composition for all args in Join[Legend,{"",""}]
???General::wrongtype: Further output of this message will be suppressed.
???General::abort: Aborted:
ft@Test[]

SubjectRe^3: SAD Update V1.0.10.5.3a01 DynamicApertureSurvey
Article No989
Date: 2012/01/16(Mon) 12:33:20
ContributorK. Oide
Dear Users,

1. A bug in Plots.n caused this error. It has been fixed.

SubjectRe^4: SAD Update V1.0.10.5.3a01 DynamicApertureSurvey
Article No990
Date: 2012/01/16(Mon) 14:01:46
ContributorS.Kamada < >
修正されたモジュールでは、No.986およびNo.988で報告した現象が、生じないことを確認しました。

SubjectRe: SAD Update V1.0.10.5.3a10 A bug in MULT
Article No991
Date: 2012/01/25(Wed) 09:21:10
ContributorK. Oide
Dear Users,

1. A bug was found in the tracking of MULT, only when (K1 + iSK1) <>0 and SK0 <>0 and BZ == 0. This bug has been there since more than 10 years ago. Along with fixing the bug, the related routines are somewhat simplified.

Subject SAD Update V1.0.10.5.5a FSHIFT, Bug in MULT.
Article No998
Date: 2012/02/19(Sun) 08:14:26
ContributorK. Oide
Dear Users,

1. There was a bug of tracking since 10.5.3a10 in MULT, when Bz == 0 && K1 <> 0. The calculation of z was wrong.

2. Calculation of z with FSHIFT is changed to handle more systematically and consistently between tracking , emit, optics.

SubjectSAD Update V1.0.10.5.4a VariableWeight
Article No992
Date: 2012/02/07(Tue) 05:58:48
ContributorK. Oide
Dear Users,

1. A new function VariableWeight has been introduced:

Usage: VariableWeight[element, keyword ,v_] := expression

where the default weight for matching with element:keyword is passed in v_, and
expression should return a modified value of weight. If non-real is returned,
the default weight is used.

Example: VariableWeight["QF","K1",v_]:= 0.1*v;

reduces the weight of QF1:K1 to 1/10 of the default value.

The weight also affects the step size of the numerical derivative
of the response. A smaller weight makes the step size larger.

VarableWeight only acts for variables used in the matching with the
FREE command.

2. The default weights for some keywords such as VOLT have been defined to be reasonable for usual cases.

SubjectSAD Update V1.0.10.5.4a01 Read
Article No993
Date: 2012/02/11(Sat) 06:29:53
ContributorK. Oide
Dear Users,

1. A routine for Read, tfwrite.f, has been modified to avoid an unwilling effect probably due to optimization of gfortran.

SubjectRe: SAD Update V1.0.10.5.4a01 Read
Article No995
Date: 2012/02/14(Tue) 19:18:09
ContributorAkio Morita
> Dear Users,
>
> 1. A routine for Read, tfwrite.f, has been modified to avoid an unwilling effect probably due to optimization of gfortran.
>
読み込み指示子が Stringの場合、Record終端まで読む込み、文字列を返すのが仕様ですが、退行しています

旧実装では、WordSeparatorsオプションの初期値が String指示子("")とそれ以外(" ,\t")で切り替えることで実現していたのが
オプション解析器を分離したことにより、String指示子での制御が効かなくなったためです

さらに、旧実装にも String指示子に加えて明示的に WordSeparatorsオプションを指定すると
Record終端まで読まないバグがあります

SubjectRe^2: SAD Update V1.0.10.5.4a01 Read
Article No996
Date: 2012/02/14(Tue) 21:20:34
ContributorK. Oide
> > Dear Users,
> >
> > 1. A routine for Read, tfwrite.f, has been modified to avoid an unwilling effect probably due to optimization of gfortran.
> >
> 読み込み指示子が Stringの場合、Record終端まで読む込み、文字列を返すのが仕様ですが、退行しています
>
> 旧実装では、WordSeparatorsオプションの初期値が String指示子("")とそれ以外(" ,\t")で切り替えることで実現していたのが
> オプション解析器を分離したことにより、String指示子での制御が効かなくなったためです
>
> さらに、旧実装にも String指示子に加えて明示的に WordSeparatorsオプションを指定すると
> Record終端まで読まないバグがあります

一応、1.0.10.5.4a11で対応したと思います。

SubjectRe^3: SAD Update V1.0.10.5.4a01 Read
Article No1000
Date: 2012/03/01(Thu) 11:47:39
ContributorAkio Morita
> > > Dear Users,
> > >
> > > 1. A routine for Read, tfwrite.f, has been modified to avoid an unwilling effect probably due to optimization of gfortran.
> > >
> > 読み込み指示子が Stringの場合、Record終端まで読む込み、文字列を返すのが仕様ですが、退行しています
> >
> > 旧実装では、WordSeparatorsオプションの初期値が String指示子("")とそれ以外(" ,\t")で切り替えることで実現していたのが
> > オプション解析器を分離したことにより、String指示子での制御が効かなくなったためです
> >
> > さらに、旧実装にも String指示子に加えて明示的に WordSeparatorsオプションを指定すると
> > Record終端まで読まないバグがあります
>
> 一応、1.0.10.5.4a11で対応したと思います。
>
tfwrite.fを調査中に読み込み指示子が、Expressionの場合の動作も旧実装と変化しているのを発見しました。

A. 旧来の実装の挙動
* Read[fp_Real, Expression] := Read[fp]
* Read[fp_Real, Expression, opt__] := Read[fp, Real, opt]

B. 1.0.10.5.4a11の挙動
* Read[fp_Real, Expression, opt___] := Read[fp]

C. SAD/Tkinterの使い方 13.1.2 Readの解説
* Read[fo_Real]
チャンネル fpから式を読み込み、それを評価した結果を返します。
この場合、一つの Recordで式が完結しない場合、完結するまで読み進みます。

* Real[fp_Real, Expression, opt___]
チャンネル fpから "1語"を読み込み、それを式として評価した"結果"を返します。

* Real[fp_Real, Real, opt___]
チャンネル fpから "1語"を読み込み、それを式として評価した"値"を返します。

状況をまとめると
* (B)の挙動は Real[fp_Real, Expression, opt__]のケースで (A)と異なる
したがって、内部実装の変更に止まらず、仕様変更になっている

* (A), (B)の挙動ともに (C)の解説と異なる
- (C)の解説では、Read[fp_Real, Expression, opt___]は、"1語"読み込みである(WordSeparatorsの影響を受ける)
- "式として評価した結果"と"式として評価した値"という表現上の違いを除けば、Real[fp_Real, Real, opt___]と同義を思われる
- 旧来の挙動(A)のうち Read[fp_Real, Expressiion, opt__]は、(C)の解説と一致している

SubjectRe: SAD Update V1.0.10.5.5a20 Bug in tracking with TWAKE
Article No1001
Date: 2012/03/04(Sun) 18:18:36
ContributorK. Oide
Dear Users,

1. A bug was found in tracking with TWAKE. The proper data for transverse wake was not used at a CAVI element when there were many different wakes defined by WakeFunction.

SubjectRe^2: SAD Update V1.0.10.5.5a20 Bug in tracking with TWAKE
Article No1002
Date: 2012/03/04(Sun) 18:49:25
ContributorK. Oide
> Dear Users,
>
> 1. A bug was found in tracking with TWAKE. The proper data for transverse wake was not used at a CAVI element when there were many different wakes defined by WakeFunction.

2. A "(FIXME)" was also corrected for EMIT with TRPT.

SubjectSAD Update V1.0.10.5.5a30 Bug in CSRTrack
Article No1006
Date: 2012/04/21(Sat) 10:14:08
ContributorK. Oide
Dear Users,

1. A bug was found in csrtrack.f, mistyping '*' by '**' to return wrong results of CSRTrack when Division is not equal to 1.