OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
ParallelTTracker Class Reference

#include <ParallelTTracker.h>

Inheritance diagram for ParallelTTracker:
Collaboration diagram for ParallelTTracker:

Public Types

enum  {
  X , PX , Y , PY ,
  T , PT
}

Public Member Functions

 ParallelTTracker (const Beamline &bl, const PartData &data, bool revBeam, bool revTrack)
 Constructor.
 ParallelTTracker (const Beamline &bl, PartBunchBase< double, 3 > *bunch, DataSink &ds, const PartData &data, bool revBeam, bool revTrack, const std::vector< unsigned long long > &maxSTEPS, double zstart, const std::vector< double > &zstop, const std::vector< double > &dt)
 Constructor.
virtual ~ParallelTTracker ()
virtual void execute ()
 Apply the algorithm to the top-level beamline.
virtual void visitBeamline (const Beamline &)
 Apply the algorithm to a beam line.
virtual void visitCCollimator (const CCollimator &)
 Apply the algorithm to a collimator.
virtual void visitCorrector (const Corrector &)
 Apply the algorithm to a closed orbit corrector.
virtual void visitDegrader (const Degrader &)
 Apply the algorithm to a degrader.
virtual void visitDrift (const Drift &)
 Apply the algorithm to a drift space.
virtual void visitFlexibleCollimator (const FlexibleCollimator &)
 Apply the algorithm to a flexible collimator.
virtual void visitMarker (const Marker &)
 Apply the algorithm to a marker.
virtual void visitMonitor (const Monitor &)
 Apply the algorithm to a beam position monitor.
virtual void visitMultipole (const Multipole &)
 Apply the algorithm to a multipole.
virtual void visitMultipoleT (const MultipoleT &)
 Apply the algorithm to an arbitrary multipole.
virtual void visitProbe (const Probe &)
 Apply the algorithm to a probe.
virtual void visitRBend (const RBend &)
 Apply the algorithm to a rectangular bend.
virtual void visitRBend3D (const RBend3D &)
 Apply the algorithm to a rectangular bend.
virtual void visitRFCavity (const RFCavity &)
 Apply the algorithm to a RF cavity.
virtual void visitSBend (const SBend &)
 Apply the algorithm to a sector bend.
virtual void visitSeptum (const Septum &)
 Apply the algorithm to a septum.
virtual void visitSolenoid (const Solenoid &)
 Apply the algorithm to a solenoid.
virtual void visitSource (const Source &)
 Apply the algorithm to a source.
virtual void visitTravelingWave (const TravelingWave &)
 Apply the algorithm to a traveling wave.
virtual void visitVacuum (const Vacuum &)
 Apply the algorithm to a vacuum space.
const PartBunchBase< double, 3 > * getBunch () const
 Return the current bunch.
void addToBunch (const OpalParticle &)
 Add particle to bunch.
virtual void visitComponent (const Component &)
 Store the bunch.
virtual void setNumBunch (short)
 set total number of tracked bunches
virtual short getNumBunch ()
 get total number of tracked bunches
virtual void visitCyclotron (const Cyclotron &)
 Apply the algorithm to an cyclotron.
virtual void visitFlaggedElmPtr (const FlaggedElmPtr &)
 Apply the algorithm to a FlaggedElmPtr.
virtual void visitOffset (const Offset &)
 Apply the algorithm to an offset (placement).
virtual void visitOutputPlane (const OutputPlane &)
 Apply the algorithm to an output plane.
virtual void visitRing (const Ring &)
 Apply the algorithm to a ring.
virtual void visitSBend3D (const SBend3D &)
 Apply the algorithm to a sector bend with 3D field map.
virtual void visitScalingFFAMagnet (const ScalingFFAMagnet &)
 Apply the algorithm to a scaling FFA magnet.
virtual void visitStripper (const Stripper &)
 Apply the algorithm to a particle stripper.
virtual void visitVariableRFCavity (const VariableRFCavity &vcav)
 Apply the algorithm to a a variable RF cavity.
virtual void visitVariableRFCavityFringeField (const VariableRFCavityFringeField &vcav)
 Apply the algorithm to a a variable RF cavity with Fringe Field.
virtual void visitVerticalFFAMagnet (const VerticalFFAMagnet &)
 Apply the algorithm to a vertical FFA magnet.

Public Attributes

FieldList cavities_m
const BeamlineitsBeamline_m

Protected Member Functions

void applyDrift (double length)
 Apply a drift length.
void applyThinMultipole (const BMultipoleField &field, double factor)
void applyThinSBend (const BMultipoleField &field, double scale, double h)
void applyTransform (const Euclid3D &, double refLength=0.0)
 Apply a geometric transformation.
FTps< double, 2 > buildMultipoleVectorPotential2D (const BMultipoleField &)
 Construct vector potential for a Multipole.
FTps< double, 6 > buildMultipoleVectorPotential (const BMultipoleField &)
 Construct vector potential for a Multipole.
FTps< double, 2 > buildSBendVectorPotential2D (const BMultipoleField &, double h)
 Construct vector potential for a SBend.
FTps< double, 6 > buildSBendVectorPotential (const BMultipoleField &, double h)
 Construct vector potential for a SBend.

Protected Attributes

PartBunchBase< double, 3 > * itsBunch_m
 The bunch of particles to be tracked.
const PartData itsReference
 The reference information.
const BeamlineitsLine
bool back_beam
bool back_track
bool back_path
double flip_B
double flip_s

Private Member Functions

 ParallelTTracker ()
 ParallelTTracker (const ParallelTTracker &)
