OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
The global OPAL structure. More...
#include <OpalData.h>
Classes | |
struct | ClearReference |
Clear Reference. More... | |
Public Types | |
enum | OPENMODE { OPENMODE::WRITE, OPENMODE::APPEND, OPENMODE::UNDEFINED } |
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... | |
Object * | find (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... | |
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::vector< std::string > | getAllNames () |
bool | isInOPALCyclMode () |
bool | isInOPALTMode () |
bool | isInOPALEnvMode () |
bool | isOptimizerRun () |
void | setInOPALCyclMode () |
void | setInOPALTMode () |
void | setInOPALEnvMode () |
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 | 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... | |
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... | |
DataSink * | getDataSink () |
void | setDataSink (DataSink *s) |
bool | hasSLBunchAllocated () |
true if we already allocated a ParticleBunch object More... | |
void | slbunchIsAllocated () |
EnvelopeBunch * | getSLPartBunch () |
void | setSLPartBunch (EnvelopeBunch *p) |
void | setGlobalPhaseShift (double shift) |
units: (sec) More... | |
double | getGlobalPhaseShift () |
units: (sec) More... | |
void | setGlobalGeometry (BoundaryGeometry *bg) |
BoundaryGeometry * | getGlobalGeometry () |
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 OpalData * | getInstance () |
static void | deleteInstance () |
static void | stashInstance () |
static OpalData * | popInstance () |
Private Member Functions | |
OpalData () | |
OpalData (const OpalData &) | |
void | operator= (const OpalData &) |
Private Attributes | |
struct OpalDataImpl * | p |
Static Private Attributes | |
static bool | isInstantiated = false |
static OpalData * | instance = nullptr |
static std::stack< OpalData * > | stashedInstances |
The global OPAL structure.
Definition at line 54 of file OpalData.h.
|
strong |
Enum for writing to files.
Enumerator | |
---|---|
WRITE | |
APPEND | |
UNDEFINED |
Definition at line 69 of file OpalData.h.
OpalData::~OpalData | ( | ) |
Definition at line 266 of file OpalData.cpp.
References p.
|
private |
|
private |
void OpalData::addEnergyData | ( | double | spos, |
double | ekin | ||
) |
Definition at line 455 of file OpalData.cpp.
References OpalDataImpl::energyEvolution_m, and p.
void OpalData::addProblemCharacteristicValue | ( | const std::string & | name, |
unsigned int | value | ||
) |
Definition at line 818 of file OpalData.cpp.
References name, p, and OpalDataImpl::problemSize_m.
Referenced by Distribution::createOpalCycl(), Distribution::createOpalT(), Distribution::doRestartOpalCycl(), Distribution::doRestartOpalT(), and TrackRun::setupFieldsolver().
void OpalData::apply | ( | const ObjectFunction & | fun | ) |
Apply a function to all objects.
Definition at line 516 of file OpalData.cpp.
References Directory::begin(), Directory::end(), OpalDataImpl::mainDirectory, and p.
Referenced by Dump::execute(), MakeSequence::execute(), Save::execute(), Line::parse(), and Sequence::storeLine().
void OpalData::bunchIsAllocated | ( | ) |
Definition at line 413 of file OpalData.cpp.
References OpalDataImpl::hasBunchAllocated_m, and p.
Referenced by TrackRun::execute().
void OpalData::create | ( | Object * | newObject | ) |
Create new object.
Definition at line 524 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().
void OpalData::define | ( | Object * | newObject | ) |
Define a new object.
Definition at line 538 of file OpalData.cpp.
References Directory::begin(), Object::canReplaceBy(), Directory::end(), endl(), erase(), Directory::find(), Object::getOpalName(), Options::info, INFOMSG, Directory::insert(), Object::isBuiltin(), Table::isDependent(), OpalDataImpl::mainDirectory, OpalDataImpl::modified, name, p, Object::setDirty(), setP0(), and OpalDataImpl::tableDirectory.
Referenced by Beam::Beam(), BoundaryGeometry::BoundaryGeometry(), Distribution::Distribution(), Edit::finish(), OpalFilter::OpalFilter(), OpalTrimCoil::OpalTrimCoil(), OpalWake::OpalWake(), EditInstall::parse(), OpalParser::parseAssign(), OpalParser::parseDefine(), OpalParser::parseMacro(), SequenceParser::parseMember(), ParticleMatterInteraction::ParticleMatterInteraction(), and FlatWriter::visitMapIntegrator().
|
static |
Definition at line 219 of file OpalData.cpp.
References instance, and isInstantiated.
Referenced by main(), popInstance(), and run_opal().
void OpalData::erase | ( | const std::string & | name | ) |
Delete existing entry.
Definition at line 599 of file OpalData.cpp.
References Directory::begin(), Directory::end(), Directory::erase(), Directory::find(), Object::getParent(), OpalDataImpl::mainDirectory, p, and Object::setParent().
Referenced by define().
Object * OpalData::find | ( | const std::string & | name | ) |
Find entry.
Definition at line 618 of file OpalData.cpp.
References Directory::find(), OpalDataImpl::mainDirectory, and p.
Referenced by CorrectionBase::addKick(), EditCmd::execute(), Eigen::execute(), Envelope::execute(), MatrixCmd::execute(), Twiss3::execute(), Expressions::ARefExpr< T >::fill(), Expressions::SRefExpr< T >::fill(), Expressions::ARefAttr< T >::fill(), Expressions::SRefAttr< T >::fill(), OpalSample::find(), OpalTrimCoil::find(), BeamSequence::find(), OpalFilter::find(), OpalWake::find(), Beam::find(), ParticleMatterInteraction::find(), FieldSolver::find(), BoundaryGeometry::find(), Element::find(), Table::find(), OpalParser::find(), Distribution::find(), Edit::finish(), getAllNames(), LineTemplate::makeInstance(), SequenceTemplate::makeInstance(), MatchParser::MatchParser(), EditInstall::parse(), OpalParser::parseAssign(), Line::parseList(), Expressions::parseRelation(), ParallelTTracker::setOptionalVariables(), Sequence::updateList(), AttWriter::visitFlaggedElmPtr(), and FlatWriter::visitMapIntegrator().
std::vector< std::string > OpalData::getAllNames | ( | ) |
Definition at line 749 of file OpalData.cpp.
References Directory::begin(), Directory::end(), endl(), find(), Attribute::getBase(), Object::getCategory(), AttributeBase::getImage(), getInstance(), RealVariable::getReal(), Object::isBuiltin(), Object::itsAttr, OpalDataImpl::mainDirectory, p, and ValueDefinition::value().
std::vector< std::string > OpalData::getArguments | ( | ) |
Definition at line 837 of file OpalData.cpp.
References OpalDataImpl::arguments_m, and p.
DataSink * OpalData::getDataSink | ( | ) |
Definition at line 435 of file OpalData.cpp.
References OpalDataImpl::dataSink_m, and p.
Referenced by TrackRun::initDataSink(), and P3MPoissonSolver::test().
energyEvolution_t::iterator OpalData::getFirstEnergyData | ( | ) |
Definition at line 459 of file OpalData.cpp.
References OpalDataImpl::energyEvolution_m, and p.
std::vector< MaxPhasesT >::iterator OpalData::getFirstMaxPhases | ( | ) |
Definition at line 443 of file OpalData.cpp.
References OpalDataImpl::maxPhases_m, and p.
Referenced by ParallelSliceTracker::handleAutoPhasing(), ParallelSliceTracker::restoreCavityPhases(), ParallelTTracker::restoreCavityPhases(), and H5PartWrapper::storeCavityInformation().
BoundaryGeometry * OpalData::getGlobalGeometry | ( | ) |
Definition at line 506 of file OpalData.cpp.
References OpalDataImpl::bg_m, and p.
Referenced by ParallelCyclotronTracker::execute(), and FieldSolver::initSolver().
double OpalData::getGlobalPhaseShift | ( | ) |
units: (sec)
units: (sec)
Definition at line 497 of file OpalData.cpp.
References OpalDataImpl::gPhaseShift_m, and p.
Referenced by Distribution::doRestartOpalT(), ParallelSliceTracker::execute(), ParallelTTracker::execute(), ParallelSliceTracker::printRFPhases(), H5PartWrapperForPT::writeHeader(), and H5PartWrapperForPS::writeHeader().
std::string OpalData::getInputBasename | ( | ) |
get input file name without extension
Definition at line 717 of file OpalData.cpp.
References OpalDataImpl::inputFn_m, and p.
Referenced by ThickTracker::advanceDispersion_m(), AmrYtWriter::AmrYtWriter(), PartBunch::computeSelfFields(), PartBunch::computeSelfFields_cycl(), ClosedOrbitFinder< Value_type, Size_type, Stepper >::findOrbit(), DataSink::init(), ParallelCyclotronTracker::initializeTracking_m(), DataSink::initMultiBunchDump(), ParallelCyclotronTracker::initTrackOrbitFile(), main(), OrbitThreader::OrbitThreader(), OpalBeamline::save3DLattice(), TrackRun::setupCyclotronTracker(), TrackRun::setupSliceTracker(), TrackRun::setupThickTracker(), TrackRun::setupTTracker(), ThickTracker::write_m(), Distribution::writeOutFileEmission(), Distribution::writeOutFileHeader(), Distribution::writeOutFileInjection(), and Monitor::writeStatistics().
std::string OpalData::getInputFn | ( | ) |
get opals input filename
Definition at line 713 of file OpalData.cpp.
References OpalDataImpl::inputFn_m, and p.
Referenced by GridLBalWriter::fillHeader(), MemoryWriter::fillHeader(), LBalWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), MemoryProfiler::header(), TrackRun::setupSliceTracker(), and AmrMultiGrid::writeSDDSHeader_m().
|
static |
Definition at line 209 of file OpalData.cpp.
References instance, isInstantiated, and OpalData().
Referenced by Expressions::AAutomatic< T >::AAutomatic(), SDDSWriter::addDefaultParameters(), CorrectionBase::addKick(), Distribution::adjustPhaseSpace(), ThickTracker::advanceDispersion_m(), AmrYtWriter::AmrYtWriter(), Monitor::applyToReferenceParticle(), Beam::Beam(), BoundaryGeometry::BoundaryGeometry(), PartBunchBase< T, Dim >::calcBeamParameters(), MultiBunchHandler::calcBunchBeamParameters(), PartBunchBase< T, Dim >::calcGammas(), PartBunchBase< T, Dim >::calcMoments(), Bend2D::calculateRefTrajectory(), Fieldmap::checkMap(), PartBunch::computeSelfFields(), PartBunch::computeSelfFields_cycl(), Distribution::createOpalCycl(), Distribution::createOpalT(), Distribution::Distribution(), Distribution::doRestartOpalCycl(), Distribution::doRestartOpalT(), ParallelCyclotronTracker::dumpAngle(), Match::evaluate(), SampleCmd::execute(), OptimizeCmd::execute(), Help::execute(), MakeSequence::execute(), Save::execute(), Show::execute(), EditCmd::execute(), What::execute(), Title::execute(), Dump::execute(), ThreadBpm::execute(), Select::execute(), ThreadAll::execute(), AttList::execute(), Envelope::execute(), MatrixCmd::execute(), Eigen::execute(), Twiss3::execute(), Micado::execute(), WhileStatement::execute(), IfStatement::execute(), OpalParser::execute(), Survey::execute(), ParallelSliceTracker::execute(), Twiss::execute(), ParallelCyclotronTracker::execute(), ParallelTTracker::execute(), ThickTracker::execute(), Expressions::ARefExpr< T >::fill(), Expressions::SRefExpr< T >::fill(), Expressions::ARefAttr< T >::fill(), Expressions::SRefAttr< T >::fill(), GridLBalWriter::fillHeader(), LBalWriter::fillHeader(), MemoryWriter::fillHeader(), ElementPositionWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), OpalSBend::fillRegisteredAttributes(), OpalRBend::fillRegisteredAttributes(), OpalSolenoid::fillRegisteredAttributes(), OpalHKicker::fillRegisteredAttributes(), OpalMultipole::fillRegisteredAttributes(), OpalOctupole::fillRegisteredAttributes(), OpalSextupole::fillRegisteredAttributes(), OpalQuadrupole::fillRegisteredAttributes(), OpalVKicker::fillRegisteredAttributes(), OpalKicker::fillRegisteredAttributes(), OpalSample::find(), OpalTrimCoil::find(), BeamSequence::find(), OpalFilter::find(), OpalWake::find(), Beam::find(), ParticleMatterInteraction::find(), FieldSolver::find(), BoundaryGeometry::find(), Element::find(), Table::find(), OpalParser::find(), Distribution::find(), ClosedOrbitFinder< Value_type, Size_type, Stepper >::findOrbit(), Edit::finish(), getAllNames(), Expressions::getEkin(), FM3DDynamic::getOnaxisEz(), Bend2D::getOutline(), CavityAutophaser::getPhaseAtMaxEnergy(), Attributes::getString(), Attributes::getStringArray(), H5PartWrapperForPS::H5PartWrapperForPS(), H5PartWrapperForPT::H5PartWrapperForPT(), ParallelSliceTracker::handleAutoPhasing(), MemoryProfiler::header(), DataSink::init(), ParallelCyclotronTracker::initDistInGlobalFrame(), Monitor::initialise(), ParallelCyclotronTracker::initializeTracking_m(), DataSink::initMultiBunchDump(), FieldSolver::initSolver(), ParallelCyclotronTracker::initTrackOrbitFile(), OrbitThreader::integrate(), CorrectionBase::listCorrectors(), main(), LineTemplate::makeInstance(), SequenceTemplate::makeInstance(), MatchParser::MatchParser(), MultiBunchHandler::MultiBunchHandler(), OpalFilter::OpalFilter(), OpalMarker::OpalMarker(), OpalTrimCoil::OpalTrimCoil(), OpalWake::OpalWake(), OrbitThreader::OrbitThreader(), EditInstall::parse(), SequenceParser::parse(), OpalParser::parse(), Line::parse(), OpalParser::parseAssign(), OpalParser::parseDefine(), Line::parseList(), OpalParser::parseMacro(), SequenceParser::parseMember(), Expressions::parseRelation(), ParticleMatterInteraction::ParticleMatterInteraction(), Match::print(), Distribution::printInfo(), ParallelSliceTracker::printRFPhases(), Survey::printTable(), Twiss::printTableTitle(), H5PartWrapperForPC::readHeader(), H5PartWrapperForPT::readHeader(), H5PartWrapperForPS::readHeader(), RealConstant::RealConstant(), RealVariable::RealVariable(), ParallelSliceTracker::restoreCavityPhases(), ParallelTTracker::restoreCavityPhases(), run_opal(), Expressions::SAutomatic< T >::SAutomatic(), PeakFinder::save(), PluginElement::save(), LossDataSink::save(), OpalBeamline::save3DInput(), OpalBeamline::save3DLattice(), IndexMap::saveSDDS(), ConcreteVar::setExternalValue(), ParallelTTracker::setOptionalVariables(), MultiBunchHandler::setRadiusTurns(), PartBunchBase< T, Dim >::setSolver(), ParallelSliceTracker::setTime(), TrackRun::setupCyclotronTracker(), TrackRun::setupFieldsolver(), OpalSimulation::setupSimulation(), TrackRun::setupSliceTracker(), TrackRun::setupThickTracker(), TrackRun::setupTTracker(), Match::setVariables(), H5PartWrapper::storeCavityInformation(), Sequence::storeLine(), StringConstant::StringConstant(), Table::Table(), P3MPoissonSolver::test(), Track::Track(), RBend3D::trackRefParticleThrough(), TrackRun::TrackRun(), OpalSBend::update(), OpalRBend::update(), OpalSolenoid::update(), OpalHKicker::update(), OpalSextupole::update(), OpalMultipole::update(), OpalOctupole::update(), OpalQuadrupole::update(), OpalVKicker::update(), OpalKicker::update(), Sequence::updateList(), AmrPartBunch::updateLorentzFactor(), ParallelCyclotronTracker::visitCyclotron(), AttWriter::visitFlaggedElmPtr(), FlatWriter::visitMapIntegrator(), StatWriter::write(), ThickTracker::write_m(), H5PartWrapperForPT::writeHeader(), H5PartWrapperForPS::writeHeader(), LossDataSink::writeHeaderH5(), Distribution::writeOutFileEmission(), Distribution::writeOutFileHeader(), Distribution::writeOutFileInjection(), AmrYtWriter::writeParticles_m(), AmrMultiGrid::writeSDDSHeader_m(), Monitor::writeStatistics(), AttList::writeTable(), Expressions::AAutomatic< T >::~AAutomatic(), Expressions::SAutomatic< T >::~SAutomatic(), and Table::~Table().
energyEvolution_t::iterator OpalData::getLastEnergyData | ( | ) |
Definition at line 463 of file OpalData.cpp.
References OpalDataImpl::energyEvolution_m, and p.
std::vector< MaxPhasesT >::iterator OpalData::getLastMaxPhases | ( | ) |
Definition at line 447 of file OpalData.cpp.
References OpalDataImpl::maxPhases_m, and p.
Referenced by ParallelSliceTracker::handleAutoPhasing(), ParallelSliceTracker::restoreCavityPhases(), ParallelTTracker::restoreCavityPhases(), and H5PartWrapper::storeCavityInformation().
int OpalData::getLastStep | ( | ) | const |
get the last step from a possible previous run
Definition at line 389 of file OpalData.cpp.
References OpalDataImpl::last_step_m, and p.
unsigned long long OpalData::getMaxTrackSteps | ( | ) |
Definition at line 249 of file OpalData.cpp.
References OpalDataImpl::maxTrackSteps_m, and p.
int OpalData::getNumberOfMaxPhases | ( | ) |
Definition at line 451 of file OpalData.cpp.
References OpalDataImpl::maxPhases_m, and p.
Referenced by H5PartWrapper::storeCavityInformation().
OpalData::OPENMODE OpalData::getOpenMode | ( | ) | const |
Definition at line 381 of file OpalData.cpp.
References OpalDataImpl::openMode_m, and p.
Referenced by Monitor::applyToReferenceParticle(), PluginElement::save(), and LossDataSink::save().
double OpalData::getP0 | ( | ) | const |
Return value of global reference momentum.
Definition at line 623 of file OpalData.cpp.
References ValueDefinition::getReal(), p, and OpalDataImpl::referenceMomentum.
Referenced by OpalSBend::fillRegisteredAttributes(), OpalRBend::fillRegisteredAttributes(), OpalSolenoid::fillRegisteredAttributes(), OpalHKicker::fillRegisteredAttributes(), OpalMultipole::fillRegisteredAttributes(), OpalOctupole::fillRegisteredAttributes(), OpalSextupole::fillRegisteredAttributes(), OpalQuadrupole::fillRegisteredAttributes(), OpalVKicker::fillRegisteredAttributes(), OpalKicker::fillRegisteredAttributes(), CorrectionBase::listCorrectors(), OpalSBend::update(), OpalRBend::update(), OpalSolenoid::update(), OpalHKicker::update(), OpalSextupole::update(), OpalOctupole::update(), OpalMultipole::update(), OpalQuadrupole::update(), OpalVKicker::update(), and OpalKicker::update().
PartBunchBase< double, 3 > * OpalData::getPartBunch | ( | ) |
Definition at line 421 of file OpalData.cpp.
References OpalDataImpl::bunch_m, and p.
Referenced by Expressions::getEkin(), and Track::Track().
const std::map< std::string, unsigned int > & OpalData::getProblemCharacteristicValues | ( | ) | const |
Definition at line 826 of file OpalData.cpp.
References p, and OpalDataImpl::problemSize_m.
int OpalData::getRestartDumpFreq | ( | ) | const |
get the dump frequency as found in restart file
Definition at line 373 of file OpalData.cpp.
References p, and OpalDataImpl::restart_dump_freq_m.
std::string OpalData::getRestartFileName | ( | ) |
get opals restart h5 format filename
Definition at line 354 of file OpalData.cpp.
References p, and OpalDataImpl::restartFn_m.
Referenced by TrackRun::setupCyclotronTracker(), TrackRun::setupSliceTracker(), TrackRun::setupThickTracker(), and TrackRun::setupTTracker().
int OpalData::getRestartStep | ( | ) |
get the step where to restart
Definition at line 349 of file OpalData.cpp.
References p, and OpalDataImpl::restartStep_m.
Referenced by TrackRun::setDistributionParallelT(), TrackRun::setupCyclotronTracker(), TrackRun::setupSliceTracker(), TrackRun::setupThickTracker(), and TrackRun::setupTTracker().
EnvelopeBunch * OpalData::getSLPartBunch | ( | ) |
Definition at line 405 of file OpalData.cpp.
References p, and OpalDataImpl::slbunch_m.
Referenced by Track::Track().
std::string OpalData::getTitle | ( | ) |
Get the title string.
Definition at line 709 of file OpalData.cpp.
References OpalDataImpl::itsTitle_m, and p.
bool OpalData::hasBunchAllocated | ( | ) |
true if we already allocated a ParticleBunch object
Definition at line 409 of file OpalData.cpp.
References OpalDataImpl::hasBunchAllocated_m, and p.
Referenced by TrackRun::setDistributionParallelT(), TrackRun::setupCyclotronTracker(), TrackRun::setupSliceTracker(), TrackRun::setupThickTracker(), and TrackRun::setupTTracker().
bool OpalData::hasDataSinkAllocated | ( | ) |
true if we already allocated a DataSink object
Definition at line 426 of file OpalData.cpp.
References OpalDataImpl::hasDataSinkAllocated_m, and p.
Referenced by TrackRun::initDataSink().
bool OpalData::hasGlobalGeometry | ( | ) |
Definition at line 510 of file OpalData.cpp.
References OpalDataImpl::bg_m, and p.
Referenced by TrackRun::setupTTracker().
bool OpalData::hasPriorTrack | ( | ) |
true if in follow-up track
Definition at line 328 of file OpalData.cpp.
References OpalDataImpl::hasPriorRun_m, and p.
bool OpalData::hasRestartFile | ( | ) |
true if we do a restart from specified h5 file
Definition at line 364 of file OpalData.cpp.
References OpalDataImpl::hasRestartFile_m, and p.
bool OpalData::hasSLBunchAllocated | ( | ) |
true if we already allocated a ParticleBunch object
Definition at line 393 of file OpalData.cpp.
References OpalDataImpl::hasSLBunchAllocated_m, and p.
Referenced by TrackRun::setupSliceTracker().
void OpalData::incMaxTrackSteps | ( | unsigned long long | s | ) |
Definition at line 257 of file OpalData.cpp.
References OpalDataImpl::maxTrackSteps_m, and p.
bool OpalData::inRestartRun | ( | ) |
true if we do a restart run
Definition at line 336 of file OpalData.cpp.
References OpalDataImpl::isRestart_m, and p.
Referenced by TrackRun::initDataSink(), DataSink::initMultiBunchDump(), main(), TrackRun::setDistributionParallelT(), TrackRun::setupCyclotronTracker(), TrackRun::setupFieldsolver(), TrackRun::setupSliceTracker(), TrackRun::setupThickTracker(), and TrackRun::setupTTracker().
bool OpalData::isInOPALCyclMode | ( | ) |
Definition at line 288 of file OpalData.cpp.
References OpalDataImpl::isInOPALCyclMode_m, and p.
Referenced by AmrMultiGrid::writeSDDSHeader_m().
bool OpalData::isInOPALEnvMode | ( | ) |
Definition at line 296 of file OpalData.cpp.
References OpalDataImpl::isInOPALEnvMode_m, and p.
bool OpalData::isInOPALTMode | ( | ) |
Definition at line 292 of file OpalData.cpp.
References OpalDataImpl::isInOPALTMode_m, and p.
Referenced by AmrMultiGrid::writeSDDSHeader_m().
bool OpalData::isInPrepState | ( | ) |
Definition at line 320 of file OpalData.cpp.
References OpalDataImpl::isInPrepState_m, and p.
bool OpalData::isOptimizerRun | ( | ) |
Definition at line 300 of file OpalData.cpp.
References OpalDataImpl::isOptimizerFlag_m, and p.
void OpalData::makeDirty | ( | Object * | object | ) |
Invalidate expressions.
Definition at line 629 of file OpalData.cpp.
References OpalDataImpl::modified, p, and Object::setDirty().
Referenced by Edit::finish(), SequenceParser::parse(), OpalParser::parseAssign(), ConcreteVar::setExternalValue(), and Match::setVariables().
|
private |
|
static |
Definition at line 236 of file OpalData.cpp.
References deleteInstance(), instance, isInstantiated, and stashedInstances.
Referenced by SampleCmd::popEnvironment(), and OptimizeCmd::popEnvironment().
void OpalData::printNames | ( | std::ostream & | stream, |
const std::string & | pattern | ||
) |
Print all objects.
Definition at line 635 of file OpalData.cpp.
References Directory::begin(), Directory::end(), endl(), OpalDataImpl::mainDirectory, RegularExpression::match(), name, and p.
Referenced by Show::execute().
void OpalData::printTitle | ( | std::ostream & | os | ) |
Print the page title.
Definition at line 705 of file OpalData.cpp.
References OpalDataImpl::itsTitle_m, and p.
Referenced by Survey::printTable(), Twiss::printTableTitle(), and AttList::writeTable().
void OpalData::registerExpression | ( | AttributeBase * | expr | ) |
Register expression.
Definition at line 681 of file OpalData.cpp.
References OpalDataImpl::exprDirectory, and p.
Referenced by Expressions::AAutomatic< T >::AAutomatic(), and Expressions::SAutomatic< T >::SAutomatic().
void OpalData::registerTable | ( | Table * | t | ) |
Register table.
Definition at line 667 of file OpalData.cpp.
References p, and OpalDataImpl::tableDirectory.
Referenced by Table::Table().
void OpalData::reset | ( | ) |
reset object for consecutive runs
Definition at line 270 of file OpalData.cpp.
References OpalDataImpl::gPhaseShift_m, OpalDataImpl::hasBunchAllocated_m, OpalDataImpl::hasDataSinkAllocated_m, OpalDataImpl::hasPriorRun_m, OpalDataImpl::hasRestartFile_m, OpalDataImpl::hasSLBunchAllocated_m, OpalDataImpl::isInOPALCyclMode_m, OpalDataImpl::isInOPALEnvMode_m, OpalDataImpl::isInOPALTMode_m, OpalDataImpl::isInPrepState_m, OpalDataImpl::isOptimizerFlag_m, OpalDataImpl::isRestart_m, OpalDataImpl::maxPhases_m, and p.
void OpalData::setDataSink | ( | DataSink * | s | ) |
Definition at line 430 of file OpalData.cpp.
References OpalDataImpl::dataSink_m, OpalDataImpl::hasDataSinkAllocated_m, and p.
Referenced by TrackRun::initDataSink().
void OpalData::setGlobalGeometry | ( | BoundaryGeometry * | bg | ) |
Definition at line 502 of file OpalData.cpp.
References OpalDataImpl::bg_m, and p.
Referenced by TrackRun::setupCyclotronTracker(), TrackRun::setupThickTracker(), and TrackRun::setupTTracker().
void OpalData::setGlobalPhaseShift | ( | double | shift | ) |
units: (sec)
units: (sec)
Definition at line 492 of file OpalData.cpp.
References OpalDataImpl::gPhaseShift_m, and p.
Referenced by ParallelTTracker::execute(), ThickTracker::execute(), H5PartWrapperForPT::readHeader(), H5PartWrapperForPS::readHeader(), TrackRun::setDistributionParallelT(), and TrackRun::setupSliceTracker().
void OpalData::setInOPALCyclMode | ( | ) |
Definition at line 304 of file OpalData.cpp.
References OpalDataImpl::isInOPALCyclMode_m, and p.
Referenced by TrackRun::setupCyclotronTracker().
void OpalData::setInOPALEnvMode | ( | ) |
Definition at line 312 of file OpalData.cpp.
References OpalDataImpl::isInOPALEnvMode_m, and p.
Referenced by TrackRun::setupSliceTracker().
void OpalData::setInOPALTMode | ( | ) |
Definition at line 308 of file OpalData.cpp.
References OpalDataImpl::isInOPALTMode_m, and p.
Referenced by TrackRun::setupTTracker().
void OpalData::setInPrepState | ( | bool | state | ) |
Definition at line 324 of file OpalData.cpp.
References OpalDataImpl::isInPrepState_m, and p.
Referenced by ParallelTTracker::execute(), and ThickTracker::execute().
void OpalData::setLastStep | ( | const int & | step | ) |
set the last step in a run for possible follow-up run
Definition at line 385 of file OpalData.cpp.
References OpalDataImpl::last_step_m, and p.
Referenced by ParallelSliceTracker::execute().
void OpalData::setMaxPhase | ( | std::string | elName, |
double | phi | ||
) |
Definition at line 439 of file OpalData.cpp.
References OpalDataImpl::maxPhases_m, and p.
Referenced by CavityAutophaser::getPhaseAtMaxEnergy().
void OpalData::setMaxTrackSteps | ( | unsigned long long | s | ) |
Definition at line 253 of file OpalData.cpp.
References OpalDataImpl::maxTrackSteps_m, and p.
void OpalData::setOpenMode | ( | OPENMODE | openMode | ) |
Definition at line 377 of file OpalData.cpp.
References OpalDataImpl::openMode_m, and p.
Referenced by ParallelCyclotronTracker::execute(), ParallelTTracker::execute(), and ThickTracker::execute().
void OpalData::setOptimizerFlag | ( | ) |
Definition at line 316 of file OpalData.cpp.
References OpalDataImpl::isOptimizerFlag_m, and p.
Referenced by OpalSimulation::setupSimulation().
void OpalData::setP0 | ( | ValueDefinition * | p0 | ) |
Set the global momentum.
Definition at line 691 of file OpalData.cpp.
References p, and OpalDataImpl::referenceMomentum.
Referenced by define(), and RealVariable::RealVariable().
void OpalData::setPartBunch | ( | PartBunchBase< double, 3 > * | p | ) |
Definition at line 417 of file OpalData.cpp.
References OpalDataImpl::bunch_m, and p.
Referenced by Track::Track().
void OpalData::setPriorTrack | ( | const bool & | value = true | ) |
true if in follow-up track
Definition at line 332 of file OpalData.cpp.
References OpalDataImpl::hasPriorRun_m, and p.
Referenced by ParallelTTracker::execute().
void OpalData::setRestartDumpFreq | ( | const int & | N | ) |
set the dump frequency as found in restart file
Definition at line 369 of file OpalData.cpp.
References p, and OpalDataImpl::restart_dump_freq_m.
Referenced by H5PartWrapperForPC::readHeader(), H5PartWrapperForPT::readHeader(), and H5PartWrapperForPS::readHeader().
void OpalData::setRestartFileName | ( | std::string | s | ) |
store opals restart h5 format filename
Definition at line 359 of file OpalData.cpp.
References OpalDataImpl::hasRestartFile_m, p, and OpalDataImpl::restartFn_m.
Referenced by main(), and run_opal().
void OpalData::setRestartRun | ( | const bool & | value = true | ) |
set OPAL in restart mode
Definition at line 340 of file OpalData.cpp.
References OpalDataImpl::isRestart_m, and p.
Referenced by TrackRun::execute(), main(), and run_opal().
void OpalData::setRestartStep | ( | int | s | ) |
store the location where to restart
Definition at line 345 of file OpalData.cpp.
References p, and OpalDataImpl::restartStep_m.
Referenced by H5PartWrapperForPS::H5PartWrapperForPS(), H5PartWrapperForPT::H5PartWrapperForPT(), main(), and run_opal().
void OpalData::setSLPartBunch | ( | EnvelopeBunch * | p | ) |
Definition at line 401 of file OpalData.cpp.
References p, and OpalDataImpl::slbunch_m.
Referenced by Track::Track().
void OpalData::slbunchIsAllocated | ( | ) |
Definition at line 397 of file OpalData.cpp.
References OpalDataImpl::hasSLBunchAllocated_m, and p.
Referenced by TrackRun::execute().
|
static |
Definition at line 225 of file OpalData.cpp.
References instance, isInstantiated, MAX_NUM_INSTANCES, and stashedInstances.
Referenced by SampleCmd::stashEnvironment(), and OptimizeCmd::stashEnvironment().
void OpalData::storeArguments | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 830 of file OpalData.cpp.
References OpalDataImpl::arguments_m, and p.
Referenced by main().
void OpalData::storeInputFn | ( | const std::string & | fn | ) |
store opals input filename
Definition at line 700 of file OpalData.cpp.
References OpalDataImpl::inputFn_m, and p.
Referenced by main(), and run_opal().
void OpalData::storeTitle | ( | const std::string & | title | ) |
Store the page title.
Definition at line 696 of file OpalData.cpp.
References OpalDataImpl::itsTitle_m, and p.
Referenced by Title::execute().
void OpalData::unregisterExpression | ( | AttributeBase * | expr | ) |
Unregister expression.
Definition at line 686 of file OpalData.cpp.
References OpalDataImpl::exprDirectory, and p.
Referenced by Expressions::AAutomatic< T >::~AAutomatic(), and Expressions::SAutomatic< T >::~SAutomatic().
void OpalData::unregisterTable | ( | Table * | t | ) |
Unregister table.
Definition at line 672 of file OpalData.cpp.
References p, and OpalDataImpl::tableDirectory.
Referenced by Table::~Table().
void OpalData::update | ( | ) |
Update all objects.
Definition at line 723 of file OpalData.cpp.
References Directory::begin(), Directory::end(), OpalDataImpl::exprDirectory, OpalDataImpl::mainDirectory, OpalDataImpl::modified, p, and OpalDataImpl::tableDirectory.
Referenced by Match::evaluate(), ThreadBpm::execute(), ThreadAll::execute(), Micado::execute(), WhileStatement::execute(), IfStatement::execute(), OpalParser::execute(), Survey::execute(), Twiss::execute(), and Match::print().
|
staticprivate |
Definition at line 281 of file OpalData.h.
Referenced by deleteInstance(), getInstance(), popInstance(), and stashInstance().
|
staticprivate |
Definition at line 280 of file OpalData.h.
Referenced by deleteInstance(), getInstance(), popInstance(), and stashInstance().
|
private |
Definition at line 291 of file OpalData.h.
Referenced by addEnergyData(), addProblemCharacteristicValue(), apply(), bunchIsAllocated(), create(), define(), erase(), find(), getAllNames(), getArguments(), getDataSink(), getFirstEnergyData(), getFirstMaxPhases(), getGlobalGeometry(), getGlobalPhaseShift(), getInputBasename(), getInputFn(), getLastEnergyData(), getLastMaxPhases(), getLastStep(), getMaxTrackSteps(), getNumberOfMaxPhases(), getOpenMode(), getP0(), getPartBunch(), getProblemCharacteristicValues(), getRestartDumpFreq(), getRestartFileName(), getRestartStep(), getSLPartBunch(), getTitle(), hasBunchAllocated(), hasDataSinkAllocated(), hasGlobalGeometry(), hasPriorTrack(), hasRestartFile(), hasSLBunchAllocated(), incMaxTrackSteps(), inRestartRun(), isInOPALCyclMode(), isInOPALEnvMode(), isInOPALTMode(), isInPrepState(), isOptimizerRun(), makeDirty(), OpalData(), printNames(), printTitle(), registerExpression(), registerTable(), reset(), setDataSink(), setGlobalGeometry(), setGlobalPhaseShift(), setInOPALCyclMode(), setInOPALEnvMode(), setInOPALTMode(), setInPrepState(), setLastStep(), setMaxPhase(), setMaxTrackSteps(), setOpenMode(), setOptimizerFlag(), setP0(), setPartBunch(), setPriorTrack(), setRestartDumpFreq(), setRestartFileName(), setRestartRun(), setRestartStep(), setSLPartBunch(), slbunchIsAllocated(), storeArguments(), storeInputFn(), storeTitle(), unregisterExpression(), unregisterTable(), update(), and ~OpalData().
|
staticprivate |
Definition at line 282 of file OpalData.h.
Referenced by popInstance(), and stashInstance().