OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
OpalData Class Reference

The global OPAL structure. More...

#include <OpalData.h>

Collaboration diagram for OpalData:
Collaboration graph
[legend]

Classes

struct  ClearReference
 Clear Reference. More...
 

Public Types

enum class  OpenMode : unsigned short { UNDEFINED , WRITE , APPEND }
 Enum for writing to files. More...
 

Public Member Functions

 ~OpalData ()
 
void reset ()
 reset object for consecutive runs More...
 
void apply (const ObjectFunction &)
 Apply a function to all objects. More...
 
void create (Object *newObject)
 Create new object. More...
 
void define (Object *newObject)
 Define a new object. More...
 
void erase (const std::string &name)
 Delete existing entry. More...
 
Objectfind (const std::string &name)
 Find entry. More...
 
double getP0 () const
 Return value of global reference momentum. More...
 
void makeDirty (Object *object)
 Invalidate expressions. More...
 
void printNames (std::ostream &stream, const std::string &pattern)
 Print all objects. More...
 
std::vector< std::string > getAllNames () const
 Get a list of all objects. More...
 
void registerTable (Table *t)
 Register table. More...
 
void unregisterTable (Table *t)
 Unregister table. More...
 
void registerExpression (AttributeBase *)
 Register expression. More...
 
void unregisterExpression (AttributeBase *)
 Unregister expression. More...
 
void setP0 (ValueDefinition *p0)
 Set the global momentum. More...
 
void storeTitle (const std::string &)
 Store the page title. More...
 
void printTitle (std::ostream &)
 Print the page title. More...
 
std::string getTitle ()
 Get the title string. More...
 
void update ()
 Update all objects. More...
 
std::map< std::string, std::string > getVariableData ()
 
std::vector< std::string > getVariableNames ()
 
bool isInOPALCyclMode ()
 
bool isInOPALTMode ()
 
bool isOptimizerRun ()
 
void setInOPALCyclMode ()
 
void setInOPALTMode ()
 
void setOptimizerFlag ()
 
bool isInPrepState ()
 
void setInPrepState (bool state)
 
bool hasPriorTrack ()
 true if in follow-up track More...
 
void setPriorTrack (const bool &value=true)
 true if in follow-up track More...
 
bool inRestartRun ()
 true if we do a restart run More...
 
void setRestartRun (const bool &value=true)
 set OPAL in restart mode More...
 
void setRestartStep (int s)
 store the location where to restart More...
 
int getRestartStep ()
 get the step where to restart More...
 
std::string getAuxiliaryOutputDirectory () const
 get the name of the the additional data directory More...
 
std::string getInputFn ()
 get opals input filename More...
 
std::string getInputBasename ()
 get input file name without extension More...
 
void storeInputFn (const std::string &fn)
 store opals input filename More...
 
void checkAndAddOutputFileName (const std::string &outfn)
 checks the output file names of all items to avoid duplicates More...
 
std::string getRestartFileName ()
 get opals restart h5 format filename More...
 
void setRestartFileName (std::string s)
 store opals restart h5 format filename More...
 
bool hasRestartFile ()
 true if we do a restart from specified h5 file More...
 
void setRestartDumpFreq (const int &N)
 set the dump frequency as found in restart file More...
 
int getRestartDumpFreq () const
 get the dump frequency as found in restart file More...
 
void setOpenMode (OpenMode openMode)
 
OpenMode getOpenMode () const
 
void setLastStep (const int &step)
 set the last step in a run for possible follow-up run More...
 
int getLastStep () const
 get the last step from a possible previous run More...
 
bool hasBunchAllocated ()
 true if we already allocated a ParticleBunch object More...
 
void bunchIsAllocated ()
 
PartBunchBase< double, 3 > * getPartBunch ()
 
void setPartBunch (PartBunchBase< double, 3 > *p)
 
bool hasDataSinkAllocated ()
 true if we already allocated a DataSink object More...
 
DataSinkgetDataSink ()
 
