|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <OrbitThreader.h>
Classes | |
| struct | elementPosition |
| struct | elementPositionComp |
Public Member Functions | |
| OrbitThreader (const PartData &ref, const Vector_t &r, const Vector_t &p, double s, double maxDiffZBunch, double t, double dT, StepSizeConfig stepSizes, OpalBeamline &bl) | |
| void | execute () |
| IndexMap::value_t | query (IndexMap::key_t::first_type step, IndexMap::key_t::second_type length) |
| IndexMap::key_t | getRange (const IndexMap::value_t::value_type &element, double position) const |
| IndexMap::value_t | getTouchingElements (const IndexMap::key_t &range) const |
| BoundingBox | getBoundingBox () const |
Private Member Functions | |
| void | trackBack () |
| void | integrate (const IndexMap::value_t &activeSet, double maxDrift=10.0) |
| bool | containsCavity (const IndexMap::value_t &activeSet) |
| void | autophaseCavities (const IndexMap::value_t &activeSet, const std::set< std::string > &visitedElements) |
| double | getMaxDesignEnergy (const IndexMap::value_t &elementSet) const |
| void | registerElement (const IndexMap::value_t &elementSet, double, const Vector_t &r, const Vector_t &p) |
| void | processElementRegister () |
| void | setDesignEnergy (FieldList &allElements, const std::set< std::string > &visitedElements) |
| void | computeBoundingBox () |
| void | updateBoundingBoxWithCurrentPosition () |
| double | computeDriftLengthToBoundingBox (const std::set< std::shared_ptr< Component > > &elements, const Vector_t &position, const Vector_t &direction) const |
| void | checkElementLengths (const std::set< std::shared_ptr< Component > > &elements) |
Private Attributes | |
| Vector_t | r_m |
| position of reference particle in lab coordinates | |
| Vector_t | p_m |
| momentum of reference particle | |
| double | pathLength_m |
| position of reference particle in path length | |
| double | distTrackBack_m |
| double | time_m |
| the simulated time | |
| double | dt_m |
| the time step | |
| ValueRange< long > | stepRange_m |
| long | currentStep_m {0} |
| StepSizeConfig | stepSizes_m |
| final position in path length | |
| const double | zstop_m |
| ValueRange< double > | pathLengthRange_m |
| OpalBeamline & | itsOpalBeamline_m |
| IndexMap | imap_m |
| unsigned int | errorFlag_m |
| BorisPusher | integrator_m |
| const PartData & | reference_m |
| std::ofstream | logger_m |
| size_t | loggingFrequency_m |
| BoundingBox | globalBoundingBox_m |
| std::multimap< std::string, elementPosition > | elementRegistry_m |
Definition at line 36 of file OrbitThreader.h.
| struct OrbitThreader::elementPosition |
Definition at line 96 of file OrbitThreader.h.
| Class Members | ||
|---|---|---|
| double | elementEdge_m | |
| double | endField_m | |
| double | startField_m | |
| OrbitThreader::OrbitThreader | ( | const PartData & | ref, |
| const Vector_t & | r, | ||
| const Vector_t & | p, | ||
| double | s, | ||
| double | maxDiffZBunch, | ||
| double | t, | ||
| double | dT, | ||
| StepSizeConfig | stepSizes, | ||
| OpalBeamline & | bl ) |
Definition at line 47 of file OrbitThreader.cpp.
References Util::combineFilePath(), computeBoundingBox(), copysign(), distTrackBack_m, dt_m, errorFlag_m, OpalData::getInstance(), integrator_m, itsOpalBeamline_m, logger_m, loggingFrequency_m, IpplInfo::myNode(), p_m, pathLength_m, pathLengthRange_m, r_m, reference_m, stepRange_m, stepSizes_m, time_m, OpalData::WRITE, and zstop_m.
|
private |
Definition at line 300 of file OrbitThreader.cpp.
References Options::autoPhase, dt_m, end(), CavityAutophaser::getPhaseAtMaxEnergy(), itsOpalBeamline_m, p_m, r_m, reference_m, RFCAVITY, time_m, and TRAVELINGWAVE.
Referenced by execute().
|
private |
Definition at line 111 of file OrbitThreader.cpp.
References Physics::c, euclidean_norm(), Util::getGamma(), p_m, pathLength_m, and stepSizes_m.
Referenced by execute().
|
private |
Definition at line 455 of file OrbitThreader.cpp.
References ANY, end(), globalBoundingBox_m, itsOpalBeamline_m, MARKER, and updateBoundingBoxWithCurrentPosition().
Referenced by OrbitThreader().
|
private |
Definition at line 479 of file OrbitThreader.cpp.
References DRIFT, euclidean_norm(), and globalBoundingBox_m.
Referenced by execute(), and trackBack().
|
private |
Definition at line 286 of file OrbitThreader.cpp.
References end(), RFCAVITY, and TRAVELINGWAVE.
Referenced by execute().
| void OrbitThreader::execute | ( | ) |
Definition at line 134 of file OrbitThreader.cpp.
References ANY, autophaseCavities(), Physics::c, checkElementLengths(), computeDriftLengthToBoundingBox(), containsCavity(), currentStep_m, dt_m, end(), endl(), EOL, errorFlag_m, EVERYTHINGFINE, gmsg, HITMATERIAL, imap_m, integrate(), integrator_m, itsOpalBeamline_m, level1(), p_m, pathLength_m, pathLengthRange_m, processElementRegister(), r_m, registerElement(), setDesignEnergy(), stepRange_m, trackBack(), updateBoundingBoxWithCurrentPosition(), and zstop_m.
Referenced by ParallelTTracker::execute().
|
inline |
Definition at line 146 of file OrbitThreader.h.
References globalBoundingBox_m.
Referenced by ParallelTTracker::execute().
|
private |
Definition at line 325 of file OrbitThreader.cpp.
References end(), RFCavity::getDesignEnergy(), RFCAVITY, and TRAVELINGWAVE.
|
inline |
Definition at line 135 of file OrbitThreader.h.
References imap_m.
Referenced by ParallelTTracker::computeParticleMatterInteraction().
|
inline |
Definition at line 141 of file OrbitThreader.h.
References imap_m.
Referenced by ParallelTTracker::computeParticleMatterInteraction().
|
private |
Definition at line 208 of file OrbitThreader.cpp.
References Physics::c, currentStep_m, dot(), dt_m, end(), EOL, errorFlag_m, euclidean_norm(), Units::eV2MeV, EVERYTHINGFINE, OpalData::getInstance(), globalBoundingBox_m, HITMATERIAL, integrator_m, itsOpalBeamline_m, logger_m, loggingFrequency_m, IpplInfo::myNode(), p_m, pathLength_m, pathLengthRange_m, r_m, reference_m, Units::s2ns, sqrt(), stepRange_m, time_m, and zstop_m.
Referenced by execute(), and trackBack().
|
private |
Definition at line 402 of file OrbitThreader.cpp.
References ANY, elementRegistry_m, end(), itsOpalBeamline_m, and name.
Referenced by execute().
|
inline |
Definition at line 129 of file OrbitThreader.h.
References imap_m.
Referenced by ParallelTTracker::computeExternalFields().
|
private |
Definition at line 370 of file OrbitThreader.cpp.
References elementRegistry_m, end(), euclidean_norm(), itsOpalBeamline_m, name, and pathLength_m.
Referenced by execute().
|
private |
Definition at line 439 of file OrbitThreader.cpp.
References dot(), end(), p_m, reference_m, RFCAVITY, sqrt(), and TRAVELINGWAVE.
Referenced by execute().
|
private |
Definition at line 342 of file OrbitThreader.cpp.
References Physics::c, computeDriftLengthToBoundingBox(), currentStep_m, distTrackBack_m, dt_m, integrate(), integrator_m, itsOpalBeamline_m, p_m, pathLength_m, pathLengthRange_m, r_m, and stepRange_m.
Referenced by execute().
|
private |
Definition at line 472 of file OrbitThreader.cpp.
References Physics::c, dt_m, Util::getGamma(), globalBoundingBox_m, p_m, and r_m.
Referenced by computeBoundingBox(), and execute().
|
private |
Definition at line 76 of file OrbitThreader.h.
Referenced by execute(), integrate(), and trackBack().
|
private |
distance to track back before tracking forward (length of bunch but not beyond cathode)
Definition at line 70 of file OrbitThreader.h.
Referenced by OrbitThreader(), and trackBack().
|
private |
the time step
Definition at line 74 of file OrbitThreader.h.
Referenced by autophaseCavities(), execute(), integrate(), OrbitThreader(), trackBack(), and updateBoundingBoxWithCurrentPosition().
|
private |
Definition at line 108 of file OrbitThreader.h.
Referenced by processElementRegister(), and registerElement().
|
private |
Definition at line 86 of file OrbitThreader.h.
Referenced by execute(), integrate(), and OrbitThreader().
|
private |
Definition at line 94 of file OrbitThreader.h.
Referenced by computeBoundingBox(), computeDriftLengthToBoundingBox(), getBoundingBox(), integrate(), and updateBoundingBoxWithCurrentPosition().
|
private |
Definition at line 84 of file OrbitThreader.h.
Referenced by execute(), getRange(), getTouchingElements(), and query().
|
private |
Definition at line 88 of file OrbitThreader.h.
Referenced by execute(), integrate(), OrbitThreader(), and trackBack().
|
private |
Definition at line 83 of file OrbitThreader.h.
Referenced by autophaseCavities(), computeBoundingBox(), execute(), integrate(), OrbitThreader(), processElementRegister(), registerElement(), and trackBack().
|
private |
Definition at line 91 of file OrbitThreader.h.
Referenced by integrate(), and OrbitThreader().
|
private |
Definition at line 92 of file OrbitThreader.h.
Referenced by integrate(), and OrbitThreader().
|
private |
momentum of reference particle
Definition at line 65 of file OrbitThreader.h.
Referenced by autophaseCavities(), checkElementLengths(), execute(), integrate(), OrbitThreader(), setDesignEnergy(), trackBack(), and updateBoundingBoxWithCurrentPosition().
|
private |
position of reference particle in path length
Definition at line 67 of file OrbitThreader.h.
Referenced by checkElementLengths(), execute(), integrate(), OrbitThreader(), registerElement(), and trackBack().
|
private |
Definition at line 81 of file OrbitThreader.h.
Referenced by execute(), integrate(), OrbitThreader(), and trackBack().
|
private |
position of reference particle in lab coordinates
Definition at line 63 of file OrbitThreader.h.
Referenced by autophaseCavities(), execute(), integrate(), OrbitThreader(), trackBack(), and updateBoundingBoxWithCurrentPosition().
|
private |
Definition at line 89 of file OrbitThreader.h.
Referenced by autophaseCavities(), integrate(), OrbitThreader(), and setDesignEnergy().
|
private |
Definition at line 75 of file OrbitThreader.h.
Referenced by execute(), integrate(), OrbitThreader(), and trackBack().
|
private |
final position in path length
Definition at line 79 of file OrbitThreader.h.
Referenced by checkElementLengths(), and OrbitThreader().
|
private |
the simulated time
Definition at line 72 of file OrbitThreader.h.
Referenced by autophaseCavities(), integrate(), and OrbitThreader().
|
private |
Definition at line 80 of file OrbitThreader.h.
Referenced by execute(), integrate(), and OrbitThreader().