|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
#include <OrbitThreader.h>

Classes | |
| struct | elementPosition |
| struct | elementPositionComp |
Public Member Functions | |
| OrbitThreader (const PartData &ref, const Vector_t< double, 3 > &r, const Vector_t< double, 3 > &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 |
| const ReferencePathModel & | getReferencePathModel () const |
| Return the threader-owned reference-path model. | |
| const ReferencePathModel & | getActionRangeRegistrationModel () const |
| Return the action-range registration model. | |
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< double, 3 > &r, const Vector_t< double, 3 > &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< double, 3 > &position, const Vector_t< double, 3 > &direction) const |
| void | checkElementLengths (const std::set< std::shared_ptr< Component > > &elements) |
Private Attributes | |
| Vector_t< double, 3 > | r_m |
| position of reference particle in lab coordinates | |
| Vector_t< double, 3 > | 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::shared_ptr< Component >, elementPosition, std::owner_less< std::shared_ptr< Component > > > | elementRegistry_m |
| ReferencePathModel | actionRangeRegistrationModel_m |
Definition at line 38 of file OrbitThreader.h.
| struct OrbitThreader::elementPosition |
Definition at line 110 of file OrbitThreader.h.

| Class Members | ||
|---|---|---|
| double | elementEdge_m | |
| double | endField_m | |
| double | startField_m | |
| OrbitThreader::OrbitThreader | ( | const PartData & | ref, |
| const Vector_t< double, 3 > & | r, | ||
| const Vector_t< double, 3 > & | p, | ||
| double | s, | ||
| double | maxDiffZBunch, | ||
| double | t, | ||
| double | dT, | ||
| StepSizeConfig | stepSizes, | ||
| OpalBeamline & | bl | ||
| ) |
Definition at line 46 of file OrbitThreader.cpp.
References Util::combineFilePath(), computeBoundingBox(), distTrackBack_m, dt_m, ValueRange< T >::enlargeIfOutside(), OpalData::getInstance(), StepSizeConfig::getNumStepsFinestResolution(), StepSizeConfig::getPathLengthRange(), logger_m, loggingFrequency_m, pathLength_m, pathLengthRange_m, stepRange_m, stepSizes_m, OpalData::WRITE, and zstop_m.

|
private |
Definition at line 293 of file OrbitThreader.cpp.
References Options::autoPhase, dt_m, CavityAutophaser::getPhaseAtMaxEnergy(), itsOpalBeamline_m, p_m, r_m, reference_m, RFCAVITY, OpalBeamline::rotateToLocalCS(), time_m, OpalBeamline::transformToLocalCS(), and TRAVELINGWAVE.
Referenced by execute().

|
private |
Definition at line 93 of file OrbitThreader.cpp.
References Physics::c, euclidean_norm(), StepSizeConfig::getdT(), Util::getGamma(), StepSizeConfig::getZStop(), p_m, pathLength_m, StepSizeConfig::reachedEnd(), and stepSizes_m.
Referenced by execute().

|
private |
Definition at line 456 of file OrbitThreader.cpp.
References ANY, BoundingBox::enlargeToContainBoundingBox(), OpalBeamline::getElementByType(), globalBoundingBox_m, itsOpalBeamline_m, MARKER, and updateBoundingBoxWithCurrentPosition().
Referenced by OrbitThreader().

|
private |
Definition at line 479 of file OrbitThreader.cpp.
References DRIFT, euclidean_norm(), BoundingBox::getIntersectionPoint(), and globalBoundingBox_m.
Referenced by execute(), and trackBack().

|
private |
Definition at line 279 of file OrbitThreader.cpp.
References RFCAVITY, and TRAVELINGWAVE.
Referenced by execute().
| void OrbitThreader::execute | ( | ) |
Definition at line 122 of file OrbitThreader.cpp.
References IndexMap::add(), ANY, autophaseCavities(), Physics::c, checkElementLengths(), computeDriftLengthToBoundingBox(), containsCavity(), currentStep_m, dt_m, ValueRange< T >::enlargeIfOutside(), EOL, errorFlag_m, EVERYTHINGFINE, OpalBeamline::getElementByType(), OpalBeamline::getElements(), gmsg, HITMATERIAL, imap_m, integrate(), integrator_m, ValueRange< T >::isInside(), ValueRange< T >::isOutside(), itsOpalBeamline_m, p_m, pathLength_m, pathLengthRange_m, processElementRegister(), BorisPusher::push(), r_m, registerElement(), IndexMap::saveSDDS(), setDesignEnergy(), stepRange_m, IndexMap::tidyUp(), trackBack(), updateBoundingBoxWithCurrentPosition(), and zstop_m.
Referenced by ParallelTracker::execute(), TEST_F(), and TEST_F().

|
inline |
Return the action-range registration model.
This model is distinct from the traced reference-path occupancy model. It records the element passages that are later converted into backward-compatible action ranges and legacy ELEMEDGE-anchored intervals on the elements.
Definition at line 169 of file OrbitThreader.h.
References actionRangeRegistrationModel_m.
|
inline |
Definition at line 163 of file OrbitThreader.h.
References globalBoundingBox_m.
Referenced by ParallelTracker::execute().
|
private |
Definition at line 313 of file OrbitThreader.cpp.
References RFCavity::getDesignEnergy(), RFCAVITY, and TRAVELINGWAVE.

|
inline |
Definition at line 154 of file OrbitThreader.h.
References IndexMap::getRange(), and imap_m.

|
inline |
Return the threader-owned reference-path model.
This model stores the ordered active-element sets on the reporting coordinate \(s\) that are traced by the reference particle through the summed fields. In other words, it is the occupancy model derived from the reference-particle integration, not a privileged-element ownership model. The returned reference remains owned by the OrbitThreader.
Definition at line 165 of file OrbitThreader.h.
References IndexMap::getReferencePathModel(), and imap_m.
Referenced by TEST_F(), and TEST_F().

|
inline |
Definition at line 159 of file OrbitThreader.h.
References IndexMap::getTouchingElements(), and imap_m.

|
private |
Definition at line 199 of file OrbitThreader.cpp.
References Physics::c, currentStep_m, dot(), dt_m, BoundingBox::enlargeToContainPosition(), EOL, errorFlag_m, euclidean_norm(), Units::eV2MeV, EVERYTHINGFINE, OpalBeamline::getCSTrafoLab2Local(), OpalBeamline::getElements(), OpalData::getInstance(), PartData::getM(), PartData::getQ(), globalBoundingBox_m, HITMATERIAL, integrator_m, ValueRange< T >::isOutside(), itsOpalBeamline_m, BorisPusher::kick(), logger_m, loggingFrequency_m, p_m, pathLength_m, pathLengthRange_m, BorisPusher::push(), r_m, reference_m, OpalBeamline::rotateFromLocalCS(), OpalBeamline::rotateToLocalCS(), Units::s2ns, stepRange_m, time_m, OpalBeamline::transformToLocalCS(), and zstop_m.
Referenced by execute(), and trackBack().

|
private |
Definition at line 386 of file OrbitThreader.cpp.
References actionRangeRegistrationModel_m, ReferencePathModel::clear(), elementRegistry_m, ReferencePathSegment::getBegin(), and ReferencePathSegment::getEnd().
Referenced by execute().

|
inline |
Definition at line 149 of file OrbitThreader.h.
References imap_m, and IndexMap::query().
Referenced by ParallelTracker::computeExternalFields().

|
private |
Definition at line 357 of file OrbitThreader.cpp.
References elementRegistry_m, euclidean_norm(), itsOpalBeamline_m, pathLength_m, OpalBeamline::rotateToLocalCS(), and OpalBeamline::transformToLocalCS().
Referenced by execute().

|
private |
Definition at line 440 of file OrbitThreader.cpp.
References dot(), PartData::getM(), p_m, reference_m, RFCAVITY, and TRAVELINGWAVE.
Referenced by execute().

|
private |
Definition at line 329 of file OrbitThreader.cpp.
References Physics::c, computeDriftLengthToBoundingBox(), currentStep_m, distTrackBack_m, dt_m, ValueRange< T >::enlargeIfOutside(), OpalBeamline::getElements(), integrate(), integrator_m, itsOpalBeamline_m, p_m, pathLength_m, pathLengthRange_m, BorisPusher::push(), r_m, and stepRange_m.
Referenced by execute().

|
private |
Definition at line 470 of file OrbitThreader.cpp.
References Physics::c, dt_m, BoundingBox::enlargeToContainPosition(), Util::getGamma(), globalBoundingBox_m, p_m, and r_m.
Referenced by computeBoundingBox(), and execute().

|
private |
Definition at line 126 of file OrbitThreader.h.
Referenced by getActionRangeRegistrationModel(), and processElementRegister().
|
private |
Definition at line 90 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 84 of file OrbitThreader.h.
Referenced by OrbitThreader(), and trackBack().
|
private |
the time step
Definition at line 88 of file OrbitThreader.h.
Referenced by autophaseCavities(), execute(), integrate(), OrbitThreader(), trackBack(), and updateBoundingBoxWithCurrentPosition().
|
private |
Definition at line 125 of file OrbitThreader.h.
Referenced by processElementRegister(), and registerElement().
|
private |
Definition at line 100 of file OrbitThreader.h.
Referenced by execute(), and integrate().
|
private |
Definition at line 108 of file OrbitThreader.h.
Referenced by computeBoundingBox(), computeDriftLengthToBoundingBox(), getBoundingBox(), integrate(), and updateBoundingBoxWithCurrentPosition().
|
private |
Definition at line 98 of file OrbitThreader.h.
Referenced by execute(), getRange(), getReferencePathModel(), getTouchingElements(), and query().
|
private |
Definition at line 102 of file OrbitThreader.h.
Referenced by execute(), integrate(), and trackBack().
|
private |
Definition at line 97 of file OrbitThreader.h.
Referenced by autophaseCavities(), computeBoundingBox(), execute(), integrate(), registerElement(), and trackBack().
|
private |
Definition at line 105 of file OrbitThreader.h.
Referenced by integrate(), and OrbitThreader().
|
private |
Definition at line 106 of file OrbitThreader.h.
Referenced by integrate(), and OrbitThreader().
|
private |
momentum of reference particle
Definition at line 79 of file OrbitThreader.h.
Referenced by autophaseCavities(), checkElementLengths(), execute(), integrate(), setDesignEnergy(), trackBack(), and updateBoundingBoxWithCurrentPosition().
|
private |
position of reference particle in path length
Definition at line 81 of file OrbitThreader.h.
Referenced by checkElementLengths(), execute(), integrate(), OrbitThreader(), registerElement(), and trackBack().
|
private |
Definition at line 95 of file OrbitThreader.h.
Referenced by execute(), integrate(), OrbitThreader(), and trackBack().
|
private |
position of reference particle in lab coordinates
Definition at line 77 of file OrbitThreader.h.
Referenced by autophaseCavities(), execute(), integrate(), trackBack(), and updateBoundingBoxWithCurrentPosition().
|
private |
Definition at line 103 of file OrbitThreader.h.
Referenced by autophaseCavities(), integrate(), and setDesignEnergy().
|
private |
Definition at line 89 of file OrbitThreader.h.
Referenced by execute(), integrate(), OrbitThreader(), and trackBack().
|
private |
final position in path length
Definition at line 93 of file OrbitThreader.h.
Referenced by checkElementLengths(), and OrbitThreader().
|
private |
the simulated time
Definition at line 86 of file OrbitThreader.h.
Referenced by autophaseCavities(), and integrate().
|
private |
Definition at line 94 of file OrbitThreader.h.
Referenced by execute(), integrate(), and OrbitThreader().