OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
H5PartWrapperForPT Class Reference

#include <H5PartWrapperForPT.h>

Inheritance diagram for H5PartWrapperForPT:
Inheritance graph
Collaboration diagram for H5PartWrapperForPT:
Collaboration graph

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 (PartBunch_t *, h5_ssize_t firstParticle, h5_ssize_t lastParticle)
 
virtual void writeHeader ()
 
virtual void writeStep (PartBunch_t *, const std::map< std::string, double > &additionalStepAttributes, size_t particleContainerIndex=0)
 
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 (PartBunch_t *)
 
void readStepData (PartBunch_t *, h5_ssize_t, h5_ssize_t)
 
void writeStepHeader (PartBunch_t *, const std::map< std::string, double > &, size_t particleContainerIndex)
 
void writeStepData (PartBunch_t *, size_t particleContainerIndex)
 

Detailed Description

Definition at line 26 of file H5PartWrapperForPT.h.

Constructor & Destructor Documentation

◆ H5PartWrapperForPT() [1/2]

H5PartWrapperForPT::H5PartWrapperForPT ( const std::string &  fileName,
h5_int32_t  flags = H5_O_WRONLY 
)

Definition at line 35 of file H5PartWrapperForPT.cpp.

◆ H5PartWrapperForPT() [2/2]

H5PartWrapperForPT::H5PartWrapperForPT ( const std::string &  fileName,
int  restartStep,
std::string  sourceFile,
h5_int32_t  flags = H5_O_RDWR 
)

Definition at line 38 of file H5PartWrapperForPT.cpp.

References H5PartWrapper::file_m, OpalData::getInstance(), and OpalData::setRestartStep().

Here is the call graph for this function:

◆ ~H5PartWrapperForPT()

H5PartWrapperForPT::~H5PartWrapperForPT ( )
virtual

Definition at line 47 of file H5PartWrapperForPT.cpp.

Member Function Documentation

◆ close()

◆ copyFile()

void H5PartWrapper::copyFile ( const std::string &  sourceFile,
int  lastStep = -1,
h5_int32_t  flags = H5_O_WRONLY 
)
protectedinherited

◆ copyFileSystem()

void H5PartWrapper::copyFileSystem ( const std::string &  sourceFile)
protectedinherited

Definition at line 244 of file H5PartWrapper.cpp.

References H5PartWrapper::fileName_m, H5PartWrapper::receiveFailureMessage(), and H5PartWrapper::sendFailureMessage().

Referenced by H5PartWrapper::copyFile().

Here is the call graph for this function:

◆ copyHeader()

void H5PartWrapper::copyHeader ( h5_file_t  source)
protectedinherited

◆ copyStep()

void H5PartWrapper::copyStep ( h5_file_t  source,
int  step 
)
protectedinherited

Definition at line 345 of file H5PartWrapper.cpp.

References H5PartWrapper::copyStepData(), H5PartWrapper::copyStepHeader(), H5PartWrapper::file_m, H5PartWrapper::numSteps_m, and REPORTONERROR.

Referenced by H5PartWrapper::copyFile().

Here is the call graph for this function:

◆ copyStepData()

void H5PartWrapper::copyStepData ( h5_file_t  source)
protectedinherited

Definition at line 435 of file H5PartWrapper.cpp.

References Util::c_data(), H5PartWrapper::file_m, READDATA, REPORTONERROR, and WRITEDATA.

Referenced by H5PartWrapper::copyStep().

Here is the call graph for this function:

◆ copyStepHeader()

void H5PartWrapper::copyStepHeader ( h5_file_t  source)
protectedinherited

◆ getLastPosition()

double H5PartWrapper::getLastPosition ( )
inlineinherited

Definition at line 92 of file H5PartWrapper.h.

References H5PartWrapper::file_m, H5PartWrapper::open(), H5PartWrapper::readStep(), READSTEPATTRIB, and REPORTONERROR.

Referenced by H5Writer::getLastPosition().

Here is the call graph for this function:

◆ getNumParticles()

size_t H5PartWrapper::getNumParticles ( ) const
inherited

Definition at line 511 of file H5PartWrapper.cpp.

References H5PartWrapper::file_m, H5PartWrapper::numSteps_m, and REPORTONERROR.

Referenced by readStepData().

◆ open()

◆ predecessorIsSameFlavour()

bool H5PartWrapperForPT::predecessorIsSameFlavour ( ) const
inlinevirtual

Implements H5PartWrapper.

Definition at line 53 of file H5PartWrapperForPT.h.

References H5PartWrapper::predecessorOPALFlavour_m.

◆ readHeader()

void H5PartWrapperForPT::readHeader ( )
virtual

Implements H5PartWrapper.

Definition at line 49 of file H5PartWrapperForPT.cpp.

References H5PartWrapper::file_m, OpalData::getInstance(), READFILEATTRIB, REPORTONERROR, OpalData::setGlobalPhaseShift(), and OpalData::setRestartDumpFreq().

Here is the call graph for this function:

◆ readStep()

void H5PartWrapperForPT::readStep ( PartBunch_t bunch,
h5_ssize_t  firstParticle,
h5_ssize_t  lastParticle 
)
virtual

