Added bug, where drift Approximation would not propergate particles with macro_sigma = 0 properly.
This commit is contained in:
@@ -47,7 +47,10 @@ inline double Drift_Base::get_zNew_m(Particle *movePart, const double ¯oSigm
|
|||||||
double zDir = v_ms[2] <= 0 ? -1 : 1;
|
double zDir = v_ms[2] <= 0 ? -1 : 1;
|
||||||
double znew_m;
|
double znew_m;
|
||||||
if (macroSigma_m2 == 0) {
|
if (macroSigma_m2 == 0) {
|
||||||
znew_m = (zDir == -1) ? z_RW_m : z_WGTS_end_m;
|
if (zDir == -1) {
|
||||||
|
znew_m = z_RW_m - 2*l_WGTS_m;
|
||||||
|
} else
|
||||||
|
znew_m = z_WGTS_end_m + 2*l_WGTS_m;
|
||||||
} else {
|
} else {
|
||||||
double distance_m = 1/macroSigma_m2;
|
double distance_m = 1/macroSigma_m2;
|
||||||
znew_m = zold_m + zDir*vForwardAbs_ms/vTotAbs_ms * distance_m;
|
znew_m = zold_m + zDir*vForwardAbs_ms/vTotAbs_ms * distance_m;
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ int main(int argc, char *argv[]) {
|
|||||||
cout<<"Number CPUs: "<<size<<"\n"<<endl;
|
cout<<"Number CPUs: "<<size<<"\n"<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
std::cout << "Process " << getpid() << " is " << rank
|
std::cout << "Process " << getpid() << " is " << rank
|
||||||
<< " of " << size << " processes" << std::endl;
|
<< " of " << size << " processes" << std::endl;
|
||||||
if (rank == 0) sleep(600);
|
if (rank == 0) sleep(600);
|
||||||
*/
|
|
||||||
|
|
||||||
Simulation Sim;
|
Simulation Sim;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user