void setDataSink (DataSink *s)
 
void setGlobalPhaseShift (double shift)
 units: (sec) More...
 
double getGlobalPhaseShift ()
 units: (sec) More...
 
void setGlobalGeometry (BoundaryGeometry *bg)
 
BoundaryGeometrygetGlobalGeometry ()
 
bool hasGlobalGeometry ()
 
void setMaxPhase (std::string elName, double phi)
 
std::vector< MaxPhasesT >::iterator getFirstMaxPhases ()
 
std::vector< MaxPhasesT >::iterator getLastMaxPhases ()
 
int getNumberOfMaxPhases ()
 
void addEnergyData (double spos, double ekin)
 
energyEvolution_t::iterator getFirstEnergyData ()
 
energyEvolution_t::iterator getLastEnergyData ()
 
unsigned long long getMaxTrackSteps ()
 
void setMaxTrackSteps (unsigned long long s)
 
void incMaxTrackSteps (unsigned long long s)
 
void addProblemCharacteristicValue (const std::string &name, unsigned int value)
 
const std::map< std::string, unsigned int > & getProblemCharacteristicValues () const
 
void storeArguments (int argc, char *argv[])
 
std::vector< std::string > getArguments ()
 

Static Public Member Functions

static OpalDatagetInstance ()
 
static void deleteInstance ()
 
static void stashInstance ()
 
static OpalDatapopInstance ()
 

Private Member Functions

 OpalData ()
 
 OpalData (const OpalData &)
 
void operator= (const OpalData &)
 

Private Attributes

struct OpalDataImplp
 

Static Private Attributes

static bool isInstantiated = false
 
static OpalDatainstance = nullptr
 
static std::stack< OpalData * > stashedInstances
 

Detailed Description

The global OPAL structure.

Definition at line 49 of file OpalData.h.

Member Enumeration Documentation

◆ OpenMode

enum class OpalData::OpenMode : unsigned short
strong

Enum for writing to files.

Enumerator
UNDEFINED 
WRITE 
APPEND 

Definition at line 64 of file OpalData.h.

Constructor & Destructor Documentation

◆ ~OpalData()

OpalData::~OpalData ( )

Definition at line 252 of file OpalData.cpp.

References p.

◆ OpalData() [1/2]

OpalData::OpalData ( )
private

Definition at line 248 of file OpalData.cpp.

References p.

Referenced by getInstance().

◆ OpalData() [2/2]

OpalData::OpalData ( const OpalData )
private

Member Function Documentation

◆ addEnergyData()

void OpalData::addEnergyData ( double  spos,
double  ekin 
)

Definition at line 410 of file OpalData.cpp.

References OpalDataImpl::energyEvolution_m, and p.

◆ addProblemCharacteristicValue()

void OpalData::addProblemCharacteristicValue ( const std::string &  name,
unsigned int  value 
)

◆ apply()

void OpalData::apply ( const ObjectFunction fun)

Apply a function to all objects.

Definition at line 469 of file OpalData.cpp.

References Directory::begin(), Directory::end(), OpalDataImpl::mainDirectory, and p.

Referenced by Sequence::storeLine().

Here is the call graph for this function:

◆ bunchIsAllocated()

void OpalData::bunchIsAllocated ( )

Definition at line 369 of file OpalData.cpp.

References OpalDataImpl::hasBunchAllocated_m, and p.

Referenced by TrackRun::execute().

◆ checkAndAddOutputFileName()

void OpalData::checkAndAddOutputFileName ( const std::string &  outfn)

checks the output file names of all items to avoid duplicates

Definition at line 675 of file OpalData.cpp.

References hasBunchAllocated(), OpalDataImpl::outFiles_m, and p.

Referenced by LossDataSink::LossDataSink(), and PeakFinder::save().

Here is the call graph for this function:

◆ create()

void OpalData::create ( Object newObject)

Create new object.

Definition at line 476 of file OpalData.cpp.

