Skip to content
Snippets Groups Projects
Commit cd2973bf authored by zhang's avatar zhang
Browse files

30/06/2011

Fix the bug to get correct chromaticites for the lattice with negative momentum compact factor.
parent 3dfa8542
No related branches found
No related tags found
No related merge requests found
......@@ -478,6 +478,8 @@ void Cell_Twiss(long i0, long i1, ss_vect<tps> &Ascr, bool chroma, bool ring,
01/09/10 Modify the convergence criteria on relative diff of the chroma value
The previous test does not work well for non zero chromaticities
Test convergence changed if chroma closed to zero
28/06/11 Fix the bug for the lattice with negative momentum compact factor,
by changing expo += 1 to expo += log(5)/LOG10
****************************************************************************/
#define n 4
#define chromeps 1e-6 /* convergence condition for chromaticity computation */
......@@ -564,7 +566,7 @@ void Ring_Getchrom(double dP) {
fprintf(stdout, "expo % e nux = % e nuz = % e dPlocal= %+e\n",
expo, nu[0], nu[1], dP + 0.5 * dPlocal);
}
expo += 1.0;
expo += log(5)/LOG10;
if (trace)
fprintf(stdout, "%+e %+.12e %+.12e %+.12e %+.12e\n", dPlocal,
globval.Chrom[0], fabs(globval.Chrom[0] - Chrom[0])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment