|
OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
|
#include <TrackRun.h>


Public Member Functions | |
| TrackRun () | |
| Exemplar constructor. More... | |
| virtual | ~TrackRun () |
| virtual TrackRun * | clone (const std::string &name) |
| Make clone. More... | |
| virtual void | execute () |
| Execute the command. More... | |
| Inform & | print (Inform &os) const |
Public Member Functions inherited from Action | |
| virtual | ~Action () |
| virtual bool | canReplaceBy (Object *object) |
| Test if replacement is allowed. More... | |
| virtual const std::string | getCategory () const |
| Return the object category as a string. More... | |
| virtual bool | shouldTrace () const |
| Trace flag. More... | |
| virtual bool | shouldUpdate () const |
| Update flag. More... | |
Public Member Functions inherited from Object | |
| virtual | ~Object () |
| void | copyAttributes (const Object &) |
| Copy attributes from another object. More... | |
| virtual Attribute * | findAttribute (const std::string &name) |
| Find an attribute by name. More... | |
| virtual const Attribute * | findAttribute (const std::string &name) const |
| Find an attribute by name. More... | |
| virtual Object * | makeTemplate (const std::string &, TokenStream &, Statement &) |
| Macro handler function. More... | |
| virtual Object * | makeInstance (const std::string &name, Statement &, const Parser *) |
| Macro handler function. More... | |
| virtual void | parse (Statement &) |
| Parse the object. More... | |
| virtual void | parseShortcut (Statement &, bool eval=true) |
| Parser for single-attribute commands. More... | |
| virtual void | print (std::ostream &) const |
| Print the object. More... | |
| virtual void | printValue (std::ostream &) const |
| virtual void | printHelp (std::ostream &) const |
| Print help. More... | |
| virtual void | replace (Object *oldObject, Object *newObject) |
| Replace references. More... | |
| virtual void | update () |
| Update this object. More... | |
| bool | isBuiltin () const |
| True, if [b]this[/b] is a built-in object. More... | |
| virtual bool | isShared () const |
| Shared flag. More... | |
| virtual void | setShared (bool) |
| Set/reset shared flag. More... | |
| void | setDirty (bool) |
| Set/reset the [b]modified[/b] flag. More... | |
| bool | isDirty () const |
| True, if the [b]modified[/b] flag is set. More... | |
| void | setFlag (bool) |
| Flag/unflag this object, e. g. to control output of objects for. More... | |
| bool | isFlagged () const |
| True, if [b]this[/b] is flagged by setFlag(true). More... | |
| const Object * | getBaseObject () const |
| Return the object's base type object. More... | |
| const std::string & | getOpalName () const |
| Return object name. More... | |
| Object * | getParent () const |
| Return parent pointer. More... | |
| bool | isTreeMember (const Object *subTree) const |
| Test for tree membership. More... | |
| void | setOpalName (const std::string &name) |
| Set object name. More... | |
| void | setParent (Object *) |
| Set parent object. More... | |
| void | clear () |
| Clear the occurrence counter. More... | |
| int | increment () |
| Increment and return the occurrence counter. More... | |
| int | occurrenceCount () |
| Return the occurrence counter. More... | |
| void | registerReference (Invalidator *a) |
| Register a reference to this object. More... | |
| void | unregisterReference (Invalidator *a) |
| Unegister a reference to this object. More... | |
| void | registerOwnership (const AttributeHandler::OwnerType &itsClass) const |
Public Member Functions inherited from RCObject | |
| int | addReference () const |
| Increment reference count. More... | |
| int | removeReference () const |
| Decrement the reference count. More... | |
| bool | isShared () const |
| Test for sharing. More... | |
Static Public Member Functions | |
| static std::shared_ptr< Tracker > | getTracker () |
Private Types | |
| enum | RunMethod : unsigned short { RunMethod::NONE, RunMethod::PARALLELT, RunMethod::CYCLOTRONT, RunMethod::THICK } |
Private Member Functions | |
| TrackRun (const TrackRun &) | |
| void | operator= (const TrackRun &) |
| TrackRun (const std::string &name, TrackRun *parent) | |
| void | setRunMethod () |
| std::string | getRunMethodName () const |
| void | setupTTracker () |
| void | setupCyclotronTracker () |
| void | setupThickTracker () |
| void | setupFieldsolver () |
| void | initPhaseSpaceSink () |
| void | initDataSink (const int &numBunch=1) |
| void | setBoundaryGeometry () |
| double | setDistributionParallelT (Beam *beam) |
Private Attributes | |
| Distribution * | dist_m |
| std::vector< Distribution * > | distrs_m |
| FieldSolver * | fieldSolver_m |
| DataSink * | dataSink_m |
| H5PartWrapper * | phaseSpaceSink_m |
| OpalData * | opalData_m |
| bool | isFollowupTrack_m |
| RunMethod | method_m |
| double | macromass_m |
| double | macrocharge_m |
Static Private Attributes | |
| static std::shared_ptr< Tracker > | itsTracker_m = nullptr |
| static const std::string | defaultDistribution |
| static const boost::bimap < RunMethod, std::string > | stringMethod_s |
Additional Inherited Members | |
Public Attributes inherited from Object | |
| std::vector< Attribute > | itsAttr |
| The object attributes. More... | |
Protected Member Functions inherited from Action | |
| Action (int size, const char *name, const char *help) | |
| Constructor for exemplars. More... | |
| Action (const std::string &name, Action *parent) | |
| Constructor for cloning. More... | |
Protected Member Functions inherited from Object | |
| Object (int size, const char *name, const char *help) | |
| Constructor for exemplars. More... | |
| Object (const std::string &name, Object *parent) | |
| Constructor for clones. More... | |
Protected Member Functions inherited from RCObject | |
| RCObject () | |
| Default constructor. More... | |
| RCObject (const RCObject &) | |
| Copy constructor. More... | |
| virtual | ~RCObject ()=0 |
| RCObject & | operator= (const RCObject &right) |
Protected Attributes inherited from Object | |
| bool | builtin |
| Built-in flag. More... | |
| bool | modified |
| Dirty flag. More... | |
| bool | flagged |
| Object flag. More... | |
Definition at line 38 of file TrackRun.h.
|
strongprivate |
| Enumerator | |
|---|---|
| NONE | |
| PARALLELT | |
| CYCLOTRONT | |
| THICK | |
Definition at line 58 of file TrackRun.h.
| TrackRun::TrackRun | ( | ) |
Exemplar constructor.
Definition at line 93 of file TrackRun.cpp.
References Attrib::Legacy::Distribution::DISTRIBUTION, OpalData::getInstance(), Object::itsAttr, Attributes::makeBool(), Attributes::makePredefinedString(), Attributes::makeReal(), Attributes::makeString(), Attributes::makeStringArray(), opalData_m, Object::registerOwnership(), and AttributeHandler::SUB_COMMAND.
Referenced by clone().

|
virtual |
Definition at line 160 of file TrackRun.cpp.
References phaseSpaceSink_m.
|
private |
|
private |
Definition at line 146 of file TrackRun.cpp.
References OpalData::getInstance(), and opalData_m.

|
virtual |
Make clone.
Implements Object.
Definition at line 165 of file TrackRun.cpp.
References TrackRun().

|
virtual |
Execute the command.
Reimplemented from Object.
Definition at line 170 of file TrackRun.cpp.
References begin, OpalData::bunchIsAllocated(), Versions::changes, CYCLOTRONT, Attrib::Legacy::Distribution::DISTRIBUTION, endl(), Attributes::getReal(), OpalData::hasBunchAllocated(), isFollowupTrack_m, it, Object::itsAttr, itsTracker_m, method_m, OPAL_VERSION_MAJOR, OPAL_VERSION_MINOR, opalData_m, PARALLELT, OpalData::setRestartRun(), setRunMethod(), setupCyclotronTracker(), setupThickTracker(), setupTTracker(), THICK, and Options::version.

|
private |
Definition at line 265 of file TrackRun.cpp.
References method_m, and stringMethod_s.
Referenced by print().
|
static |
Definition at line 733 of file TrackRun.cpp.
References itsTracker_m.
Referenced by PyOpal::Field::get_field_value(), and PyOpal::Field::getRing().
|
private |
Definition at line 611 of file TrackRun.cpp.
References DataSink::changeH5Wrapper(), dataSink_m, OpalData::getDataSink(), OpalData::hasDataSinkAllocated(), OpalData::inRestartRun(), opalData_m, phaseSpaceSink_m, and OpalData::setDataSink().
Referenced by setupCyclotronTracker(), setupThickTracker(), and setupTTracker().

|
private |
Definition at line 575 of file TrackRun.cpp.
References Options::enableHDF5, OpalData::getInputBasename(), OpalData::getRestartFileName(), OpalData::getRestartStep(), OpalData::inRestartRun(), isFollowupTrack_m, OpalData::isInOPALCyclMode(), opalData_m, and phaseSpaceSink_m.
Referenced by setupCyclotronTracker(), setupThickTracker(), and setupTTracker().

Definition at line 709 of file TrackRun.cpp.
References abs(), Track::block, CYCLOTRONT, Track::dT, endl(), Attributes::getReal(), getRunMethodName(), isFollowupTrack_m, Object::itsAttr, Track::localTimeSteps, macrocharge_m, macromass_m, method_m, Options::psDumpFreq, Options::statDumpFreq, and Track::stepsPerTurn.
Referenced by operator<<().

|
private |
Definition at line 625 of file TrackRun.cpp.
References BoundaryGeometry::clone(), BoundaryGeometry::find(), Attributes::getString(), OpalData::hasGlobalGeometry(), Object::itsAttr, opalData_m, and OpalData::setGlobalGeometry().
Referenced by setupCyclotronTracker(), setupThickTracker(), and setupTTracker().

|
private |
Definition at line 638 of file TrackRun.cpp.
References Track::block, Track::bunch, defaultDistribution, dist_m, distribution, Attrib::Legacy::Distribution::DISTRIBUTION, distrs_m, Distribution::doRestartOpalT(), endl(), Distribution::find(), Beam::getChargePerParticle(), Distribution::getEmissionTimeShift(), Beam::getNumberOfParticles(), OpalData::getRestartStep(), Attributes::getStringArray(), Distribution::getTEmission(), OpalData::inRestartRun(), isFollowupTrack_m, Object::itsAttr, opalData_m, phaseSpaceSink_m, PartBunchBase< T, Dim >::setDistribution(), OpalData::setGlobalPhaseShift(), and Distribution::setNumberOfDistributions().
Referenced by setupThickTracker(), and setupTTracker().

|
private |
Definition at line 253 of file TrackRun.cpp.
References Attributes::getString(), it, Object::itsAttr, method_m, and stringMethod_s.
Referenced by execute().