void operator= (const ParallelTTracker &)
void kickParticles (const BorisPusher &pusher)
void pushParticles (const BorisPusher &pusher)
void updateReferenceParticle (const BorisPusher &pusher)
void writePhaseSpace (const long long step, bool psDump, bool statDump)
void updateRFElement (std::string elName, double maxPhi)
void printRFPhases ()
void saveCavityPhases ()
void restoreCavityPhases ()
void prepareSections ()
void timeIntegration1 (BorisPusher &pusher)
void timeIntegration2 (BorisPusher &pusher)
void selectDT (bool backTrack=false)
void changeDT (bool backTrack=false)
void emitParticles (long long step)
void computeExternalFields (OrbitThreader &oth)
void computeWakefield (IndexMap::value_t &elements)
void computeParticleMatterInteraction (IndexMap::value_t elements, OrbitThreader &oth)
void computeSpaceChargeFields (unsigned long long step)
void dumpStats (long long step, bool psDump, bool statDump)
void setOptionalVariables ()
bool hasEndOfLineReached (const BoundingBox &globalBoundingBox)
void handleRestartRun ()
void prepareEmission ()
void setTime ()
void doBinaryRepartition ()
void transformBunch (const CoordinateSystemTrafo &trafo)
void updateReference (const BorisPusher &pusher)
void updateRefToLabCSTrafo ()
void applyFractionalStep (const BorisPusher &pusher, double tau)
void findStartPosition (const BorisPusher &pusher)
void autophaseCavities (const BorisPusher &pusher)
void evenlyDistributeParticles ()
virtual void applyDefault (const ElementBase &)

Private Attributes

DataSinkitsDataSink_m
OpalBeamline itsOpalBeamline_m
bool globalEOL_m
bool wakeStatus_m
bool deletedParticles_m
WakeFunctionwakeFunction_m
double pathLength_m
double zstart_m
 where to start
StepSizeConfig stepSizes_m
double dtCurrentTrack_m
int minStepforReBin_m
size_t minBinEmitted_m
unsigned int repartFreq_m
unsigned int emissionSteps_m
size_t numParticlesInSimulation_m
IpplTimings::TimerRef timeIntegrationTimer1_m
IpplTimings::TimerRef timeIntegrationTimer2_m
IpplTimings::TimerRef fieldEvaluationTimer_m
IpplTimings::TimerRef BinRepartTimer_m
IpplTimings::TimerRef WakeFieldTimer_m
std::set< ParticleMatterInteractionHandler * > activeParticleMatterInteractionHandlers_m
bool particleMatterStatus_m
bool local_flip

Detailed Description

Definition at line 69 of file ParallelTTracker.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited
Enumerator
PX 
PY 
PT 

Definition at line 39 of file AbstractTracker.h.

Constructor & Destructor Documentation

◆ ParallelTTracker() [1/4]

ParallelTTracker::ParallelTTracker ( const Beamline & bl,
const PartData & data,
bool revBeam,
bool revTrack )
explicit

Constructor.

Definition at line 60 of file ParallelTTracker.cpp.

References BinRepartTimer_m, dtCurrentTrack_m, emissionSteps_m, fieldEvaluationTimer_m, globalEOL_m, itsDataSink_m, itsOpalBeamline_m, max(), minBinEmitted_m, minStepforReBin_m, numParticlesInSimulation_m, particleMatterStatus_m, pathLength_m, repartFreq_m, timeIntegrationTimer1_m, timeIntegrationTimer2_m, Tracker::Tracker(), WakeFieldTimer_m, wakeFunction_m, wakeStatus_m, and zstart_m.

Referenced by operator=(), and ParallelTTracker().

Here is the call graph for this function:

◆ ParallelTTracker() [2/4]

ParallelTTracker::ParallelTTracker ( const Beamline & bl,
PartBunchBase< double, 3 > * bunch,
DataSink & ds,
const PartData & data,
bool revBeam,
bool revTrack,
const std::vector< unsigned long long > & maxSTEPS,
double zstart,
const std::vector< double > & zstop,
const std::vector< double > & dt )
explicit

Constructor.

Definition at line 86 of file ParallelTTracker.cpp.

References BinRepartTimer_m, dtCurrentTrack_m, emissionSteps_m, fieldEvaluationTimer_m, globalEOL_m, itsDataSink_m, itsOpalBeamline_m, max(), minBinEmitted_m, minStepforReBin_m, numParticlesInSimulation_m, particleMatterStatus_m, pathLength_m, repartFreq_m, stepSizes_m, timeIntegrationTimer1_m, timeIntegrationTimer2_m, Tracker::Tracker(), WakeFieldTimer_m, wakeFunction_m, wakeStatus_m, and zstart_m.

Here is the call graph for this function:

◆ ~ParallelTTracker()

ParallelTTracker::~ParallelTTracker ( )
virtual

Definition at line 125 of file ParallelTTracker.cpp.

◆ ParallelTTracker() [3/4]

ParallelTTracker::ParallelTTracker ( )
private

◆ ParallelTTracker() [4/4]

ParallelTTracker::ParallelTTracker ( const ParallelTTracker & )
private

References ParallelTTracker().

Here is the call graph for this function:

Member Function Documentation

◆ addToBunch()

void Tracker::addToBunch ( const OpalParticle & part)
inherited

Add particle to bunch.

Definition at line 107 of file Tracker.cpp.

References itsBunch_m.

◆ applyDefault()

◆ applyDrift()

void Tracker::applyDrift ( double length)
protectedinherited

Apply a drift length.

Definition at line 122 of file Tracker.cpp.

References dot(), OpalParticle::getP(), OpalParticle::getX(), OpalParticle::getY(), OpalParticle::getZ(), itsBunch_m, AbstractTracker::itsReference, OpalParticle::setX(), OpalParticle::setY(), and OpalParticle::setZ().

Here is the call graph for this function:

◆ applyFractionalStep()

void ParallelTTracker::applyFractionalStep ( const BorisPusher & pusher,
double tau )
private

Definition at line 1173 of file ParallelTTracker.cpp.

References Physics::c, getQuaternion(), Tracker::itsBunch_m, pathLength_m, BorisPusher::push(), and zstart_m.

Referenced by findStartPosition().

Here is the call graph for this function:

◆ applyThinMultipole()

void Tracker::applyThinMultipole ( const BMultipoleField & field,
double factor )
protectedinherited

Definition at line 140 of file Tracker.cpp.

References OpalParticle::getPx(), OpalParticle::getPy(), OpalParticle::getX(), OpalParticle::getY(), itsBunch_m, BMultipoleField::normal(), BMultipoleField::order(), OpalParticle::setPx(), OpalParticle::setPy(), and BMultipoleField::skew().

Here is the call graph for this function:

◆ applyThinSBend()

void Tracker::applyThinSBend ( const BMultipoleField & field,
double scale,
double h )
protectedinherited

Definition at line 169 of file Tracker.cpp.

References buildSBendVectorPotential2D(), FTps< T, N >::derivative(), FTps< T, N >::evaluate(), OpalParticle::getPx(), OpalParticle::getPy(), OpalParticle::getX(), OpalParticle::getY(), itsBunch_m, OpalParticle::setPx(), and OpalParticle::setPy().

Here is the call graph for this function:

◆ applyTransform()

void Tracker::applyTransform ( const Euclid3D & euclid,
double refLength = 0.0 )
protectedinherited

Apply a geometric transformation.

Definition at line 189 of file Tracker.cpp.

References OpalParticle::getPx(), OpalParticle::getPy(), OpalParticle::getPz(), Euclid3D::getX(), OpalParticle::getX(), Euclid3D::getY(), OpalParticle::getY(), Euclid3D::getZ(), OpalParticle::getZ(), Euclid3D::isIdentity(), itsBunch_m, AbstractTracker::itsReference, Euclid3D::M(), OpalParticle::setPx(), OpalParticle::setPy(), OpalParticle::setX(), OpalParticle::setY(), and OpalParticle::setZ().

Here is the call graph for this function:

◆ autophaseCavities()

void ParallelTTracker::autophaseCavities ( const BorisPusher & pusher)
private

Definition at line 1250 of file ParallelTTracker.cpp.

References Physics::c, RFCavity::getAutophaseVeto(), CavityAutophaser::getPhaseAtMaxEnergy(), Tracker::itsBunch_m, itsOpalBeamline_m, AbstractTracker::itsReference, BorisPusher::push(), RFCAVITY, and TRAVELINGWAVE.

Referenced by findStartPosition().

Here is the call graph for this function:

◆ buildMultipoleVectorPotential()

Series Tracker::buildMultipoleVectorPotential ( const BMultipoleField & field)
protectedinherited

Construct vector potential for a Multipole.

Definition at line 252 of file Tracker.cpp.

References FTps< T, N >::getMaxOrder(), FTps< double, 6 >::makeVariable(), BMultipoleField::normal(), BMultipoleField::order(), FTps< T, N >::setTruncOrder(), BMultipoleField::skew(), AbstractTracker::X, and AbstractTracker::Y.

Here is the call graph for this function:

◆ buildMultipoleVectorPotential2D()

Series2 Tracker::buildMultipoleVectorPotential2D ( const BMultipoleField & field)
protectedinherited

Construct vector potential for a Multipole.

Definition at line 225 of file Tracker.cpp.

References FTps< T, N >::getMaxOrder(), FTps< double, 2 >::makeVariable(), BMultipoleField::normal(), BMultipoleField::order(), FTps< T, N >::setTruncOrder(), and BMultipoleField::skew().

Here is the call graph for this function:

◆ buildSBendVectorPotential()

Series Tracker::buildSBendVectorPotential ( const BMultipoleField & field,
double h )
protectedinherited

Construct vector potential for a SBend.

Definition at line 332 of file Tracker.cpp.

References FTps< T, N >::derivative(), FTps< T, N >::getMaxOrder(), FTps< double, 6 >::makeVariable(), BMultipoleField::normal(), BMultipoleField::order(), FTps< T, N >::setTruncOrder(), BMultipoleField::skew(), AbstractTracker::X, and AbstractTracker::Y.

Here is the call graph for this function:

◆ buildSBendVectorPotential2D()

Series2 Tracker::buildSBendVectorPotential2D ( const BMultipoleField & field,
double h )
protectedinherited

Construct vector potential for a SBend.

Definition at line 280 of file Tracker.cpp.

References FTps< T, N >::derivative(), FTps< T, N >::getMaxOrder(), FTps< double, 2 >::makeVariable(), BMultipoleField::normal(), BMultipoleField::order(), FTps< T, N >::setTruncOrder(), BMultipoleField::skew(), and AbstractTracker::X.

Referenced by applyThinSBend().

Here is the call graph for this function:

◆ changeDT()

void ParallelTTracker::changeDT ( bool backTrack = false)
private

Definition at line 437 of file ParallelTTracker.cpp.

References Tracker::itsBunch_m, and selectDT().

Referenced by execute(), and findStartPosition().

Here is the call graph for this function:

◆ computeExternalFields()

void ParallelTTracker::computeExternalFields ( OrbitThreader & oth)
private

◆ computeParticleMatterInteraction()

void ParallelTTracker::computeParticleMatterInteraction ( IndexMap::value_t elements,
OrbitThreader & oth )
private

◆ computeSpaceChargeFields()

void ParallelTTracker::computeSpaceChargeFields ( unsigned long long step)
private

Definition at line 479 of file ParallelTTracker.cpp.