References Directory::find(), Object::getOpalName(), Directory::insert(), OpalDataImpl::mainDirectory, name, and p.

Referenced by OpalMarker::OpalMarker(), RealConstant::RealConstant(), RealVariable::RealVariable(), and StringConstant::StringConstant().

Here is the call graph for this function:

◆ define()

void OpalData::define ( Object newObject)

◆ deleteInstance()

void OpalData::deleteInstance ( )
static

Definition at line 206 of file OpalData.cpp.

References instance, and isInstantiated.

Referenced by opalMain(), popInstance(), and run_opal().

◆ erase()

void OpalData::erase ( const std::string &  name)

Delete existing entry.

Definition at line 549 of file OpalData.cpp.

References Directory::begin(), Directory::end(), Directory::erase(), Directory::find(), Object::getParent(), OpalDataImpl::mainDirectory, name, p, and Object::setParent().

Referenced by define().

Here is the call graph for this function:

◆ find()

Object * OpalData::find ( const std::string &  name)

◆ getAllNames()

std::vector< std::string > OpalData::getAllNames ( ) const

Get a list of all objects.

Definition at line 610 of file OpalData.cpp.

References Directory::begin(), Directory::end(), OpalDataImpl::mainDirectory, name, and p.

Referenced by PyOpal::PyParser::list_objects(), and list_objects().

Here is the call graph for this function:

◆ getArguments()

std::vector< std::string > OpalData::getArguments ( )

Definition at line 770 of file OpalData.cpp.

References OpalDataImpl::arguments_m, and p.

◆ getAuxiliaryOutputDirectory()

std::string OpalData::getAuxiliaryOutputDirectory ( ) const

◆ getDataSink()

DataSink * OpalData::getDataSink ( )

Definition at line 390 of file OpalData.cpp.

References OpalDataImpl::dataSink_m, and p.

Referenced by TrackRun::initDataSink().

◆ getFirstEnergyData()

energyEvolution_t::iterator OpalData::getFirstEnergyData ( )

Definition at line 414 of file OpalData.cpp.

References OpalDataImpl::energyEvolution_m, and p.

◆ getFirstMaxPhases()

std::vector< MaxPhasesT >::iterator OpalData::getFirstMaxPhases ( )

◆ getGlobalGeometry()

BoundaryGeometry * OpalData::getGlobalGeometry ( )

Definition at line 461 of file OpalData.cpp.

References OpalDataImpl::bg_m, and p.

Referenced by ParallelCyclotronTracker::execute(), and FieldSolver::initSolver().

◆ getGlobalPhaseShift()

double OpalData::getGlobalPhaseShift ( )

units: (sec)

units: (sec)

Definition at line 452 of file OpalData.cpp.

References OpalDataImpl::gPhaseShift_m, and p.

Referenced by Distribution::doRestartOpalT(), ParallelTTracker::execute(), and H5PartWrapperForPT::writeHeader().

◆ getInputBasename()

std::string OpalData::getInputBasename ( )

◆ getInputFn()

std::string OpalData::getInputFn ( )

◆ getInstance()

OpalData * OpalData::getInstance ( )
static

Definition at line 196 of file OpalData.cpp.

References instance, isInstantiated, and OpalData().

