Skip to content

Commit

Permalink
Disable debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
lfarv committed Sep 11, 2023
1 parent 542cc44 commit cbecf0f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions atintegrators/driftkickrad.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define ZUT
#undef DPRINT
#undef NOP
/***********************************************************************
Note: in the US convention the transverse multipole field is written as:
Expand Down Expand Up @@ -143,18 +143,18 @@ the polynomial terms in PolynomB.
B2P = B2perp(ImSum, ReSum +irho, irho, x , xpr, y ,ypr);

dp_0 = r[4];
#ifdef ZUT
#ifdef DPRINT
double dr4 = SQR(1+r[4])*B2P*(1 + x*irho + (SQR(xpr)+SQR(ypr))/2 );
atPrintf("B2P: % 15.12g\t% 15.12g\t% 15.12g\t% 15.12g\n", x, xpr, B2P, dr4);
#endif
#endif /*DPRINT*/
#ifndef NOP
r[4] = r[4] - CRAD*SQR(1+r[4])*B2P*(1 + x*irho + (SQR(xpr)+SQR(ypr))/2 )*L;

/* recalculate momentums from angles after losing energy for radiation */
p_norm = 1/(1+r[4]);
r[1] = xpr/p_norm;
r[3] = ypr/p_norm;
#endif /*ZUT*/
#endif /*NOP*/

r[1] -= L*(ReSum-(dp_0-r[0]*irho)*irho);
r[3] += L*ImSum;
Expand Down Expand Up @@ -198,18 +198,18 @@ static void strthinkickrad(double* r, const double* A, const double* B, double L
B2P = StrB2perp(ImSum, ReSum , x , xpr, y ,ypr);

dp_0 = r[4];
#ifdef ZUT
#ifdef DPRINT
double dr4 = SQR(1+r[4])*B2P*(1 + x*irho + (SQR(xpr)+SQR(ypr))/2 );
atPrintf("B2P: % 15.12g\t% 15.12g\t% 15.12g\t% 15.12g\n", x, xpr, B2P, dr4);
#endif
#endif /*DPRINT */
#ifndef NOP
r[4] = r[4] - CRAD*SQR(1+r[4])*B2P*(1 + x*irho + (SQR(xpr)+SQR(ypr))/2 )*L;

/* recalculate momentums from angles after losing energy for radiation */
p_norm = 1/(1+r[4]);
r[1] = xpr/p_norm;
r[3] = ypr/p_norm;
#endif /*ZUT*/
#endif /*NOP*/

r[1] -= L*(ReSum-(dp_0-r[0]*irho)*irho);
r[3] += L*ImSum;
Expand Down
18 changes: 9 additions & 9 deletions atintegrators/exactkickrad.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define ZUT
#undef DPRINT
#undef NOP
/***********************************************************************
Note: in the US convention the transverse multipole field is written as:
Expand Down Expand Up @@ -133,10 +133,10 @@ the polynomial terms in PolynomB.

B2P = B2perp(ImSum, ReSum+irho, irho, x , xpr, y ,ypr);

#ifdef ZUT
#ifdef DPRINT
double dr4 = SQR(1+r[4]) * B2P * (1.0+x*irho);
atPrintf("B2P: % 15.12g\t% 15.12g\t% 15.12g\t% 15.12g\n", x, xpr, B2P, dr4);
#endif
#endif /*DPRINT */
#ifndef NOP
r[4] = r[4] - CRAD * SQR(1+r[4]) * B2P * (1.0+x*irho) * L;
// r[4] = r[4] - CRAD*SQR(1+r[4])*B2P*(1 + x*irho + (SQR(xpr)+SQR(ypr))/2 )*L;
Expand Down Expand Up @@ -183,18 +183,18 @@ static void ex_strthinkickrad(double* r, const double* A, const double* B, doubl

B2P = StrB2perp(ImSum, ReSum+B0 , x , xpr, y ,ypr);

#ifdef ZUT
#ifdef DPRINT
double dr4 = SQR(1+r[4]) * B2P;
atPrintf("B2P: % 15.12g\t% 15.12g\t% 15.12g\t% 15.12g\n", x, xpr, B2P, dr4);
#endif
#endif /*DPRINT */
#ifndef NOP
r[4] = r[4] - CRAD * SQR(1+r[4]) * B2P * L;

/* recalculate momentums from angles after losing energy for radiation */
p_norm = 1/(1+r[4]);
r[1] = xpr/p_norm;
r[3] = ypr/p_norm;
#endif /*ZUT*/
#endif /*NOP*/

r[1] -= L*ReSum;
r[3] += L*ImSum;
Expand Down Expand Up @@ -227,18 +227,18 @@ static void ex2_bndthinkickrad(double* r, double* A, double* B, double K, double

B2P = B2perp(ImSum, ReSum+irho, irho, x , xpr, y ,ypr);

#ifdef ZUT
#ifdef DPRINT
double dr4 = SQR(1+r[4]) * B2P * (1.0+x*irho);
atPrintf("B2P: % 15.12g\t% 15.12g\t% 15.12g\t% 15.12g\n", x, xpr, B2P, dr4);
#endif
#endif /*DPRINT */
#ifndef NOP
r[4] = r[4] - CRAD * SQR(1+r[4]) * B2P * (1.0+x*irho) * L;
// r[4] = r[4] - CRAD*SQR(1+r[4])*B2P*(1 + x*irho + (SQR(xpr)+SQR(ypr))/2 )*L;
/* recalculate momentums from angles after losing energy for radiation */
p_norm = 1/(1+r[4]);
r[1] = xpr/p_norm;
r[3] = ypr/p_norm;
#endif /*ZUT*/
#endif /*NOP*/

r[1] -= 0.5*K*ReSum;
r[3] += 0.5*K*ImSum;
Expand Down

0 comments on commit cbecf0f

Please sign in to comment.