Commit 4ce33d64 authored by kraus's avatar kraus
Browse files

don't rotate the bunch if you're in a follow-up track or in restart (though...

don't rotate the bunch if you're in a follow-up track or in restart (though does not work inside bend)
parent c67fdd2c
......@@ -1025,7 +1025,7 @@ void ParallelTTracker::executeDefaultTracker() {
else
msg << "Silent track ... " << endl;
setupSUV();
setupSUV(!(OpalData::getInstance()->inRestartRun() || (OpalData::getInstance()->hasBunchAllocated() && !Options::scan)));
// increase margin from 3.*c*dt to 10.*c*dt to prevent that fieldmaps are accessed
// before they are allocated when increasing the timestep in the gun.
......@@ -2841,7 +2841,7 @@ void ParallelTTracker::doSchottyRenormalization() {
}
}
void ParallelTTracker::setupSUV() {
void ParallelTTracker::setupSUV(bool updateReference) {
if(mpacflg_m) return;
......@@ -2871,10 +2871,13 @@ void ParallelTTracker::setupSUV() {
RefPartP_suv_m = itsBunch->get_pmean();
RefPartR_suv_m = itsBunch->get_rmean();
RefPartP_zxy_m = RefPartP_suv_m;
updateSpaceOrientation(false);
RefPartP_suv_m = itsBunch->get_pmean();
if (updateReference) {
RefPartP_zxy_m = RefPartP_suv_m;
updateSpaceOrientation(false);
RefPartP_suv_m = itsBunch->get_pmean();
}
}
void ParallelTTracker::setTime() {
......
......@@ -420,7 +420,7 @@ private:
void setOptionalVariables();
bool hasEndOfLineReached();
void doSchottyRenormalization();
void setupSUV();
void setupSUV(bool updateReference = true);
void handleRestartRun();
void prepareEmission();
void setTime();
......
This diff is collapsed.
......@@ -1022,4 +1022,4 @@ Amr* TrackRun::setupAMRSolver() {
return amrptr;
}
#endif
#endif
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment