22#ifndef OPAL_ParallelTTracker_HH
23#define OPAL_ParallelTTracker_HH
95 const std::vector<unsigned long long> &maxSTEPS,
97 const std::vector<double> &zstop,
98 const std::vector<double> &dt);
165#ifdef ENABLE_OPAL_FEL
167 virtual void visitUndulator(
const Undulator &);
238 void writePhaseSpace(
const long long step,
bool psDump,
bool statDump);
251 void selectDT(
bool backTrack =
false);
252 void changeDT(
bool backTrack =
false);
257#ifdef ENABLE_OPAL_FEL
262 void dumpStats(
long long step,
bool psDump,
bool statDump);
354#ifdef ENABLE_OPAL_FEL
355inline void ParallelTTracker::visitUndulator(
const Undulator &u) {
366 for (
int i = 0; i < localNum; ++i)
T deg(T x)
Convert radians to degrees.
ParticleAttrib< Vector_t > Ef
size_t getLocalNum() const
ParticleAttrib< Vector_t > P
void switchToUnitlessPositions(bool use_dt_per_particle=false)
ParticleAttrib< double > dt
ParticleAttrib< Vector_t > Bf
void switchOffUnitlessPositions(bool use_dt_per_particle=false)
std::set< std::shared_ptr< Component > > value_t
virtual void visitRFCavity(const RFCavity &)
Apply the algorithm to a RF cavity.
void selectDT(bool backTrack=false)
virtual void visitCCollimator(const CCollimator &)
Apply the algorithm to a collimator.
void computeExternalFields(OrbitThreader &oth)
bool hasEndOfLineReached(const BoundingBox &globalBoundingBox)
virtual void visitRBend(const RBend &)
Apply the algorithm to a rectangular bend.
IpplTimings::TimerRef timeIntegrationTimer2_m
IpplTimings::TimerRef WakeFieldTimer_m
virtual void visitFlexibleCollimator(const FlexibleCollimator &)
Apply the algorithm to a flexible collimator.
OpalBeamline itsOpalBeamline_m
double zstart_m
where to start
void transformBunch(const CoordinateSystemTrafo &trafo)
void autophaseCavities(const BorisPusher &pusher)
void computeWakefield(IndexMap::value_t &elements)
void computeSpaceChargeFields(unsigned long long step)
virtual void visitTravelingWave(const TravelingWave &)
Apply the algorithm to a traveling wave.
virtual void visitBeamline(const Beamline &)
Apply the algorithm to a beam line.
void timeIntegration2(BorisPusher &pusher)
virtual ~ParallelTTracker()
virtual void visitRBend3D(const RBend3D &)
Apply the algorithm to a rectangular bend.
void updateReferenceParticle(const BorisPusher &pusher)
std::set< ParticleMatterInteractionHandler * > activeParticleMatterInteractionHandlers_m
WakeFunction * wakeFunction_m
void doBinaryRepartition()
size_t numParticlesInSimulation_m
virtual void visitVacuum(const Vacuum &)
Apply the algorithm to a vacuum space.
void restoreCavityPhases()
virtual void execute()
Apply the algorithm to the top-level beamline.
virtual void visitSource(const Source &)
Apply the algorithm to a source.
IpplTimings::TimerRef timeIntegrationTimer1_m
void setOptionalVariables()
void pushParticles(const BorisPusher &pusher)
void dumpStats(long long step, bool psDump, bool statDump)
void changeDT(bool backTrack=false)
virtual void visitMarker(const Marker &)
Apply the algorithm to a marker.
ParallelTTracker(const ParallelTTracker &)
void emitParticles(long long step)
void findStartPosition(const BorisPusher &pusher)
void computeParticleMatterInteraction(IndexMap::value_t elements, OrbitThreader &oth)
void operator=(const ParallelTTracker &)
bool particleMatterStatus_m
unsigned int repartFreq_m
void updateRFElement(std::string elName, double maxPhi)
void timeIntegration1(BorisPusher &pusher)
IpplTimings::TimerRef BinRepartTimer_m
virtual void visitDegrader(const Degrader &)
Apply the algorithm to a degrader.
virtual void visitSBend(const SBend &)
Apply the algorithm to a sector bend.
void writePhaseSpace(const long long step, bool psDump, bool statDump)
virtual void visitSolenoid(const Solenoid &)
Apply the algorithm to a solenoid.
virtual void visitMultipoleT(const MultipoleT &)
Apply the algorithm to an arbitrary multipole.
StepSizeConfig stepSizes_m
virtual void visitDrift(const Drift &)
Apply the algorithm to a drift space.
IpplTimings::TimerRef fieldEvaluationTimer_m
virtual void visitMonitor(const Monitor &)
Apply the algorithm to a beam position monitor.
void evenlyDistributeParticles()
void applyFractionalStep(const BorisPusher &pusher, double tau)
virtual void visitSeptum(const Septum &)
Apply the algorithm to a septum.
void kickParticles(const BorisPusher &pusher)
void updateReference(const BorisPusher &pusher)
void updateRefToLabCSTrafo()
virtual void visitProbe(const Probe &)
Apply the algorithm to a probe.
unsigned int emissionSteps_m
virtual void visitCorrector(const Corrector &)
Apply the algorithm to a closed orbit corrector.
virtual void visitMultipole(const Multipole &)
Apply the algorithm to a multipole.
Interface for general corrector.
Interface for drift space.
Interface for general multipole.
PartBunchBase< double, 3 > * itsBunch_m
The bunch of particles to be tracked.
An abstract sequence of beam line components.
void visit(const T &, BeamlineVisitor &, PartBunchBase< double, 3 > *)
void kick(const Vector_t &R, Vector_t &P, const Vector_t &Ef, const Vector_t &Bf, const double &dt) const
void push(Vector_t &R, const Vector_t &P, const double &dt) const
Timing::TimerRef TimerRef