|
private |
getFrequency() gets RF frequency [MHz], NOT isochronous revolution frequency of particle! getCurrent() gets beamcurrent [A]
Definition at line 428 of file TrackRun.cpp.
References abs(), Track::block, Track::bunch, PartBunchBase< T, Dim >::calcBeamParameters(), dataSink_m, defaultDistribution, dist_m, Attrib::Legacy::Distribution::DISTRIBUTION, Distribution::doRestartOpalCycl(), endl(), Physics::epsilon_0, BeamSequence::fetchLine(), fieldSolver_m, Beam::find(), Distribution::find(), H5PartWrapperForPC::getAzimuth(), Beam::getCharge(), Beam::getChargePerParticle(), Beam::getCurrent(), H5PartWrapperForPC::getElevation(), Beam::getFrequency(), Beam::getMass(), Beam::getMassPerParticle(), H5PartWrapperForPC::getMeanMomentum(), Beam::getNumberOfParticles(), Beam::getParticleName(), H5PartWrapperForPC::getPreviousH5Local(), Attributes::getReal(), H5PartWrapperForPC::getReferencePr(), H5PartWrapperForPC::getReferencePt(), H5PartWrapperForPC::getReferencePz(), H5PartWrapperForPC::getReferenceR(), H5PartWrapperForPC::getReferenceT(), H5PartWrapperForPC::getReferenceZ(), OpalData::getRestartStep(), Attributes::getString(), Attributes::getStringArray(), initDataSink(), initPhaseSpaceSink(), OpalData::inRestartRun(), isFollowupTrack_m, Object::itsAttr, itsTracker_m, Track::localTimeSteps, macrocharge_m, macromass_m, Units::MHz2Hz, opalData_m, phaseSpaceSink_m, Physics::pi, PartBunchBase< T, Dim >::POrigin, Physics::q_e, Track::reference, REGULAR, ParallelCyclotronTracker::setBeGa(), setBoundaryGeometry(), PartBunchBase< T, Dim >::setCharge(), PartBunchBase< T, Dim >::setCouplingConstant(), PartBunchBase< T, Dim >::setDistribution(), PartBunchBase< T, Dim >::setdT(), OpalData::setInOPALCyclMode(), ParallelCyclotronTracker::setLastDumpedStep(), PartBunchBase< T, Dim >::setMass(), ParallelCyclotronTracker::setPhi(), ParallelCyclotronTracker::setPr(), ParallelCyclotronTracker::setPreviousH5Local(), ParallelCyclotronTracker::setPsi(), ParallelCyclotronTracker::setPt(), PartBunchBase< T, Dim >::setPType(), ParallelCyclotronTracker::setPz(), ParallelCyclotronTracker::setR(), PartBunchBase< T, Dim >::setStepsPerTurn(), ParallelCyclotronTracker::setTheta(), setupFieldsolver(), ParallelCyclotronTracker::setZ(), Track::timeIntegrator, and Track::use.
Referenced by execute().
|
private |
Definition at line 542 of file TrackRun.cpp.
References OpalData::addProblemCharacteristicValue(), Options::amr, Track::block, Track::bunch, fieldSolver_m, Beam::find(), FieldSolver::find(), FieldSolver::getFieldSolverType(), FieldSolver::getMT(), FieldSolver::getMX(), FieldSolver::getMY(), Beam::getNumberOfParticles(), Attributes::getString(), FieldSolver::hasPeriodicZ(), FieldSolver::initCartesianFields(), OpalData::inRestartRun(), Object::itsAttr, NONE, opalData_m, P3M, SAAMG, PartBunchBase< T, Dim >::setBCAllOpen(), PartBunchBase< T, Dim >::setBCForDCBeam(), and PartBunchBase< T, Dim >::setSolver().
Referenced by setupCyclotronTracker(), setupThickTracker(), and setupTTracker().

|
private |
Definition at line 269 of file TrackRun.cpp.
References Track::block, Track::bunch, PartBunchBase< T, Dim >::calcBeamParameters(), dataSink_m, Track::deltaTau, PartBunchBase< T, Dim >::deltaTau_m, dist_m, Track::dT, Track::dtScInit, PartBunchBase< T, Dim >::dtScInit_m, endl(), Physics::epsilon_0, fieldSolver_m, Beam::find(), Attributes::getString(), initDataSink(), initPhaseSpaceSink(), OpalData::inRestartRun(), isFollowupTrack_m, Object::itsAttr, itsTracker_m, Track::localTimeSteps, macrocharge_m, opalData_m, Physics::pi, Track::reference, setBoundaryGeometry(), PartBunchBase< T, Dim >::setCharge(), PartBunchBase< T, Dim >::setChargeZeroPart(), PartBunchBase< T, Dim >::setCouplingConstant(), setDistributionParallelT(), PartBunchBase< T, Dim >::setdT(), PartBunchBase< T, Dim >::setLocalTrackStep(), PartBunchBase< T, Dim >::setT(), setupFieldsolver(), Track::truncOrder, Track::zstart, and Track::zstop.
Referenced by execute().

|
private |
Definition at line 344 of file TrackRun.cpp.
References Track::block, Track::bunch, PartBunchBase< T, Dim >::calcBeamParameters(), dataSink_m, Track::deltaTau, PartBunchBase< T, Dim >::deltaTau_m, dist_m, Track::dT, Track::dtScInit, PartBunchBase< T, Dim >::dtScInit_m, endl(), Physics::epsilon_0, fieldSolver_m, Beam::find(), Attributes::getBool(), Beam::getFrequency(), Beam::getMassPerParticle(), Beam::getParticleName(), Attributes::getString(), initDataSink(), initPhaseSpaceSink(), OpalData::inRestartRun(), isFollowupTrack_m, it, Object::itsAttr, itsTracker_m, Track::localTimeSteps, macrocharge_m, macromass_m, Units::MHz2Hz, opalData_m, Physics::pi, Track::reference, PartBunchBase< T, Dim >::setBeamFrequency(), setBoundaryGeometry(), PartBunchBase< T, Dim >::setCharge(), PartBunchBase< T, Dim >::setChargeZeroPart(), PartBunchBase< T, Dim >::setCouplingConstant(), setDistributionParallelT(), PartBunchBase< T, Dim >::setdT(), OpalData::setInOPALTMode(), PartBunchBase< T, Dim >::setLocalTrackStep(), PartBunchBase< T, Dim >::setMass(), PartBunchBase< T, Dim >::setMassZeroPart(), PartBunchBase< T, Dim >::setPType(), PartBunchBase< T, Dim >::setT(), setupFieldsolver(), Track::zstart, and Track::zstop.
Referenced by execute().

|
private |
Definition at line 99 of file TrackRun.h.
Referenced by initDataSink(), setupCyclotronTracker(), setupThickTracker(), and setupTTracker().
|
staticprivate |
Definition at line 107 of file TrackRun.h.
Referenced by setDistributionParallelT(), and setupCyclotronTracker().
|
private |
Definition at line 94 of file TrackRun.h.
Referenced by setDistributionParallelT(), setupCyclotronTracker(), setupThickTracker(), and setupTTracker().
|
private |
Definition at line 95 of file TrackRun.h.
Referenced by setDistributionParallelT().
|
private |
Definition at line 97 of file TrackRun.h.
Referenced by setupCyclotronTracker(), setupFieldsolver(), setupThickTracker(), and setupTTracker().
|
private |
Definition at line 105 of file TrackRun.h.
Referenced by execute(), initPhaseSpaceSink(), print(), setDistributionParallelT(), setupCyclotronTracker(), setupThickTracker(), and setupTTracker().
|
staticprivate |
Definition at line 92 of file TrackRun.h.
Referenced by execute(), getTracker(), setupCyclotronTracker(), setupThickTracker(), and setupTTracker().
|
private |
Definition at line 114 of file TrackRun.h.
Referenced by print(), setupCyclotronTracker(), setupThickTracker(), and setupTTracker().
|
private |
Definition at line 113 of file TrackRun.h.
Referenced by print(), setupCyclotronTracker(), and setupTTracker().
|
private |
Definition at line 109 of file TrackRun.h.
Referenced by execute(), getRunMethodName(), print(), and setRunMethod().
|
private |
Definition at line 103 of file TrackRun.h.
Referenced by execute(), initDataSink(), initPhaseSpaceSink(), setBoundaryGeometry(), setDistributionParallelT(), setupCyclotronTracker(), setupFieldsolver(), setupThickTracker(), setupTTracker(), and TrackRun().
|
private |
Definition at line 101 of file TrackRun.h.
Referenced by initDataSink(), initPhaseSpaceSink(), setDistributionParallelT(), setupCyclotronTracker(), and ~TrackRun().
|
staticprivate |
Definition at line 110 of file TrackRun.h.
Referenced by getRunMethodName(), and setRunMethod().
1.8.5