Referenced by Expressions::AAutomatic< T >::AAutomatic(), ScatteringPhysics::addBackToBunch(), SDDSWriter::addDefaultParameters(), Distribution::adjustPhaseSpace(), ThickTracker::advanceDispersion_m(), AmrYtWriter::AmrYtWriter(), CSRIGFWakeFunction::apply(), CSRWakeFunction::apply(), BeamStrippingPhysics::apply(), Monitor::applyToReferenceParticle(), Beam::Beam(), BoundaryGeometry::BoundaryGeometry(), MultiBunchHandler::calcBunchBeamParameters(), Bend2D::calculateRefTrajectory(), Fieldmap::checkMap(), Vacuum::checkPoint(), ScatteringPhysics::computeInteraction(), BoundaryGeometry::computeMeshVoxelization(), ScatteringPhysics::copyFromBunch(), Distribution::createOpalCycl(), Distribution::createOpalT(), Distribution::Distribution(), BeamStrippingPhysics::doPhysics(), Distribution::doRestartOpalCycl(), Distribution::doRestartOpalT(), FieldWriter::dumpField(), ParallelCyclotronTracker::execute(), ParallelTTracker::execute(), ThickTracker::execute(), Help::execute(), Option::execute(), Select::execute(), Title::execute(), OptimizeCmd::execute(), SampleCmd::execute(), IfStatement::execute(), WhileStatement::execute(), OpalParser::execute(), Expressions::ARefExpr< T >::fill(), Expressions::SRefAttr< T >::fill(), Expressions::SRefExpr< T >::fill(), ElementPositionWriter::fillHeader(), MemoryWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), GridLBalWriter::fillHeader(), LBalWriter::fillHeader(), OpalParser::find(), BeamSequence::find(), Element::find(), Table::find(), OpalTrimCoil::find(), Distribution::find(), OpalSample::find(), Beam::find(), BoundaryGeometry::find(), FieldSolver::find(), OpalWake::find(), ParticleMatterInteraction::find(), OpalFilter::find(), ClosedOrbitFinder< Value_type, Size_type, Stepper >::findOrbit(), Expressions::getEkin(), FM3DDynamic::getOnaxisEz(), Bend2D::getOutline(), CavityAutophaser::getPhaseAtMaxEnergy(), Attributes::getStringArray(), getVariableData(), getVariableNames(), H5PartWrapperForPT::H5PartWrapperForPT(), MemoryProfiler::header(), DataSink::init(), ParallelCyclotronTracker::initDistInGlobalFrame(), Monitor::initialise(), SigmaGenerator::initialize(), ParallelCyclotronTracker::initializeTracking_m(), DataSink::initMultiBunchDump(), FieldSolver::initSolver(), ParallelCyclotronTracker::initTrackOrbitFile(), OrbitThreader::integrate(), DistributionMoments::isParticleExcluded(), PyOpal::PyParser::list_objects(), list_objects(), LossDataSink::LossDataSink(), Fieldmap::lowResolutionWarning(), SequenceTemplate::makeInstance(), LineTemplate::makeInstance(), SigmaGenerator::match(), MultiBunchHandler::MultiBunchHandler(), OpalFilter::OpalFilter(), opalMain(), OpalMarker::OpalMarker(), OpalTrimCoil::OpalTrimCoil(), OpalWake::OpalWake(), OrbitThreader::OrbitThreader(), SequenceParser::parse(), OpalParser::parse(), OpalParser::parseAssign(), OpalParser::parseDefine(), Line::parseList(), OpalParser::parseMacro(), SequenceParser::parseMember(), Expressions::parseRelation(), Expressions::parseStringValue(), ParticleMatterInteraction::ParticleMatterInteraction(), Distribution::printInfo(), H5PartWrapperForPC::readHeader(), H5PartWrapperForPT::readHeader(), RealConstant::RealConstant(), RealVariable::RealVariable(), PyOpal::PyDistributionNS::registerDistribution(), PyOpal::PyFieldSolverNS::registerFieldSolver(), PyOpal::PyLine_< C >::registerObject(), PyOpal::PyOpalObjectNS::PyOpalObject< C >::registerObject(), ParallelTTracker::restoreCavityPhases(), OptimizeCmd::run(), run_opal(), LaserProfile::sampleDist(), Expressions::SAutomatic< T >::SAutomatic(), PluginElement::save(), PeakFinder::save(), LossDataSink::save(), OpalBeamline::save3DInput(), OpalBeamline::save3DLattice(), LaserProfile::saveData(), LaserProfile::saveHistogram(), IndexMap::saveSDDS(), TrackRun::setBoundaryGeometry(), ParallelTTracker::setOptionalVariables(), MultiBunchHandler::setRadiusTurns(), PartBunchBase< T, Dim >::setSolver(), ScatteringPhysics::setTimeStepForLeavingParticles(), TrackRun::setupCyclotronTracker(), TrackRun::setupFieldsolver(), OpalSimulation::setupSimulation(), TrackRun::setupThickTracker(), TrackRun::setupTTracker(), H5PartWrapper::storeCavityInformation(), Sequence::storeLine(), StringConstant::StringConstant(), Table::Table(), Track::Track(), RBend3D::trackRefParticleThrough(), TrackRun::TrackRun(), OpalHKicker::update(), OpalKicker::update(), OpalMultipole::update(), OpalOctupole::update(), OpalQuadrupole::update(), OpalRBend::update(), OpalSBend::update(), OpalSextupole::update(), OpalSolenoid::update(), OpalVKicker::update(), SigmaGenerator::updateInitialSigma(), Sequence::updateList(), AmrPartBunch::updateLorentzFactor(), SigmaGenerator::updateSigma(), ParallelCyclotronTracker::visitCyclotron(), StatWriter::write(), MeshGenerator::write(), Fieldmap::write3DField(), ThickTracker::write_m(), DumpEMFields::writeFieldThis(), DumpFields::writeFieldThis(), H5PartWrapperForPT::writeHeader(), FlexibleCollimator::writeHolesAndQuadtree(), SigmaGenerator::writeOrbitOutput_m(), Distribution::writeOutFileHeader(), Cyclotron::writeOutputFieldFiles(), AmrYtWriter::writeParticles_m(), AmrMultiGrid::writeSDDSHeader_m(), Monitor::writeStatistics(), Expressions::AAutomatic< T >::~AAutomatic(), Expressions::SAutomatic< T >::~SAutomatic(), and Table::~Table().

