OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
Classes | |
struct | KahanAccumulation |
Functions | |
std::string | getGitRevision () |
double | erfinv (double x) |
Vector_t | getTaitBryantAngles (Quaternion rotation, const std::string &) |
std::string | toUpper (const std::string &str) |
std::string | combineFilePath (std::initializer_list< std::string > ilist) |
unsigned int | rewindLinesSDDS (const std::string &fileName, double maxSPos, bool checkForTime) |
rewind the SDDS file such that the spos of the last step is less or equal to maxSPos More... | |
std::string | base64_encode (const std::string &string_to_encode) |
std::string | base64_decode (std::string const &encoded_string) |
double | getGamma (Vector_t p) |
Vector_t | getBeta (Vector_t p) |
double | getKineticEnergy (Vector_t p, double mass) |
double | getBetaGamma (double Ekin, double mass) |
double | convertMomentumEVoverCToBetaGamma (double p, double mass) |
std::string | getTimeString (double time, unsigned int precision=3) |
std::string | getLengthString (double spos, unsigned int precision=3) |
std::string | getLengthString (Vector_t spos, unsigned int precision=3) |
std::string | getEnergyString (double energyInMeV, unsigned int precision=3) |
std::string | getChargeString (double charge, unsigned int precision=3) |
template<typename T > | |
std::string | toStringWithThousandSep (T value, char sep='\'') |
template<typename T , typename A > | |
T * | c_data (std::vector< T, A > &v) |
template<typename T , typename A > | |
T const * | c_data (std::vector< T, A > const &v) |
std::string Util::base64_decode | ( | std::string const & | encoded_string | ) |
std::string Util::base64_encode | ( | const std::string & | string_to_encode | ) |
Definition at line 310 of file Util.cpp.
Referenced by MeshGenerator::write().
T* Util::c_data | ( | std::vector< T, A > & | v | ) |
Definition at line 201 of file Util.h.
References Attrib::Legacy::Distribution::T.
Referenced by H5PartWrapper::copyStepData(), H5PartWrapperForPC::readStepData(), H5PartWrapperForPT::readStepData(), H5PartWrapperForPC::writeStepData(), and H5PartWrapperForPT::writeStepData().
T const* Util::c_data | ( | std::vector< T, A > const & | v | ) |
Definition at line 204 of file Util.h.
References Attrib::Legacy::Distribution::T.
std::string Util::combineFilePath | ( | std::initializer_list< std::string > | ilist | ) |
Definition at line 139 of file Util.cpp.
Referenced by CSRIGFWakeFunction::apply(), CSRWakeFunction::apply(), Bend2D::calculateRefTrajectory(), Fieldmap::checkMap(), BoundaryGeometry::computeMeshVoxelization(), FM3DDynamic::getOnaxisEz(), Bend2D::getOutline(), CavityAutophaser::getPhaseAtMaxEnergy(), SigmaGenerator::initialize(), SigmaGenerator::match(), OrbitThreader::OrbitThreader(), LaserProfile::sampleDist(), OpalBeamline::save3DInput(), OpalBeamline::save3DLattice(), LaserProfile::saveData(), LaserProfile::saveHistogram(), IndexMap::saveSDDS(), RBend3D::trackRefParticleThrough(), SigmaGenerator::updateInitialSigma(), SigmaGenerator::updateSigma(), MeshGenerator::write(), Fieldmap::write3DField(), DumpEMFields::writeFieldThis(), DumpFields::writeFieldThis(), FlexibleCollimator::writeHolesAndQuadtree(), SigmaGenerator::writeOrbitOutput_m(), Distribution::writeOutFileEmission(), Distribution::writeOutFileHeader(), Distribution::writeOutFileInjection(), and Cyclotron::writeOutputFieldFiles().
|
inline |
Definition at line 50 of file Util.h.
Referenced by Distribution::adjustPhaseSpace(), Distribution::createDistributionFromFile(), Distribution::createOpalT(), Distribution::setSigmaP_m(), and Distribution::shiftDistCoordinates().
double Util::erfinv | ( | double | x | ) |
Definition at line 42 of file Util.cpp.
References erf(), erfinv_a0, erfinv_a1, erfinv_a2, erfinv_a3, erfinv_b0, erfinv_b1, erfinv_b2, erfinv_b3, erfinv_b4, erfinv_c0, erfinv_c1, erfinv_c2, erfinv_c3, erfinv_d0, erfinv_d1, erfinv_d2, exp(), log(), and sqrt().
Referenced by SampleGaussianSequence::SampleGaussianSequence().
Definition at line 32 of file Util.h.
References getGamma().
Referenced by Monitor::apply(), and Monitor::applyToReferenceParticle().
|
inline |
Definition at line 42 of file Util.h.
Referenced by Distribution::generateMatchedGauss(), RFCavity::getAutoPhaseEstimate(), RFCavity::getAutoPhaseEstimateFallback(), Distribution::setupEmissionModelAstra(), Distribution::setupEmissionModelNone(), and SigmaGenerator::SigmaGenerator().
|
inline |
Definition at line 151 of file Util.h.
References abs().
Referenced by PartBunchBase< T, Dim >::print().
|
inline |
Definition at line 128 of file Util.h.
Referenced by ParallelTTracker::dumpStats(), and PartBunchBase< T, Dim >::print().
|
inline |
Definition at line 27 of file Util.h.
Referenced by Source::apply(), Corrector::apply(), PluginElement::changeWidth(), OrbitThreader::checkElementLengths(), ScatteringPhysics::computeEnergyLoss(), DistributionMoments::computeMeans(), ScatteringPhysics::copyFromBunch(), ParallelTTracker::execute(), ParallelTTracker::findStartPosition(), getBeta(), getKineticEnergy(), ScatteringPhysics::push(), ScatteringPhysics::setTimeStepForLeavingParticles(), RFCavity::trackOnAxisParticle(), OrbitThreader::updateBoundingBoxWithCurrentPosition(), and ParallelTTracker::writePhaseSpace().
std::string Util::getGitRevision | ( | ) |
Definition at line 18 of file Util.cpp.
References GIT_VERSION.
Referenced by SDDSWriter::addDefaultParameters(), main(), SDDSWriter::replaceVersionString(), StringConstant::StringConstant(), H5PartWrapperForPC::writeHeader(), H5PartWrapperForPT::writeHeader(), LossDataSink::writeHeaderH5(), and AmrMultiGrid::writeSDDSHeader_m().
|
inline |
Definition at line 37 of file Util.h.
References getGamma().
Referenced by DistributionMoments::computeMeanKineticEnergy(), DistributionMoments::computeStatistics(), ParallelTTracker::findStartPosition(), RFCavity::getAutoPhaseEstimateFallback(), CavityAutophaser::getPhaseAtMaxEnergy(), CavityAutophaser::guessCavityPhase(), CavityAutophaser::track(), and RFCavity::trackOnAxisParticle().
|
inline |
Definition at line 78 of file Util.h.
References abs().
Referenced by ParallelTTracker::dumpStats(), ParallelTTracker::execute(), and PartBunchBase< T, Dim >::print().
|
inline |
Vector_t Util::getTaitBryantAngles | ( | Quaternion | rotation, |
const std::string & | |||
) |
Definition at line 102 of file Util.cpp.
References atan2(), Quaternion::conjugate(), cos(), euclidean_norm(), fmod(), Quaternion::rotate(), sin(), and Physics::two_pi.
Referenced by OpalBeamline::save3DInput(), and H5PartWrapperForPT::writeStepHeader().
|
inline |
Definition at line 55 of file Util.h.
References abs().
Referenced by ParallelTTracker::dumpStats(), ParallelTTracker::execute(), and PartBunchBase< T, Dim >::print().
unsigned int Util::rewindLinesSDDS | ( | const std::string & | fileName, |
double | maxSPos, | ||
bool | checkForTime | ||
) |
rewind the SDDS file such that the spos of the last step is less or equal to maxSPos
Definition at line 164 of file Util.cpp.
References Physics::c, Physics::e, end(), endl(), Hypervolume::fs, INFOMSG, level2(), IpplInfo::myNode(), and name.
Referenced by StatBaseWriter::rewindToSpos(), and Monitor::writeStatistics().
std::string Util::toStringWithThousandSep | ( | T | value, |
char | sep = '\'' |
||
) |
Definition at line 209 of file Util.h.
References abs(), floor(), log(), max(), pow(), and Attrib::Legacy::Distribution::T.
Referenced by ScatteringPhysics::print().
std::string Util::toUpper | ( | const std::string & | str | ) |
Definition at line 132 of file Util.cpp.
References Physics::c.
Referenced by Physics::Material::addMaterial(), Astra1DDynamic::Astra1DDynamic(), Astra1DElectroStatic::Astra1DElectroStatic(), Astra1DMagnetoStatic::Astra1DMagnetoStatic(), OpalSimulation::cleanUp(), FieldWriter::dumpField(), FM2DDynamic::FM2DDynamic(), FM2DElectroStatic::FM2DElectroStatic(), FM2DMagnetoStatic::FM2DMagnetoStatic(), FM3DDynamic::FM3DDynamic(), FM3DMagnetoStatic::FM3DMagnetoStatic(), FM3DMagnetoStaticExtended::FM3DMagnetoStaticExtended(), Physics::Material::getMaterial(), Attributes::getString(), Attributes::getStringArray(), BoundaryGeometry::getTopology(), Bend2D::initialise(), Attributes::makePredefinedString(), Attributes::makeUpperCaseString(), Attributes::PredefinedString::parse(), Attributes::PredefinedString::PredefinedString(), FM1DDynamic::readFileHeader(), FM1DDynamic_fast::readFileHeader(), FM1DElectroStatic::readFileHeader(), FM1DElectroStatic_fast::readFileHeader(), FM1DMagnetoStatic::readFileHeader(), FM1DMagnetoStatic_fast::readFileHeader(), Astra1DDynamic_fast::readFileHeader(), Astra1DElectroStatic_fast::readFileHeader(), Astra1DMagnetoStatic_fast::readFileHeader(), Attributes::setPredefinedString(), and Attributes::setUpperCaseString().