From cd2973bf9d81ec992fee0ec04a148e6484dd71f8 Mon Sep 17 00:00:00 2001
From: zhang <zhang@9a6e40ed-f3a0-4838-9b4a-bf418f78e88d>
Date: Thu, 30 Jun 2011 16:42:31 +0000
Subject: [PATCH] 30/06/2011

Fix the bug to get correct chromaticites for the lattice with negative momentum compact factor.
---
 tracy/tracy/src/t2ring.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tracy/tracy/src/t2ring.cc b/tracy/tracy/src/t2ring.cc
index 142468e..ab13402 100644
--- a/tracy/tracy/src/t2ring.cc
+++ b/tracy/tracy/src/t2ring.cc
@@ -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])
-- 
GitLab