Here is the call graph for this function:

◆ getLastEnergyData()

energyEvolution_t::iterator OpalData::getLastEnergyData ( )

Definition at line 418 of file OpalData.cpp.

References OpalDataImpl::energyEvolution_m, and p.

◆ getLastMaxPhases()

std::vector< MaxPhasesT >::iterator OpalData::getLastMaxPhases ( )

◆ getLastStep()

int OpalData::getLastStep ( ) const

get the last step from a possible previous run

Definition at line 361 of file OpalData.cpp.

References OpalDataImpl::last_step_m, and p.

◆ getMaxTrackSteps()

unsigned long long OpalData::getMaxTrackSteps ( )

Definition at line 236 of file OpalData.cpp.

References OpalDataImpl::maxTrackSteps_m, and p.

◆ getNumberOfMaxPhases()

int OpalData::getNumberOfMaxPhases ( )

Definition at line 406 of file OpalData.cpp.

References OpalDataImpl::maxPhases_m, and p.

Referenced by H5PartWrapper::storeCavityInformation().

◆ getOpenMode()

OpalData::OpenMode OpalData::getOpenMode ( ) const

◆ getP0()

double OpalData::getP0 ( ) const

◆ getPartBunch()

PartBunchBase< double, 3 > * OpalData::getPartBunch ( )

Definition at line 377 of file OpalData.cpp.

References OpalDataImpl::bunch_m, and p.

Referenced by Expressions::getEkin(), and Track::Track().

◆ getProblemCharacteristicValues()

const std::map< std::string, unsigned int > & OpalData::getProblemCharacteristicValues ( ) const

Definition at line 759 of file OpalData.cpp.

References p, and OpalDataImpl::problemSize_m.

◆ getRestartDumpFreq()

int OpalData::getRestartDumpFreq ( ) const

get the dump frequency as found in restart file

Definition at line 345 of file OpalData.cpp.

References p, and OpalDataImpl::restart_dump_freq_m.

◆ getRestartFileName()

std::string OpalData::getRestartFileName ( )

get opals restart h5 format filename

Definition at line 328 of file OpalData.cpp.

References p, and OpalDataImpl::restartFn_m.

Referenced by TrackRun::setupCyclotronTracker(), TrackRun::setupThickTracker(), and TrackRun::setupTTracker().

◆ getRestartStep()

int OpalData::getRestartStep ( )

◆ getTitle()

std::string OpalData::getTitle ( )

Get the title string.

Definition at line 657 of file OpalData.cpp.

References OpalDataImpl::itsTitle_m, and p.

◆ getVariableData()

std::map< std::string, std::string > OpalData::getVariableData ( )

Definition at line 711 of file OpalData.cpp.

References find(), getInstance(), RealVariable::getReal(), StringConstant::getString(), and getVariableNames().

Referenced by OptimizeCmd::run().

Here is the call graph for this function:

◆ getVariableNames()

std::vector< std::string > OpalData::getVariableNames ( )

Definition at line 731 of file OpalData.cpp.

References Directory::begin(), Directory::end(), find(), Object::getCategory(), getInstance(), Object::isBuiltin(), OpalDataImpl::mainDirectory, and p.

Referenced by getVariableData().

Here is the call graph for this function:

◆ hasBunchAllocated()

bool OpalData::hasBunchAllocated ( )

true if we already allocated a ParticleBunch object

Definition at line 365 of file OpalData.cpp.

References OpalDataImpl::hasBunchAllocated_m, and p.

Referenced by checkAndAddOutputFileName(), and TrackRun::execute().

◆ hasDataSinkAllocated()

bool OpalData::hasDataSinkAllocated ( )

true if we already allocated a DataSink object

Definition at line 381 of file OpalData.cpp.

References OpalDataImpl::hasDataSinkAllocated_m, and p.

Referenced by TrackRun::initDataSink().

◆ hasGlobalGeometry()

bool OpalData::hasGlobalGeometry ( )

Definition at line 465 of file OpalData.cpp.

References OpalDataImpl::bg_m, and p.

◆ hasPriorTrack()

bool OpalData::hasPriorTrack ( )

true if in follow-up track

Definition at line 304 of file OpalData.cpp.

References OpalDataImpl::hasPriorRun_m, and p.

◆ hasRestartFile()

bool OpalData::hasRestartFile ( )

true if we do a restart from specified h5 file

Definition at line 337 of file OpalData.cpp.

References OpalDataImpl::hasRestartFile_m, and p.

◆ incMaxTrackSteps()

void OpalData::incMaxTrackSteps ( unsigned long long  s)

Definition at line 244 of file OpalData.cpp.

References OpalDataImpl::maxTrackSteps_m, and p.

◆ inRestartRun()

bool OpalData::inRestartRun ( )

◆ isInOPALCyclMode()

bool OpalData::isInOPALCyclMode ( )

◆ isInOPALTMode()

bool OpalData::isInOPALTMode ( )

Definition at line 276 of file OpalData.cpp.

References OpalDataImpl::isInOPALTMode_m, and p.

Referenced by AmrMultiGrid::writeSDDSHeader_m().

◆ isInPrepState()

bool OpalData::isInPrepState ( )

Definition at line 296 of file OpalData.cpp.

References OpalDataImpl::isInPrepState_m, and p.

◆ isOptimizerRun()

bool OpalData::isOptimizerRun ( )

Definition at line 280 of file OpalData.cpp.

References OpalDataImpl::isOptimizerFlag_m, and p.

◆ makeDirty()

void OpalData::makeDirty ( Object object)

Invalidate expressions.

Definition at line 574 of file OpalData.cpp.

References OpalDataImpl::modified, p, and Object::setDirty().

Referenced by SequenceParser::parse(), and OpalParser::parseAssign().

Here is the call graph for this function:

◆ operator=()

void OpalData::operator= ( const OpalData )
private

◆ popInstance()

OpalData * OpalData::popInstance ( )
static

Definition at line 223 of file OpalData.cpp.

References deleteInstance(), instance, isInstantiated, and stashedInstances.