References Quaternion::conjugate(), doBinaryRepartition(), getQuaternion(), CoordinateSystemTrafo::inverted(), Tracker::itsBunch_m, numParticlesInSimulation_m, pathLength_m, repartFreq_m, CoordinateSystemTrafo::rotateTo(), and CoordinateSystemTrafo::transformTo().

Referenced by execute().

Here is the call graph for this function:

◆ computeWakefield()

void ParallelTTracker::computeWakefield ( IndexMap::value_t & elements)
private

◆ doBinaryRepartition()

void ParallelTTracker::doBinaryRepartition ( )
private

Definition at line 876 of file ParallelTTracker.cpp.

References BinRepartTimer_m, IpplInfo::Comm, endl(), INFOMSG, Tracker::itsBunch_m, minBinEmitted_m, numParticlesInSimulation_m, IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by computeSpaceChargeFields().

Here is the call graph for this function:

◆ dumpStats()

void ParallelTTracker::dumpStats ( long long step,
bool psDump,
bool statDump )
private

Definition at line 893 of file ParallelTTracker.cpp.

References endl(), Util::getEnergyString(), Util::getLengthString(), Util::getTimeString(), gmsg, Tracker::itsBunch_m, level1(), level2(), level3(), minBinEmitted_m, numParticlesInSimulation_m, pathLength_m, OPALTimer::Timer::time(), and writePhaseSpace().

Referenced by execute().

Here is the call graph for this function:

◆ emitParticles()

void ParallelTTracker::emitParticles ( long long step)
private

Definition at line 445 of file ParallelTTracker.cpp.

References CoordinateSystemTrafo::inverted(), Tracker::itsBunch_m, itsOpalBeamline_m, minStepforReBin_m, numParticlesInSimulation_m, CoordinateSystemTrafo::rotateTo(), transformBunch(), and CoordinateSystemTrafo::transformTo().

Referenced by execute().

Here is the call graph for this function:

◆ evenlyDistributeParticles()

void ParallelTTracker::evenlyDistributeParticles ( )
private

Definition at line 1286 of file ParallelTTracker.cpp.

References allreduce(), IpplInfo::Comm, Communicate::COMM_ANY_NODE, IpplInfo::getNodes(), DistributionInfo::howMany, Tracker::itsBunch_m, IpplInfo::myNode(), P_LAYOUT_CYCLE, P_SPATIAL_TRANSFER_TAG, DistributionInfo::who, and DistributionInfo::whom.

Referenced by execute().

Here is the call graph for this function:

◆ execute()

void ParallelTTracker::execute ( )
virtual

◆ findStartPosition()

void ParallelTTracker::findStartPosition ( const BorisPusher & pusher)
private

◆ getBunch()

const PartBunchBase< double, 3 > * Tracker::getBunch ( ) const
inherited

Return the current bunch.

Definition at line 102 of file Tracker.cpp.

References itsBunch_m.

◆ getNumBunch()

virtual short Tracker::getNumBunch ( )
inlinevirtualinherited

get total number of tracked bunches

Definition at line 117 of file Tracker.h.

◆ handleRestartRun()

void ParallelTTracker::handleRestartRun ( )
private

◆ hasEndOfLineReached()

bool ParallelTTracker::hasEndOfLineReached ( const BoundingBox & globalBoundingBox)
private

Definition at line 968 of file ParallelTTracker.cpp.

References globalEOL_m, BoundingBox::isOutside(), Tracker::itsBunch_m, and reduce().

Referenced by execute().

Here is the call graph for this function:

◆ kickParticles()

void ParallelTTracker::kickParticles ( const BorisPusher & pusher)
inlineprivate

Definition at line 364 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and BorisPusher::kick().

Referenced by timeIntegration2().

Here is the call graph for this function:

◆ operator=()

void ParallelTTracker::operator= ( const ParallelTTracker & )
private

References ParallelTTracker().

Here is the call graph for this function:

◆ prepareEmission()

void ParallelTTracker::prepareEmission ( )
private

Definition at line 981 of file ParallelTTracker.cpp.

References emissionSteps_m, endl(), gmsg, Tracker::itsBunch_m, and level2().

Referenced by execute().

Here is the call graph for this function:

◆ prepareSections()

void ParallelTTracker::prepareSections ( )
private

Definition at line 372 of file ParallelTTracker.cpp.

References Tracker::itsBeamline_m, and itsOpalBeamline_m.

Referenced by execute().

◆ printRFPhases()

void ParallelTTracker::printRFPhases ( )
private

◆ pushParticles()

void ParallelTTracker::pushParticles ( const BorisPusher & pusher)
inlineprivate

Definition at line 370 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and BorisPusher::push().

Referenced by timeIntegration1(), and timeIntegration2().

Here is the call graph for this function:

◆ restoreCavityPhases()

void ParallelTTracker::restoreCavityPhases ( )
private

Definition at line 165 of file ParallelTTracker.cpp.

References end(), OpalData::getFirstMaxPhases(), OpalData::getInstance(), OpalData::getLastMaxPhases(), and updateRFElement().

Referenced by execute().

Here is the call graph for this function:

◆ saveCavityPhases()

void ParallelTTracker::saveCavityPhases ( )
private

Definition at line 161 of file ParallelTTracker.cpp.

References itsDataSink_m.

Referenced by execute().

◆ selectDT()

void ParallelTTracker::selectDT ( bool backTrack = false)
private

Definition at line 423 of file ParallelTTracker.cpp.

References dtCurrentTrack_m, and Tracker::itsBunch_m.

Referenced by changeDT(), execute(), and findStartPosition().

◆ setNumBunch()

virtual void Tracker::setNumBunch ( short )
inlinevirtualinherited

set total number of tracked bunches

Definition at line 114 of file Tracker.h.

◆ setOptionalVariables()

