|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <H5PartWrapperForPT.h>
Public Member Functions | |
| H5PartWrapperForPT (const std::string &fileName, h5_int32_t flags=H5_O_WRONLY) | |
| H5PartWrapperForPT (const std::string &fileName, int restartStep, std::string sourceFile, h5_int32_t flags=H5_O_RDWR) | |
| virtual | ~H5PartWrapperForPT () |
| virtual void | readHeader () |
| virtual void | readStep (PartBunchBase< double, 3 > *, h5_ssize_t firstParticle, h5_ssize_t lastParticle) |
| virtual void | writeHeader () |
| virtual void | writeStep (PartBunchBase< double, 3 > *, const std::map< std::string, double > &additionalStepAttributes) |
| virtual bool | predecessorIsSameFlavour () const |
| void | close () |
| double | getLastPosition () |
| void | storeCavityInformation () |
| size_t | getNumParticles () const |
Protected Member Functions | |
| void | open (h5_int32_t flags) |
| void | copyFile (const std::string &sourceFile, int lastStep=-1, h5_int32_t flags=H5_O_WRONLY) |
| void | copyFileSystem (const std::string &sourceFile) |
| void | copyHeader (h5_file_t source) |
| void | copyStep (h5_file_t source, int step) |
| void | copyStepHeader (h5_file_t source) |
| void | copyStepData (h5_file_t source) |
| void | sendFailureMessage (bool failed, const std::string &where, const std::string &what) |
| void | receiveFailureMessage (int sourceNode, const std::string &where, const std::string &what) |
Static Protected Member Functions | |
| static void | reportOnError (h5_int64_t rc, const char *file, int line) |
Protected Attributes | |
| h5_file_t | file_m |
| std::string | fileName_m |
| std::string | predecessorOPALFlavour_m |
| h5_int64_t | numSteps_m |
| bool | startedFromExistingFile_m |
Static Protected Attributes | |
| static std::string | copyFilePrefix_m = ".copy" |
Private Member Functions | |
| void | readStepHeader (PartBunchBase< double, 3 > *) |
| void | readStepData (PartBunchBase< double, 3 > *, h5_ssize_t, h5_ssize_t) |
| void | writeStepHeader (PartBunchBase< double, 3 > *, const std::map< std::string, double > &) |
| void | writeStepData (PartBunchBase< double, 3 > *) |
Definition at line 25 of file H5PartWrapperForPT.h.
| H5PartWrapperForPT::H5PartWrapperForPT | ( | const std::string & | fileName, |
| h5_int32_t | flags = H5_O_WRONLY ) |
Definition at line 35 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::H5PartWrapper().
| H5PartWrapperForPT::H5PartWrapperForPT | ( | const std::string & | fileName, |
| int | restartStep, | ||
| std::string | sourceFile, | ||
| h5_int32_t | flags = H5_O_RDWR ) |
Definition at line 39 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::file_m, OpalData::getInstance(), H5PartWrapper::H5PartWrapper(), and OpalData::setRestartStep().
|
virtual |
Definition at line 48 of file H5PartWrapperForPT.cpp.
|
inherited |
Definition at line 61 of file H5PartWrapper.cpp.
References IpplInfo::Comm, file_m, and REPORTONERROR.
Referenced by copyFile(), H5Writer::H5Writer(), open(), MultiBunchHandler::readBunch(), MultiBunchHandler::saveBunch(), storeCavityInformation(), H5PartWrapperForPC::writeStep(), H5PartWrapperForPT::writeStep(), and ~H5PartWrapper().
|
protectedinherited |
Definition at line 128 of file H5PartWrapper.cpp.
References close(), IpplInfo::Comm, copyFilePrefix_m, copyFileSystem(), copyHeader(), copyStep(), fileName_m, IpplInfo::getComm(), IpplInfo::myNode(), numSteps_m, open(), PAssert, predecessorOPALFlavour_m, READSTEPATTRIB, and REPORTONERROR.
Referenced by H5PartWrapper().
|
protectedinherited |
Definition at line 253 of file H5PartWrapper.cpp.
References fileName_m, IpplInfo::myNode(), receiveFailureMessage(), and sendFailureMessage().
Referenced by copyFile().
|
protectedinherited |
Definition at line 290 of file H5PartWrapper.cpp.
References file_m, READFILEATTRIB, REPORTONERROR, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.
Referenced by copyFile().
|
protectedinherited |
Definition at line 360 of file H5PartWrapper.cpp.
References copyStepData(), copyStepHeader(), file_m, numSteps_m, and REPORTONERROR.
Referenced by copyFile().
|
protectedinherited |
Definition at line 445 of file H5PartWrapper.cpp.
References Util::c_data(), file_m, IpplInfo::getNodes(), IpplInfo::myNode(), READDATA, REPORTONERROR, and WRITEDATA.
Referenced by copyStep().
|
protectedinherited |
Definition at line 371 of file H5PartWrapper.cpp.
References file_m, predecessorOPALFlavour_m, READSTEPATTRIB, REPORTONERROR, WRITESTEPATTRIB, and WRITESTRINGSTEPATTRIB.
Referenced by copyStep().
|
inlineinherited |
Definition at line 89 of file H5PartWrapper.h.
References file_m, open(), readStep(), READSTEPATTRIB, and REPORTONERROR.
|
inherited |
Definition at line 524 of file H5PartWrapper.cpp.
References file_m, numSteps_m, and REPORTONERROR.
Referenced by Distribution::doRestartOpalCycl(), Distribution::doRestartOpalT(), MultiBunchHandler::readBunch(), H5PartWrapperForPC::readStepData(), and H5PartWrapperForPT::readStepData().
|
protectedinherited |
Definition at line 71 of file H5PartWrapper.cpp.
References close(), file_m, fileName_m, IpplInfo::getComm(), and PAssert.
Referenced by copyFile(), getLastPosition(), H5PartWrapper(), H5PartWrapper(), storeCavityInformation(), H5PartWrapperForPC::writeStep(), and H5PartWrapperForPT::writeStep().
|
inlinevirtual |
Implements H5PartWrapper.
Definition at line 48 of file H5PartWrapperForPT.h.
References H5PartWrapper::predecessorOPALFlavour_m.
|
virtual |
Implements H5PartWrapper.
Definition at line 51 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::file_m, OpalData::getInstance(), name, READFILEATTRIB, REPORTONERROR, OpalData::setGlobalPhaseShift(), and OpalData::setRestartDumpFreq().
|
virtual |
Implements H5PartWrapper.
Definition at line 105 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::file_m, readStep(), readStepData(), readStepHeader(), and REPORTONERROR.
Referenced by readStep().
|
private |
Definition at line 148 of file H5PartWrapperForPT.cpp.
References PartBunchBase< T, Dim >::Bin, Util::c_data(), H5PartWrapper::file_m, H5PartWrapper::getNumParticles(), PartBunchBase< T, Dim >::ID, PartBunchBase< T, Dim >::P, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, READDATA, and REPORTONERROR.
Referenced by readStep().
|
private |
Definition at line 114 of file H5PartWrapperForPT.cpp.
References Quaternion::conjugate(), H5PartWrapper::file_m, READSTEPATTRIB, PartBunchBase< T, Dim >::RefPartP_m, PartBunchBase< T, Dim >::RefPartR_m, Quaternion::rotate(), PartBunchBase< T, Dim >::set_sPos(), PartBunchBase< T, Dim >::setGlobalTrackStep(), PartBunchBase< T, Dim >::setLocalTrackStep(), PartBunchBase< T, Dim >::setT(), and PartBunchBase< T, Dim >::toLabTrafo_m.
Referenced by readStep().
|
protectedinherited |
Definition at line 512 of file H5PartWrapper.cpp.
References IpplInfo::Comm, getMessage(), and where().
Referenced by copyFileSystem().
|
inlinestaticprotectedinherited |
Definition at line 83 of file H5PartWrapper.h.
References endl(), and ERRORMSG.
Referenced by H5PartWrapperForPT::writeStepData().
|
protectedinherited |
Definition at line 500 of file H5PartWrapper.cpp.
References IpplInfo::Comm, putMessage(), and where().
Referenced by copyFileSystem().
|
inherited |
Write number of Cavities with autophase information
Definition at line 86 of file H5PartWrapper.cpp.
References close(), end(), endl(), file_m, OpalData::getFirstMaxPhases(), OpalData::getInstance(), OpalData::getLastMaxPhases(), OpalData::getNumberOfMaxPhases(), INFOMSG, open(), WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.
|
virtual |
Write file dump frequency.
Write global phase change
Implements H5PartWrapper.
Definition at line 208 of file H5PartWrapperForPT.cpp.
References Options::ebDump, H5PartWrapper::file_m, Util::getGitRevision(), OpalData::getGlobalPhaseShift(), OpalData::getInstance(), Options::psDumpFreq, Options::rhoDump, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.
|
virtual |
Implements H5PartWrapper.
Definition at line 291 of file H5PartWrapperForPT.cpp.
References PartBunchBase< T, Dim >::calcBeamParameters(), H5PartWrapper::close(), PartBunchBase< T, Dim >::getTotalNum(), H5PartWrapper::open(), writeStepData(), and writeStepHeader().
|
private |
Write space charge field map if asked for.
Need this to align particles and fields when writing space charge map.
Definition at line 402 of file H5PartWrapperForPT.cpp.
References PartBunchBase< T, Dim >::Bf, Util::c_data(), Options::ebDump, PartBunchBase< T, Dim >::Ef, H5PartWrapper::file_m, PartBunchBase< T, Dim >::get_hr(), PartBunchBase< T, Dim >::get_origin(), PartBunchBase< T, Dim >::getFieldLayout(), FieldLayout< Dim >::getLocalNDIndex(), PartBunchBase< T, Dim >::getLocalNum(), PartBunchBase< T, Dim >::getRho(), PartBunchBase< T, Dim >::ID, max(), min(), PartBunchBase< T, Dim >::P, PartBunchBase< T, Dim >::POrigin, PartBunchBase< T, Dim >::PType, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, REPORTONERROR, H5PartWrapper::reportOnError(), Options::rhoDump, and WRITEDATA.
Referenced by writeStep().
|
private |
Write particle mass and charge per particle. (Consider making these file attributes.)
Definition at line 301 of file H5PartWrapperForPT.cpp.
References Physics::c, endl(), Physics::epsilon_0, ERRORMSG, Units::eV2GeV, H5PartWrapper::file_m, PartBunchBase< T, Dim >::get_centroid(), PartBunchBase< T, Dim >::get_emit(), PartBunchBase< T, Dim >::get_gamma(), PartBunchBase< T, Dim >::get_maxExtent(), PartBunchBase< T, Dim >::get_meanKineticEnergy(), PartBunchBase< T, Dim >::get_norm_emit(), PartBunchBase< T, Dim >::get_origin(), PartBunchBase< T, Dim >::get_PBounds(), PartBunchBase< T, Dim >::get_pmean(), PartBunchBase< T, Dim >::get_prms(), PartBunchBase< T, Dim >::get_rrms(), PartBunchBase< T, Dim >::get_sPos(), PartBunchBase< T, Dim >::getCharge(), PartBunchBase< T, Dim >::getdE(), PartBunchBase< T, Dim >::getGlobalTrackStep(), PartBunchBase< T, Dim >::getLocalTrackStep(), PartBunchBase< T, Dim >::getM(), PartBunchBase< T, Dim >::getQ(), CoordinateSystemTrafo::getRotation(), PartBunchBase< T, Dim >::getT(), Util::getTaitBryantAngles(), H5PartWrapper::numSteps_m, Physics::pi, PartBunchBase< T, Dim >::RefPartP_m, PartBunchBase< T, Dim >::RefPartR_m, REPORTONERROR, PartBunchBase< T, Dim >::toLabTrafo_m, WRITESTEPATTRIB, and WRITESTRINGSTEPATTRIB.
Referenced by writeStep().
|
staticprotectedinherited |
Definition at line 79 of file H5PartWrapper.h.
Referenced by copyFile().
|
protectedinherited |
Definition at line 73 of file H5PartWrapper.h.
Referenced by close(), copyHeader(), copyStep(), copyStepData(), copyStepHeader(), getLastPosition(), getNumParticles(), H5PartWrapper(), H5PartWrapper(), H5PartWrapperForPT::H5PartWrapperForPT(), open(), H5PartWrapperForPC::readHeader(), H5PartWrapperForPT::readHeader(), H5PartWrapperForPC::readStep(), H5PartWrapperForPT::readStep(), H5PartWrapperForPC::readStepData(), H5PartWrapperForPT::readStepData(), H5PartWrapperForPC::readStepHeader(), H5PartWrapperForPT::readStepHeader(), storeCavityInformation(), H5PartWrapperForPC::writeHeader(), H5PartWrapperForPT::writeHeader(), H5PartWrapperForPC::writeStepData(), H5PartWrapperForPT::writeStepData(), H5PartWrapperForPC::writeStepHeader(), and H5PartWrapperForPT::writeStepHeader().
|
protectedinherited |
Definition at line 74 of file H5PartWrapper.h.
Referenced by copyFile(), copyFileSystem(), H5PartWrapper(), H5PartWrapper(), and open().
|
protectedinherited |
Definition at line 76 of file H5PartWrapper.h.
Referenced by copyFile(), copyStep(), getNumParticles(), H5PartWrapper(), H5PartWrapper(), H5PartWrapperForPC::writeStep(), H5PartWrapperForPC::writeStepHeader(), and H5PartWrapperForPT::writeStepHeader().
|
protectedinherited |
Definition at line 75 of file H5PartWrapper.h.
Referenced by copyFile(), copyStepHeader(), H5PartWrapper(), H5PartWrapper(), H5PartWrapperForPC::predecessorIsSameFlavour(), H5PartWrapperForPT::predecessorIsSameFlavour(), H5PartWrapperForPC::readStepData(), and H5PartWrapperForPC::readStepHeader().
|
protectedinherited |
Definition at line 77 of file H5PartWrapper.h.
Referenced by H5PartWrapper(), and H5PartWrapper().