Commit 7acd1119 authored by kraus's avatar kraus
Browse files

cleanup; splitting large methods into smaller ones

parent 51e0fec9
......@@ -1346,7 +1346,7 @@ double ParallelTTracker::APtrack(Component *cavity, double cavity_start_pos, con
}
#ifdef HAVE_AMR_SOLVER
void ParallelTTracker::Tracker_AMR()
void ParallelTTracker::executeAMRTracker()
{
Inform msg("ParallelTTracker ");
const Vector_t vscaleFactor_m = Vector_t(scaleFactor_m);
......@@ -1545,7 +1545,7 @@ void ParallelTTracker::Tracker_AMR()
}
#endif
void ParallelTTracker::Tracker_Default() {
void ParallelTTracker::executeDefaultTracker() {
Inform msg("ParallelTTracker ");
const Vector_t vscaleFactor_m = Vector_t(scaleFactor_m);
BorisPusher pusher(itsReference);
......@@ -2905,17 +2905,17 @@ void ParallelTTracker::initializeBoundaryGeometry() {
void ParallelTTracker::execute() {
#ifdef HAVE_AMR_SOLVER
Tracker_AMR();
executeAMRTracker();
#else
if(timeIntegrator_m == 3) { // AMTS
Tracker_AMTS();
if(timeIntegrator_m == 3) {
executeAMTSTracker();
} else {
Tracker_Default();
executeDefaultTracker();
}
#endif
}
void ParallelTTracker::Tracker_AMTS() {
void ParallelTTracker::executeAMTSTracker() {
Inform msg("ParallelTTracker ");
const Vector_t vscaleFactor_m = Vector_t(scaleFactor_m);
dtCurrentTrack_m = itsBunch->getdT();
......@@ -3245,4 +3245,4 @@ Vector_t ParallelTTracker::calcMeanP() const {
}
reduce(meanP, meanP, OpAddAssign());
return meanP / Vector_t(itsBunch->getTotalNum());
}
}
\ No newline at end of file
......@@ -424,11 +424,11 @@ private:
void setTime();
void initializeBoundaryGeometry();
void doBinaryRepartition();
void Tracker_Default();
void executeDefaultTracker();
#ifdef HAVE_AMR_SOLVER
void Tracker_AMR();
void executeAMRTracker();
#endif
void Tracker_AMTS();
void executeAMTSTracker();
void push(double h);
void kick(double h, bool avoidGammaCalc = false);
void computeExternalFields_AMTS();
......
This diff is collapsed.
......@@ -69,7 +69,13 @@ private:
// Clone constructor.
TrackRun(const std::string &name, TrackRun *parent);
double SetDistributionParallelT(Beam *beam);
void setupSliceTracker();
void setupTTracker();
void setupCyclotronTracker();
void setupFieldsolver();
double setDistributionParallelT(Beam *beam);
ParallelTTracker *setupForAutophase();
// Pointer to tracking algorithm.
......@@ -87,9 +93,10 @@ private:
static const std::string defaultDistribution;
#ifdef HAVE_AMR_SOLVER
Amr* setupAMRSolver();
std::vector<std::string> filterString(std::string str);
std::pair<Box,unsigned int> getBlGrids(std::string str);
#endif
};
#endif // OPAL_TrackRun_HH
\ No newline at end of file
#endif // OPAL_TrackRun_HH
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