void ParallelTTracker::setOptionalVariables ( )
private

Definition at line 940 of file ParallelTTracker.cpp.

References endl(), OpalData::find(), OpalData::getInstance(), IpplInfo::getNodes(), RealVariable::getReal(), gmsg, level2(), Options::minBinEmitted, minBinEmitted_m, Options::minStepForRebin, minStepforReBin_m, Options::repartFreq, and repartFreq_m.

Referenced by execute().

Here is the call graph for this function:

◆ setTime()

void ParallelTTracker::setTime ( )
private

Definition at line 974 of file ParallelTTracker.cpp.

References Tracker::itsBunch_m.

Referenced by execute().

◆ timeIntegration1()

void ParallelTTracker::timeIntegration1 ( BorisPusher & pusher)
private

Definition at line 383 of file ParallelTTracker.cpp.

References pushParticles(), IpplTimings::startTimer(), IpplTimings::stopTimer(), and timeIntegrationTimer1_m.

Referenced by execute().

Here is the call graph for this function:

◆ timeIntegration2()

void ParallelTTracker::timeIntegration2 ( BorisPusher & pusher)
private

Definition at line 391 of file ParallelTTracker.cpp.

References Tracker::itsBunch_m, kickParticles(), pushParticles(), IpplTimings::startTimer(), IpplTimings::stopTimer(), and timeIntegrationTimer2_m.

Referenced by execute().

Here is the call graph for this function:

◆ transformBunch()

void ParallelTTracker::transformBunch ( const CoordinateSystemTrafo & trafo)
private

Definition at line 1150 of file ParallelTTracker.cpp.

References Tracker::itsBunch_m, CoordinateSystemTrafo::rotateTo(), and CoordinateSystemTrafo::transformTo().

Referenced by emitParticles(), and updateRefToLabCSTrafo().

Here is the call graph for this function:

◆ updateReference()

void ParallelTTracker::updateReference ( const BorisPusher & pusher)
private

Definition at line 1103 of file ParallelTTracker.cpp.

References updateReferenceParticle(), and updateRefToLabCSTrafo().

Referenced by computeParticleMatterInteraction(), and execute().

Here is the call graph for this function:

◆ updateReferenceParticle()

void ParallelTTracker::updateReferenceParticle ( const BorisPusher & pusher)
private

Definition at line 1108 of file ParallelTTracker.cpp.

References DefaultVisitor::back_track, Physics::c, end(), endl(), globalEOL_m, gmsg, Tracker::itsBunch_m, itsOpalBeamline_m, BorisPusher::kick(), level1(), BorisPusher::push(), CoordinateSystemTrafo::rotateFrom(), CoordinateSystemTrafo::rotateTo(), and CoordinateSystemTrafo::transformTo().

Referenced by findStartPosition(), and updateReference().

Here is the call graph for this function:

◆ updateRefToLabCSTrafo()

void ParallelTTracker::updateRefToLabCSTrafo ( )
private

Definition at line 1160 of file ParallelTTracker.cpp.

References euclidean_norm(), getQuaternion(), Tracker::itsBunch_m, pathLength_m, and transformBunch().

Referenced by updateReference().

Here is the call graph for this function:

◆ updateRFElement()

void ParallelTTracker::updateRFElement ( std::string elName,
double maxPhi )
private

Definition at line 142 of file ParallelTTracker.cpp.

References endl(), ElementBase::getName(), INFOMSG, itsOpalBeamline_m, RFCAVITY, RFCavity::setAutophaseVeto(), RFCavity::setPhasem(), and TRAVELINGWAVE.

Referenced by restoreCavityPhases().

Here is the call graph for this function:

◆ visitBeamline()

void ParallelTTracker::visitBeamline ( const Beamline & bl)
virtual

Apply the algorithm to a beam line.

Reimplemented from DefaultVisitor.

Definition at line 127 of file ParallelTTracker.cpp.

References TBeamline< T >::getInitialDirection(), TBeamline< T >::getOrigin3D(), TBeamline< T >::getRelativeFlag(), TBeamline< T >::iterate(), itsOpalBeamline_m, OpalBeamline::merge(), and OpalBeamline::swap().

Here is the call graph for this function:

◆ visitCCollimator()

void ParallelTTracker::visitCCollimator ( const CCollimator & coll)
inlinevirtual

Apply the algorithm to a collimator.

Reimplemented from DefaultVisitor.

Definition at line 282 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitComponent()

void Tracker::visitComponent ( const Component & comp)
virtualinherited

Store the bunch.

Apply the algorithm to an arbitrary component.

Reimplemented from DefaultVisitor.

Definition at line 117 of file Tracker.cpp.

References DefaultVisitor::back_beam, DefaultVisitor::back_track, itsBunch_m, AbstractTracker::itsReference, and Component::trackBunch().

Here is the call graph for this function:

◆ visitCorrector()

void ParallelTTracker::visitCorrector ( const Corrector & corr)
inlinevirtual

Apply the algorithm to a closed orbit corrector.

Reimplemented from DefaultVisitor.

Definition at line 286 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitCyclotron()

void DefaultVisitor::visitCyclotron ( const Cyclotron & cyc)
virtualinherited

Apply the algorithm to an cyclotron.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 97 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitDegrader()

void ParallelTTracker::visitDegrader ( const Degrader & deg)
inlinevirtual

Apply the algorithm to a degrader.

Reimplemented from DefaultVisitor.

Definition at line 290 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitDrift()

void ParallelTTracker::visitDrift ( const Drift & drift)
inlinevirtual

Apply the algorithm to a drift space.

Reimplemented from DefaultVisitor.

Definition at line 294 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitFlaggedElmPtr()

void DefaultVisitor::visitFlaggedElmPtr ( const FlaggedElmPtr & fep)
virtualinherited