Referenced by OptimizeCmd::popEnvironment(), and SampleCmd::popEnvironment().

Here is the call graph for this function:

◆ printNames()

void OpalData::printNames ( std::ostream &  stream,
const std::string &  pattern 
)

Print all objects.

Definition at line 579 of file OpalData.cpp.

References Directory::begin(), Directory::end(), endl(), OpalDataImpl::mainDirectory, RegularExpression::match(), name, and p.

Here is the call graph for this function:

◆ printTitle()

void OpalData::printTitle ( std::ostream &  os)

Print the page title.

Definition at line 653 of file OpalData.cpp.

References OpalDataImpl::itsTitle_m, and p.

◆ registerExpression()

void OpalData::registerExpression ( AttributeBase expr)

Register expression.

Definition at line 633 of file OpalData.cpp.

References OpalDataImpl::exprDirectory, and p.

Referenced by Expressions::AAutomatic< T >::AAutomatic(), and Expressions::SAutomatic< T >::SAutomatic().

◆ registerTable()

void OpalData::registerTable ( Table t)

Register table.

Definition at line 621 of file OpalData.cpp.

References p, and OpalDataImpl::tableDirectory.

Referenced by Table::Table().

◆ reset()

void OpalData::reset ( )

◆ setDataSink()

void OpalData::setDataSink ( DataSink s)

Definition at line 385 of file OpalData.cpp.

References OpalDataImpl::dataSink_m, OpalDataImpl::hasDataSinkAllocated_m, and p.

Referenced by TrackRun::initDataSink().

◆ setGlobalGeometry()

void OpalData::setGlobalGeometry ( BoundaryGeometry bg)

Definition at line 457 of file OpalData.cpp.

References OpalDataImpl::bg_m, and p.

Referenced by TrackRun::setBoundaryGeometry().

◆ setGlobalPhaseShift()

void OpalData::setGlobalPhaseShift ( double  shift)

◆ setInOPALCyclMode()

void OpalData::setInOPALCyclMode ( )

Definition at line 284 of file OpalData.cpp.

References OpalDataImpl::isInOPALCyclMode_m, and p.

Referenced by TrackRun::setupCyclotronTracker().

◆ setInOPALTMode()

void OpalData::setInOPALTMode ( )

Definition at line 288 of file OpalData.cpp.

References OpalDataImpl::isInOPALTMode_m, and p.

Referenced by TrackRun::setupTTracker().

◆ setInPrepState()

void OpalData::setInPrepState ( bool  state)

Definition at line 300 of file OpalData.cpp.

References OpalDataImpl::isInPrepState_m, and p.

Referenced by ParallelTTracker::execute(), and ThickTracker::execute().

◆ setLastStep()

void OpalData::setLastStep ( const int &  step)

set the last step in a run for possible follow-up run

Definition at line 357 of file OpalData.cpp.

References OpalDataImpl::last_step_m, and p.

◆ setMaxPhase()

void OpalData::setMaxPhase ( std::string  elName,
double  phi 
)

Definition at line 394 of file OpalData.cpp.

References OpalDataImpl::maxPhases_m, and p.

Referenced by CavityAutophaser::getPhaseAtMaxEnergy().

◆ setMaxTrackSteps()

void OpalData::setMaxTrackSteps ( unsigned long long  s)

Definition at line 240 of file OpalData.cpp.

References OpalDataImpl::maxTrackSteps_m, and p.

◆ setOpenMode()

void OpalData::setOpenMode ( OpenMode  openMode)

◆ setOptimizerFlag()

void OpalData::setOptimizerFlag ( )

Definition at line 292 of file OpalData.cpp.

References OpalDataImpl::isOptimizerFlag_m, and p.

Referenced by OpalSimulation::setupSimulation().

◆ setP0()

void OpalData::setP0 ( ValueDefinition p0)

Set the global momentum.

Definition at line 641 of file OpalData.cpp.

References p, and OpalDataImpl::referenceMomentum.