Implements H5PartWrapper.

Definition at line 101 of file H5PartWrapperForPT.cpp.

References H5PartWrapper::file_m, readStep(), readStepData(), readStepHeader(), and REPORTONERROR.

Referenced by readStep().

Here is the call graph for this function:

◆ readStepData()

void H5PartWrapperForPT::readStepData ( PartBunch_t ,
h5_ssize_t  firstParticle,
h5_ssize_t  lastParticle 
)
private

Definition at line 147 of file H5PartWrapperForPT.cpp.

References Util::c_data(), H5PartWrapper::file_m, H5PartWrapper::getNumParticles(), gmsg, READDATA, and REPORTONERROR.

Referenced by readStep().

Here is the call graph for this function:

◆ readStepHeader()

void H5PartWrapperForPT::readStepHeader ( PartBunch_t bunch)
private

Definition at line 111 of file H5PartWrapperForPT.cpp.

References H5PartWrapper::file_m, READSTEPATTRIB, PartBunch< T, Dim >::setGlobalTrackStep(), and PartBunch< T, Dim >::setT().

Referenced by readStep().

Here is the call graph for this function:

◆ receiveFailureMessage()

void H5PartWrapper::receiveFailureMessage ( int  sourceNode,
const std::string &  where,
const std::string &  what 
)
protectedinherited

Definition at line 499 of file H5PartWrapper.cpp.

Referenced by H5PartWrapper::copyFileSystem().

◆ reportOnError()

void H5PartWrapper::reportOnError ( h5_int64_t  rc,
const char *  file,
int  line 
)
inlinestaticprotectedinherited

Definition at line 87 of file H5PartWrapper.h.

◆ sendFailureMessage()

void H5PartWrapper::sendFailureMessage ( bool  failed,
const std::string &  where,
const std::string &  what 
)
protectedinherited

Definition at line 488 of file H5PartWrapper.cpp.

Referenced by H5PartWrapper::copyFileSystem().

◆ storeCavityInformation()

void H5PartWrapper::storeCavityInformation ( )
inherited

◆ writeHeader()

void H5PartWrapperForPT::writeHeader ( )
virtual

Write file dump frequency.

Write global phase change

Implements H5PartWrapper.

Definition at line 211 of file H5PartWrapperForPT.cpp.

References Options::ebDump, H5PartWrapper::file_m, Util::getGitRevision(), OpalData::getGlobalPhaseShift(), OpalData::getInstance(), Options::psDumpFreq, Options::rhoDump, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.

Here is the call graph for this function:

◆ writeStep()

void H5PartWrapperForPT::writeStep ( PartBunch_t bunch,
const std::map< std::string, double > &  additionalStepAttributes,
size_t  particleContainerIndex = 0 
)
virtual

Implements H5PartWrapper.

Definition at line 294 of file H5PartWrapperForPT.cpp.

References H5PartWrapper::close(), H5PartWrapper::open(), writeStepData(), and writeStepHeader().

Here is the call graph for this function:

◆ writeStepData()

void H5PartWrapperForPT::writeStepData ( PartBunch_t bunch,
size_t  particleContainerIndex 
)
private

Definition at line 414 of file H5PartWrapperForPT.cpp.

References Util::c_data(), Options::ebDump, H5PartWrapper::file_m, PartBunch< T, Dim >::R(), REPORTONERROR, and WRITEDATA.

Referenced by writeStep().

Here is the call graph for this function:

◆ writeStepHeader()

void H5PartWrapperForPT::writeStepHeader ( PartBunch_t bunch,
const std::map< std::string, double > &  additionalStepAttributes,
size_t  particleContainerIndex 
)
private

Write particle mass and charge per particle. (Consider making these file attributes.)

Definition at line 307 of file H5PartWrapperForPT.cpp.

References Physics::c, Physics::epsilon_0, Units::eV2GeV, H5PartWrapper::file_m, PartBunch< T, Dim >::get_maxExtent(), PartBunch< T, Dim >::get_origin(), PartBunch< T, Dim >::getGlobalTrackStep(), PartBunch< T, Dim >::getT(), H5PartWrapper::numSteps_m, Physics::pi, REPORTONERROR, WRITESTEPATTRIB, and WRITESTRINGSTEPATTRIB.

Referenced by writeStep().

Here is the call graph for this function:

Member Data Documentation

◆ copyFilePrefix_m

std::string H5PartWrapper::copyFilePrefix_m = ".copy"
staticprotectedinherited

Definition at line 84 of file H5PartWrapper.h.

Referenced by H5PartWrapper::copyFile().

◆ file_m

◆ fileName_m

std::string H5PartWrapper::fileName_m
protectedinherited

◆ numSteps_m

h5_int64_t H5PartWrapper::numSteps_m
protectedinherited

◆ predecessorOPALFlavour_m

std::string H5PartWrapper::predecessorOPALFlavour_m
protectedinherited

◆ startedFromExistingFile_m

bool H5PartWrapper::startedFromExistingFile_m
protectedinherited

Definition at line 82 of file H5PartWrapper.h.


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