Apply the algorithm to a FlaggedElmPtr.

Implements BeamlineVisitor.

Reimplemented in Flagger, RangeSelector, and Replacer.

Definition at line 220 of file DefaultVisitor.cpp.

References ElementBase::accept(), ElmPtr::getElement(), FlaggedElmPtr::getReflectionFlag(), and local_flip.

Referenced by RangeSelector::handleBeamline(), RangeSelector::handleElement(), Flagger::visitFlaggedElmPtr(), and Replacer::visitFlaggedElmPtr().

Here is the call graph for this function:

◆ visitFlexibleCollimator()

void ParallelTTracker::visitFlexibleCollimator ( const FlexibleCollimator & coll)
inlinevirtual

Apply the algorithm to a flexible collimator.

Reimplemented from DefaultVisitor.

Definition at line 298 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitMarker()

void ParallelTTracker::visitMarker ( const Marker & marker)
inlinevirtual

Apply the algorithm to a marker.

Reimplemented from DefaultVisitor.

Definition at line 302 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitMonitor()

void ParallelTTracker::visitMonitor ( const Monitor & mon)
inlinevirtual

Apply the algorithm to a beam position monitor.

Reimplemented from DefaultVisitor.

Definition at line 306 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitMultipole()

void ParallelTTracker::visitMultipole ( const Multipole & mult)
inlinevirtual

Apply the algorithm to a multipole.

Reimplemented from DefaultVisitor.

Definition at line 310 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitMultipoleT()

void ParallelTTracker::visitMultipoleT ( const MultipoleT & mult)
inlinevirtual

Apply the algorithm to an arbitrary multipole.

Reimplemented from DefaultVisitor.

Definition at line 314 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitOffset()

void DefaultVisitor::visitOffset ( const Offset & off)
virtualinherited

Apply the algorithm to an offset (placement).

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 129 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitOutputPlane()

void DefaultVisitor::visitOutputPlane ( const OutputPlane & out)
virtualinherited

Apply the algorithm to an output plane.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 133 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitProbe()

void ParallelTTracker::visitProbe ( const Probe & prob)
inlinevirtual

Apply the algorithm to a probe.

Reimplemented from DefaultVisitor.

Definition at line 318 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitRBend()

void ParallelTTracker::visitRBend ( const RBend & bend)
inlinevirtual

Apply the algorithm to a rectangular bend.

Reimplemented from DefaultVisitor.

Definition at line 322 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitRBend3D()

void ParallelTTracker::visitRBend3D ( const RBend3D & bend)
inlinevirtual

Apply the algorithm to a rectangular bend.

Reimplemented from DefaultVisitor.

Definition at line 326 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitRFCavity()

void ParallelTTracker::visitRFCavity ( const RFCavity & as)
inlinevirtual

Apply the algorithm to a RF cavity.

Reimplemented from DefaultVisitor.

Definition at line 330 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitRing()

void DefaultVisitor::visitRing ( const Ring & ring)
virtualinherited

Apply the algorithm to a ring.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 153 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitSBend()

void ParallelTTracker::visitSBend ( const SBend & bend)
inlinevirtual

Apply the algorithm to a sector bend.

Reimplemented from DefaultVisitor.

Definition at line 334 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitSBend3D()

void DefaultVisitor::visitSBend3D ( const SBend3D & bend)
virtualinherited

Apply the algorithm to a sector bend with 3D field map.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 161 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitScalingFFAMagnet()

void DefaultVisitor::visitScalingFFAMagnet ( const ScalingFFAMagnet & spiral)
virtualinherited

Apply the algorithm to a scaling FFA magnet.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 165 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitSeptum()

void ParallelTTracker::visitSeptum ( const Septum & sept)
inlinevirtual

Apply the algorithm to a septum.

Reimplemented from DefaultVisitor.

Definition at line 338 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitSolenoid()

void ParallelTTracker::visitSolenoid ( const Solenoid & solenoid)
inlinevirtual

Apply the algorithm to a solenoid.

Reimplemented from DefaultVisitor.

Definition at line 342 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitSource()

void ParallelTTracker::visitSource ( const Source & source)
inlinevirtual

Apply the algorithm to a source.

Reimplemented from DefaultVisitor.

Definition at line 346 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitStripper()

void DefaultVisitor::visitStripper ( const Stripper & stripper)
virtualinherited

Apply the algorithm to a particle stripper.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 181 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitTravelingWave()

void ParallelTTracker::visitTravelingWave ( const TravelingWave & as)
inlinevirtual

Apply the algorithm to a traveling wave.

Reimplemented from DefaultVisitor.

Definition at line 350 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitVacuum()

void ParallelTTracker::visitVacuum ( const Vacuum & vac)
inlinevirtual

Apply the algorithm to a vacuum space.

Reimplemented from DefaultVisitor.

Definition at line 360 of file ParallelTTracker.h.

References Tracker::itsBunch_m, and itsOpalBeamline_m.

◆ visitVariableRFCavity()

void DefaultVisitor::visitVariableRFCavity ( const VariableRFCavity & vcav)
virtualinherited

Apply the algorithm to a a variable RF cavity.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 199 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitVariableRFCavityFringeField()

void DefaultVisitor::visitVariableRFCavityFringeField ( const VariableRFCavityFringeField & vcav)
virtualinherited

Apply the algorithm to a a variable RF cavity with Fringe Field.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 203 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ visitVerticalFFAMagnet()

void DefaultVisitor::visitVerticalFFAMagnet ( const VerticalFFAMagnet & mag)
virtualinherited

Apply the algorithm to a vertical FFA magnet.

Implements BeamlineVisitor.

Reimplemented in ParallelCyclotronTracker.

Definition at line 208 of file DefaultVisitor.cpp.