Referenced by define(), and RealVariable::RealVariable().

◆ setPartBunch()

void OpalData::setPartBunch ( PartBunchBase< double, 3 > *  p)

Definition at line 373 of file OpalData.cpp.

References OpalDataImpl::bunch_m, and p.

Referenced by Track::Track().

◆ setPriorTrack()

void OpalData::setPriorTrack ( const bool &  value = true)

true if in follow-up track

Definition at line 308 of file OpalData.cpp.

References OpalDataImpl::hasPriorRun_m, and p.

Referenced by ParallelTTracker::execute().

◆ setRestartDumpFreq()

void OpalData::setRestartDumpFreq ( const int &  N)

set the dump frequency as found in restart file

Definition at line 341 of file OpalData.cpp.

References p, and OpalDataImpl::restart_dump_freq_m.

Referenced by H5PartWrapperForPC::readHeader(), and H5PartWrapperForPT::readHeader().

◆ setRestartFileName()

void OpalData::setRestartFileName ( std::string  s)

store opals restart h5 format filename

Definition at line 332 of file OpalData.cpp.

References OpalDataImpl::hasRestartFile_m, p, and OpalDataImpl::restartFn_m.

Referenced by opalMain(), and run_opal().

◆ setRestartRun()

void OpalData::setRestartRun ( const bool &  value = true)

set OPAL in restart mode

Definition at line 316 of file OpalData.cpp.

References OpalDataImpl::isRestart_m, and p.

Referenced by TrackRun::execute(), opalMain(), and run_opal().

◆ setRestartStep()

void OpalData::setRestartStep ( int  s)

store the location where to restart

Definition at line 320 of file OpalData.cpp.

References p, and OpalDataImpl::restartStep_m.

Referenced by H5PartWrapperForPT::H5PartWrapperForPT(), opalMain(), and run_opal().

◆ stashInstance()

void OpalData::stashInstance ( )
static

◆ storeArguments()

void OpalData::storeArguments ( int  argc,
char *  argv[] 
)

Definition at line 763 of file OpalData.cpp.

References OpalDataImpl::arguments_m, and p.

Referenced by opalMain().

◆ storeInputFn()

void OpalData::storeInputFn ( const std::string &  fn)

store opals input filename

Definition at line 649 of file OpalData.cpp.

References OpalDataImpl::inputFn_m, and p.

Referenced by opalMain(), and run_opal().

◆ storeTitle()

void OpalData::storeTitle ( const std::string &  title)

Store the page title.

Definition at line 645 of file OpalData.cpp.

References OpalDataImpl::itsTitle_m, and p.

Referenced by Title::execute().

◆ unregisterExpression()

void OpalData::unregisterExpression ( AttributeBase expr)

Unregister expression.

Definition at line 637 of file OpalData.cpp.

References OpalDataImpl::exprDirectory, and p.

Referenced by Expressions::AAutomatic< T >::~AAutomatic(), and Expressions::SAutomatic< T >::~SAutomatic().

◆ unregisterTable()

void OpalData::unregisterTable ( Table t)

Unregister table.

Definition at line 625 of file OpalData.cpp.

References p, and OpalDataImpl::tableDirectory.

Referenced by Table::~Table().

◆ update()

void OpalData::update ( )

Member Data Documentation

◆ instance

OpalData * OpalData::instance = nullptr
staticprivate

Definition at line 275 of file OpalData.h.

Referenced by deleteInstance(), getInstance(), popInstance(), and stashInstance().

◆ isInstantiated

bool OpalData::isInstantiated = false
staticprivate

Definition at line 274 of file OpalData.h.

Referenced by deleteInstance(), getInstance(), popInstance(), and stashInstance().

◆ p

struct OpalDataImpl* OpalData::p
private

◆ stashedInstances

std::stack< OpalData * > OpalData::stashedInstances
staticprivate

Definition at line 276 of file OpalData.h.

Referenced by popInstance(), and stashInstance().


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