OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <H5PartWrapperForPS.h>
Public Member Functions | |
H5PartWrapperForPS (const std::string &fileName, h5_int32_t flags=H5_O_WRONLY) | |
H5PartWrapperForPS (const std::string &fileName, int restartStep, std::string sourceFile, h5_int32_t flags=H5_O_RDWR) | |
virtual | ~H5PartWrapperForPS () |
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 | stashPhaseSpaceEnvelope (EnvelopeBunch &bunch, Vector_t FDext[], double sposHead, double sposRef, double sposTail) |
void | dumpStashedPhaseSpaceEnvelope () |
![]() | |
virtual | ~H5PartWrapper () |
void | close () |
double | getLastPosition () |
void | storeCavityInformation () |
size_t | getNumParticles () const |
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 > *) |
Private Attributes | |
std::vector< Vektor < h5_float64_t, 3 > > | stash_RefPartR |
std::vector< Vektor < h5_float64_t, 3 > > | stash_RefPartP |
std::vector< Vektor < h5_float64_t, 3 > > | stash_centroid |
std::vector< Vektor < h5_float64_t, 3 > > | stash_geomvareps |
std::vector< Vektor < h5_float64_t, 3 > > | stash_xsigma |
std::vector< Vektor < h5_float64_t, 3 > > | stash_psigma |
std::vector< Vektor < h5_float64_t, 3 > > | stash_vareps |
std::vector< Vektor < h5_float64_t, 3 > > | stash_rmin |
std::vector< Vektor < h5_float64_t, 3 > > | stash_rmax |
std::vector< Vektor < h5_float64_t, 3 > > | stash_maxP |
std::vector< Vektor < h5_float64_t, 3 > > | stash_minP |
std::vector< Vektor < h5_float64_t, 3 > > | stash_Bhead |
std::vector< Vektor < h5_float64_t, 3 > > | stash_Ehead |
std::vector< Vektor < h5_float64_t, 3 > > | stash_Bref |
std::vector< Vektor < h5_float64_t, 3 > > | stash_Eref |
std::vector< Vektor < h5_float64_t, 3 > > | stash_Btail |
std::vector< Vektor < h5_float64_t, 3 > > | stash_Etail |
std::vector< h5_float64_t > | stash_actPos |
std::vector< h5_float64_t > | stash_t |
std::vector< h5_float64_t > | stash_meanEnergy |
std::vector< h5_float64_t > | stash_mass |
std::vector< h5_float64_t > | stash_charge |
std::vector< h5_float64_t > | stash_sposHead |
std::vector< h5_float64_t > | stash_sposRef |
std::vector< h5_float64_t > | stash_sposTail |
std::vector< size_t > | stash_nLoc |
std::vector< size_t > | stash_nTot |
Additional Inherited Members | |
![]() | |
H5PartWrapper (const std::string &fileName, h5_int32_t flags=H5_O_WRONLY) | |
H5PartWrapper (const std::string &fileName, int restartStep, std::string sourceFile, h5_int32_t flags=H5_O_RDWR) | |
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 void | reportOnError (h5_int64_t rc, const char *file, int line) |
![]() | |
h5_file_t | file_m |
std::string | fileName_m |
std::string | predecessorOPALFlavour_m |
h5_int64_t | numSteps_m |
bool | startedFromExistingFile_m |
![]() | |
static std::string | copyFilePrefix_m = ".copy" |
Definition at line 21 of file H5PartWrapperForPS.h.
H5PartWrapperForPS::H5PartWrapperForPS | ( | const std::string & | fileName, |
h5_int32_t | flags = H5_O_WRONLY |
||
) |
Definition at line 19 of file H5PartWrapperForPS.cpp.
H5PartWrapperForPS::H5PartWrapperForPS | ( | const std::string & | fileName, |
int | restartStep, | ||
std::string | sourceFile, | ||
h5_int32_t | flags = H5_O_RDWR |
||
) |
Definition at line 23 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::file_m, OpalData::getInstance(), and OpalData::setRestartStep().
|
virtual |
Definition at line 32 of file H5PartWrapperForPS.cpp.
void H5PartWrapperForPS::dumpStashedPhaseSpaceEnvelope | ( | ) |
Set current record/time step.
Write statistical data.
Write particle mass and charge per particle. (Consider making these file attributes.)
Write normalized emittance.
Write geometric emittance.
Write bunch phase space.
Definition at line 468 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::file_m, H5PartWrapper::numSteps_m, REPORTONERROR, stash_actPos, stash_Bhead, stash_Bref, stash_Btail, stash_centroid, stash_charge, stash_Ehead, stash_Eref, stash_Etail, stash_geomvareps, stash_mass, stash_maxP, stash_meanEnergy, stash_minP, stash_nLoc, stash_psigma, stash_RefPartP, stash_RefPartR, stash_rmax, stash_rmin, stash_sposHead, stash_sposRef, stash_sposTail, stash_t, stash_vareps, stash_xsigma, WRITEDATA, and WRITESTEPATTRIB.
|
inlinevirtual |
Implements H5PartWrapper.
Definition at line 79 of file H5PartWrapperForPS.h.
References H5PartWrapper::predecessorOPALFlavour_m.
|
virtual |
Implements H5PartWrapper.
Definition at line 35 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::file_m, OpalData::getInstance(), name, READFILEATTRIB, REPORTONERROR, OpalData::setGlobalPhaseShift(), and OpalData::setRestartDumpFreq().
|
virtual |
Implements H5PartWrapper.
Definition at line 89 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::file_m, readStepData(), readStepHeader(), and REPORTONERROR.
|
private |
Definition at line 104 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::file_m, H5PartWrapper::getNumParticles(), Hypervolume::n, READDATA, REPORTONERROR, EnvelopeBunch::setBeta(), EnvelopeBunch::setPx(), EnvelopeBunch::setPx0(), EnvelopeBunch::setPy(), EnvelopeBunch::setPy0(), EnvelopeBunch::setX(), EnvelopeBunch::setX0(), EnvelopeBunch::setY(), EnvelopeBunch::setY0(), and EnvelopeBunch::setZ().
Referenced by readStep().
|
private |
Definition at line 98 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::file_m, READSTEPATTRIB, and PartBunchBase< T, Dim >::setT().
Referenced by readStep().
void H5PartWrapperForPS::stashPhaseSpaceEnvelope | ( | EnvelopeBunch & | bunch, |
Vector_t | FDext[], | ||
double | sposHead, | ||
double | sposRef, | ||
double | sposTail | ||
) |
Calculate bunch statistical parameters etc. Put them in the right format for H5 file write.
Write particle mass and charge per particle. (Consider making these file attributes.)
Write bunch phase space.
Definition at line 396 of file H5PartWrapperForPS.cpp.
References EnvelopeBunch::calcBeamParameters(), Physics::e, EnvelopeBunch::emtn(), EnvelopeBunch::get_meanKineticEnergy(), EnvelopeBunch::get_norm_emit(), EnvelopeBunch::get_sPos(), EnvelopeBunch::getChargePerParticle(), EnvelopeBunch::getLocalNum(), PartBunchBase< T, Dim >::getM(), EnvelopeBunch::getT(), EnvelopeBunch::getTotalNum(), EnvelopeBunch::maxP(), EnvelopeBunch::maxX(), EnvelopeBunch::minP(), EnvelopeBunch::minX(), H5PartWrapper::numSteps_m, EnvelopeBunch::sigmap(), EnvelopeBunch::sigmax(), stash_actPos, stash_Bhead, stash_Bref, stash_Btail, stash_centroid, stash_charge, stash_Ehead, stash_Eref, stash_Etail, stash_geomvareps, stash_mass, stash_maxP, stash_meanEnergy, stash_minP, stash_nLoc, stash_nTot, stash_psigma, stash_RefPartP, stash_RefPartR, stash_rmax, stash_rmin, stash_sposHead, stash_sposRef, stash_sposTail, stash_t, stash_vareps, and stash_xsigma.
|
virtual |
Write file dump frequency.
Write global phase change
Implements H5PartWrapper.
Definition at line 173 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::file_m, Util::getGitRevision(), OpalData::getGlobalPhaseShift(), OpalData::getInstance(), OPAL_PROJECT_NAME, OPAL_PROJECT_VERSION, Options::psDumpFreq, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.
|
virtual |
Implements H5PartWrapper.
Definition at line 228 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::close(), H5PartWrapper::open(), writeStepData(), and writeStepHeader().
|
private |
Definition at line 341 of file H5PartWrapperForPS.cpp.
References H5PartWrapper::file_m, EnvelopeBunch::getBeta(), EnvelopeBunch::getLocalNum(), EnvelopeBunch::getPx(), EnvelopeBunch::getPx0(), EnvelopeBunch::getPy(), EnvelopeBunch::getPy0(), EnvelopeBunch::getPz(), EnvelopeBunch::getX(), EnvelopeBunch::getX0(), EnvelopeBunch::getY(), EnvelopeBunch::getY0(), EnvelopeBunch::getZ(), REPORTONERROR, and WRITEDATA.
Referenced by writeStep().
|
private |
Write particle mass and charge per particle. (Consider making these file attributes.)
Definition at line 237 of file H5PartWrapperForPS.cpp.
References Physics::c, EnvelopeBunch::calcBeamParameters(), endl(), Physics::epsilon_0, ERRORMSG, H5PartWrapper::file_m, PartBunchBase< T, Dim >::get_gamma(), PartBunchBase< T, Dim >::get_maxExtent(), EnvelopeBunch::get_meanKineticEnergy(), EnvelopeBunch::get_norm_emit(), PartBunchBase< T, Dim >::get_origin(), EnvelopeBunch::get_prms(), EnvelopeBunch::get_rrms(), EnvelopeBunch::get_sPos(), PartBunchBase< T, Dim >::getCharge(), PartBunchBase< T, Dim >::getM(), PartBunchBase< T, Dim >::getQ(), EnvelopeBunch::getT(), EnvelopeBunch::maxP(), EnvelopeBunch::minP(), H5PartWrapper::numSteps_m, Physics::pi, REPORTONERROR, WRITESTEPATTRIB, and WRITESTRINGSTEPATTRIB.
Referenced by writeStep().
|
private |
Definition at line 66 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 60 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 62 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 64 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 51 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 70 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 61 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 63 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 65 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 52 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 69 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 58 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 68 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 59 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 74 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 75 of file H5PartWrapperForPS.h.
Referenced by stashPhaseSpaceEnvelope().
|
private |
Definition at line 54 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 50 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 49 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 57 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 56 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 71 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 72 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 73 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 67 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 55 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().
|
private |
Definition at line 53 of file H5PartWrapperForPS.h.
Referenced by dumpStashedPhaseSpaceEnvelope(), and stashPhaseSpaceEnvelope().