References applyDefault().

Here is the call graph for this function:

◆ writePhaseSpace()

void ParallelTTracker::writePhaseSpace ( const long long step,
bool psDump,
bool statDump )
private

Definition at line 994 of file ParallelTTracker.cpp.

References a, Physics::c, CCOLLIMATOR, ParticleAttrib< T >::create(), ParticleAttrib< T >::destroy(), endl(), euclidean_norm(), Util::getGamma(), FlexibleCollimator::getLosses(), ElementBase::getName(), gmsg, Tracker::itsBunch_m, itsDataSink_m, itsOpalBeamline_m, level2(), level3(), name, pathLength_m, reduce(), stepSizes_m, and Units::Vpm2MVpm.

Referenced by dumpStats(), and execute().

Here is the call graph for this function:

Member Data Documentation

◆ activeParticleMatterInteractionHandlers_m

std::set<ParticleMatterInteractionHandler*> ParallelTTracker::activeParticleMatterInteractionHandlers_m
private

Definition at line 229 of file ParallelTTracker.h.

Referenced by computeParticleMatterInteraction().

◆ back_beam

bool DefaultVisitor::back_beam
protectedinherited

Definition at line 155 of file DefaultVisitor.h.

Referenced by DefaultVisitor(), execute(), and Tracker::visitComponent().

◆ back_path

bool DefaultVisitor::back_path
protectedinherited

Definition at line 157 of file DefaultVisitor.h.

Referenced by DefaultVisitor().

◆ back_track

◆ BinRepartTimer_m

IpplTimings::TimerRef ParallelTTracker::BinRepartTimer_m
private

Definition at line 226 of file ParallelTTracker.h.

Referenced by doBinaryRepartition(), ParallelTTracker(), and ParallelTTracker().

◆ cavities_m

FieldList Tracker::cavities_m
inherited

Definition at line 120 of file Tracker.h.

◆ deletedParticles_m

bool ParallelTTracker::deletedParticles_m
private

Definition at line 190 of file ParallelTTracker.h.

Referenced by computeExternalFields(), and execute().

◆ dtCurrentTrack_m

double ParallelTTracker::dtCurrentTrack_m
private

◆ emissionSteps_m

unsigned int ParallelTTracker::emissionSteps_m
private

Definition at line 219 of file ParallelTTracker.h.

Referenced by ParallelTTracker(), ParallelTTracker(), and prepareEmission().

◆ fieldEvaluationTimer_m

IpplTimings::TimerRef ParallelTTracker::fieldEvaluationTimer_m
private

Definition at line 225 of file ParallelTTracker.h.

Referenced by computeExternalFields(), ParallelTTracker(), and ParallelTTracker().

◆ flip_B

double DefaultVisitor::flip_B
protectedinherited

Definition at line 160 of file DefaultVisitor.h.

Referenced by DefaultVisitor().

◆ flip_s

double DefaultVisitor::flip_s
protectedinherited

Definition at line 161 of file DefaultVisitor.h.

Referenced by DefaultVisitor().

◆ globalEOL_m

bool ParallelTTracker::globalEOL_m
private

◆ itsBeamline_m

const Beamline& Tracker::itsBeamline_m
inherited

◆ itsBunch_m

PartBunchBase<double, 3>* Tracker::itsBunch_m
protectedinherited

The bunch of particles to be tracked.

Definition at line 151 of file Tracker.h.

Referenced by addToBunch(), ThickTracker::advanceDispersion_m(), ThickTracker::advanceParticles_m(), applyDrift(), ParallelTTracker::applyFractionalStep(), ParallelCyclotronTracker::applyPluginElements(), applyThinMultipole(), applyThinSBend(), applyTransform(), ParallelTTracker::autophaseCavities(), ParallelCyclotronTracker::bgf_main_collision_test(), ParallelCyclotronTracker::borisExternalFields(), ParallelCyclotronTracker::bunchDumpPhaseSpaceData(), ParallelCyclotronTracker::bunchDumpStatData(), ParallelCyclotronTracker::bunchMode_m(), ParallelCyclotronTracker::calcMeanP(), ParallelCyclotronTracker::calcMeanR(), ParallelTTracker::changeDT(), ParallelCyclotronTracker::checkFileMomentum(), ParallelCyclotronTracker::checkNumPart(), ParallelTTracker::computeExternalFields(), ParallelTTracker::computeParticleMatterInteraction(), ParallelCyclotronTracker::computePathLengthUpdate(), ParallelTTracker::computeSpaceChargeFields(), ParallelCyclotronTracker::computeSpaceChargeFields_m(), ParallelTTracker::computeWakefield(), ParallelCyclotronTracker::deleteParticle(), ParallelTTracker::doBinaryRepartition(), ThickTracker::dump_m(), ParallelTTracker::dumpStats(), ParallelTTracker::emitParticles(), ParallelTTracker::evenlyDistributeParticles(), ParallelCyclotronTracker::execute(), ParallelTTracker::execute(), ThickTracker::execute(), ParallelCyclotronTracker::finalizeTracking_m(), ParallelTTracker::findStartPosition(), ParallelCyclotronTracker::gapCrossKick_m(), ParallelCyclotronTracker::GenericTracker(), getBunch(), ParallelCyclotronTracker::getFieldsAtPoint(), ParallelCyclotronTracker::globalToLocal(), ParallelTTracker::hasEndOfLineReached(), ParallelCyclotronTracker::initDistInGlobalFrame(), ParallelCyclotronTracker::initializeTracking_m(), ParallelCyclotronTracker::initTrackOrbitFile(), ParallelCyclotronTracker::injectBunch(), ParallelCyclotronTracker::isMultiBunch(), ParallelCyclotronTracker::kick(), ParallelTTracker::kickParticles(), ParallelCyclotronTracker::localToGlobal(), ParallelCyclotronTracker::MtsTracker(), ParallelTTracker::prepareEmission(), ParallelCyclotronTracker::push(), ParallelTTracker::pushParticles(), ParallelCyclotronTracker::repartition(), ParallelCyclotronTracker::RFkick(), ParallelCyclotronTracker::rotateAroundX(), ParallelCyclotronTracker::rotateAroundZ(), ParallelCyclotronTracker::rotateWithQuaternion(), ParallelCyclotronTracker::saveInjectValues(), ParallelTTracker::selectDT(), ParallelCyclotronTracker::seoMode_m(), ParallelTTracker::setTime(), ParallelCyclotronTracker::setTimeStep(), ParallelCyclotronTracker::singleMode_m(), ParallelCyclotronTracker::singleParticleDump(), ParallelTTracker::timeIntegration2(), ThickTracker::track_m(), Tracker(), ParallelTTracker::transformBunch(), ParallelCyclotronTracker::update_m(), ThickTracker::update_m(), ThickTracker::updateParticle_m(), ParallelCyclotronTracker::updatePathLength(), ParallelTTracker::updateReferenceParticle(), ParallelTTracker::updateRefToLabCSTrafo(), ParallelCyclotronTracker::updateTime(), ParallelCyclotronTracker::visitCCollimator(), ParallelTTracker::visitCCollimator(), visitComponent(), ParallelTTracker::visitCorrector(), ParallelCyclotronTracker::visitCyclotron(), ParallelTTracker::visitDegrader(), ParallelTTracker::visitDrift(), ThickTracker::visitDrift(), ParallelTTracker::visitFlexibleCollimator(), ParallelTTracker::visitMarker(), ParallelTTracker::visitMonitor(), ParallelTTracker::visitMultipole(), ThickTracker::visitMultipole(), ParallelTTracker::visitMultipoleT(), ParallelCyclotronTracker::visitOutputPlane(), ParallelCyclotronTracker::visitProbe(), ParallelTTracker::visitProbe(), ParallelTTracker::visitRBend(), ParallelTTracker::visitRBend3D(), ParallelCyclotronTracker::visitRFCavity(), ParallelTTracker::visitRFCavity(), ParallelCyclotronTracker::visitRing(), ParallelTTracker::visitSBend(), ThickTracker::visitSBend(), ParallelCyclotronTracker::visitSeptum(), ParallelTTracker::visitSeptum(), ParallelTTracker::visitSolenoid(), ParallelTTracker::visitSource(), ParallelCyclotronTracker::visitStripper(), ParallelTTracker::visitTravelingWave(), ParallelCyclotronTracker::visitVacuum(), ParallelTTracker::visitVacuum(), and ParallelTTracker::writePhaseSpace().

◆ itsDataSink_m

DataSink* ParallelTTracker::itsDataSink_m
private

◆ itsLine

const Beamline& DefaultVisitor::itsLine
protectedinherited

Definition at line 152 of file DefaultVisitor.h.

Referenced by DefaultVisitor(), and execute().

◆ itsOpalBeamline_m

◆ itsReference

◆ local_flip

bool DefaultVisitor::local_flip
privateinherited

Definition at line 176 of file DefaultVisitor.h.

Referenced by DefaultVisitor(), execute(), visitBeamline(), and visitFlaggedElmPtr().

◆ minBinEmitted_m

◆ minStepforReBin_m

int ParallelTTracker::minStepforReBin_m
private

◆ numParticlesInSimulation_m

size_t ParallelTTracker::numParticlesInSimulation_m
private

◆ particleMatterStatus_m

bool ParallelTTracker::particleMatterStatus_m
private

◆ pathLength_m

◆ repartFreq_m

unsigned int ParallelTTracker::repartFreq_m
private

◆ stepSizes_m

StepSizeConfig ParallelTTracker::stepSizes_m
private

stores informations where to change the time step and where to stop the simulation, the time step sizes and the number of time steps with each configuration

Definition at line 203 of file ParallelTTracker.h.

Referenced by execute(), findStartPosition(), ParallelTTracker(), and writePhaseSpace().

◆ timeIntegrationTimer1_m

IpplTimings::TimerRef ParallelTTracker::timeIntegrationTimer1_m
private

Definition at line 223 of file ParallelTTracker.h.

Referenced by ParallelTTracker(), ParallelTTracker(), and timeIntegration1().

◆ timeIntegrationTimer2_m

IpplTimings::TimerRef ParallelTTracker::timeIntegrationTimer2_m
private

Definition at line 224 of file ParallelTTracker.h.

Referenced by ParallelTTracker(), ParallelTTracker(), and timeIntegration2().

◆ WakeFieldTimer_m

IpplTimings::TimerRef ParallelTTracker::WakeFieldTimer_m
private

Definition at line 227 of file ParallelTTracker.h.

Referenced by computeWakefield(), ParallelTTracker(), and ParallelTTracker().

◆ wakeFunction_m

WakeFunction* ParallelTTracker::wakeFunction_m
private

Definition at line 192 of file ParallelTTracker.h.

Referenced by computeWakefield(), ParallelTTracker(), and ParallelTTracker().

◆ wakeStatus_m

bool ParallelTTracker::wakeStatus_m
private

Definition at line 188 of file ParallelTTracker.h.

Referenced by computeWakefield(), execute(), ParallelTTracker(), and ParallelTTracker().

◆ zstart_m

double ParallelTTracker::zstart_m
private

where to start

Definition at line 197 of file ParallelTTracker.h.

Referenced by applyFractionalStep(), execute(), findStartPosition(), ParallelTTracker(), and ParallelTTracker().


The documentation for this class was generated from the following files: