|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
|
#include <DataSink.h>
Public Member Functions | |
| DataSink () | |
| Default constructor. | |
| DataSink (H5PartWrapper *h5wrapper, bool restart) | |
| DataSink (H5PartWrapper *h5wrapper) | |
| void | dumpH5 (PartBunch_t *beam, Vector_t< double, 3 > FDext[]) const |
| int | dumpH5 (PartBunch_t *beam, Vector_t< double, 3 > FDext[], double meanEnergy, double refPr, double refPt, double refPz, double refR, double refTheta, double refZ, double azimuth, double elevation, bool local) const |
| void | dumpSDDS (PartBunch_t *beam, Vector_t< double, 3 > FDext[], const double &azimuth=-1) const |
| void | dumpSDDS (PartBunch_t *beam, Vector_t< double, 3 > FDext[], const losses_t &losses=losses_t(), const double &azimuth=-1) const |
| void | storeCavityInformation () |
| Write cavity information from H5 file. | |
| void | changeH5Wrapper (H5PartWrapper *h5wrapper) |
| void | writeGeomToVtk (BoundaryGeometry &bg, std::string fn) |
| void | writeImpactStatistics (const PartBunch_t *beam, long long int &step, size_t &impact, double &sey_num, size_t numberOfFieldEmittedParticles, bool nEmissionMode, std::string fn) |
Private Types | |
| typedef StatWriter::losses_t | losses_t |
| typedef std::unique_ptr< StatWriter > | statWriter_t |
| typedef std::unique_ptr< SDDSWriter > | sddsWriter_t |
| typedef std::unique_ptr< H5Writer > | h5Writer_t |
Private Member Functions | |
| DataSink (const DataSink &ds)=delete | |
| DataSink & | operator= (const DataSink &)=delete |
| void | rewindLines () |
| void | init (bool restart=false, H5PartWrapper *h5wrapper=nullptr) |
Static Private Member Functions | |
| static std::string | convertToString (int number, int setw=5) |
Private Attributes | |
| h5Writer_t | h5Writer_m |
| statWriter_t | statWriter_m |
| std::vector< sddsWriter_t > | sddsWriter_m |
| unsigned int | lossWrCounter_m |
| needed to create index for vtk file | |
| IpplTimings::TimerRef | StatMarkerTimer_m |
| Timer to track statistics write time. | |
Definition at line 44 of file DataSink.h.
|
private |
Definition at line 49 of file DataSink.h.
|
private |
Definition at line 46 of file DataSink.h.
|
private |
Definition at line 48 of file DataSink.h.
|
private |
Definition at line 47 of file DataSink.h.
| DataSink::DataSink | ( | ) |
Default constructor.
The default constructor is called at the start of a new calculation (as opposed to a calculation restart).
Definition at line 44 of file DataSink.cpp.
References init().
Referenced by DataSink(), DataSink(), and operator=().
| DataSink::DataSink | ( | H5PartWrapper * | h5wrapper, |
| bool | restart ) |
Definition at line 48 of file DataSink.cpp.
References Options::enableHDF5, init(), and rewindLines().
| DataSink::DataSink | ( | H5PartWrapper * | h5wrapper | ) |
Definition at line 59 of file DataSink.cpp.
References DataSink().
|
privatedelete |
| void DataSink::changeH5Wrapper | ( | H5PartWrapper * | h5wrapper | ) |
Definition at line 114 of file DataSink.cpp.
References Options::enableHDF5, and h5Writer_m.
|
inlinestaticprivate |
Definition at line 120 of file DataSink.h.
| void DataSink::dumpH5 | ( | PartBunch_t * | beam, |
| Vector_t< double, 3 > | FDext[] ) const |
Definition at line 62 of file DataSink.cpp.
References Options::enableHDF5, and h5Writer_m.
| int DataSink::dumpH5 | ( | PartBunch_t * | beam, |
| Vector_t< double, 3 > | FDext[], | ||
| double | meanEnergy, | ||
| double | refPr, | ||
| double | refPt, | ||
| double | refPz, | ||
| double | refR, | ||
| double | refTheta, | ||
| double | refZ, | ||
| double | azimuth, | ||
| double | elevation, | ||
| bool | local ) const |
Definition at line 69 of file DataSink.cpp.
References Options::enableHDF5, and h5Writer_m.
| void DataSink::dumpSDDS | ( | PartBunch_t * | beam, |
| Vector_t< double, 3 > | FDext[], | ||
| const double & | azimuth = -1 ) const |
Definition at line 81 of file DataSink.cpp.
References dumpSDDS().
Referenced by dumpSDDS().
| void DataSink::dumpSDDS | ( | PartBunch_t * | beam, |
| Vector_t< double, 3 > | FDext[], | ||
| const losses_t & | losses = losses_t(), | ||
| const double & | azimuth = -1 ) const |
Definition at line 86 of file DataSink.cpp.
References Options::beamHaloBoundary, PartBunch< PLayout, T, Dim >::calcBeamParameters(), PartBunch< PLayout, T, Dim >::calcNumPartsOutside(), PartBunch< PLayout, T, Dim >::gatherLoadBalanceStatistics(), PartBunch< PLayout, T, Dim >::get_rrms(), StatMarkerTimer_m, and statWriter_m.
|
private |
Definition at line 189 of file DataSink.cpp.
References Options::enableHDF5, OpalData::getInputBasename(), OpalData::getInstance(), h5Writer_m, lossWrCounter_m, sddsWriter_m, StatMarkerTimer_m, and statWriter_m.
Referenced by DataSink(), and DataSink().
|
private |
Definition at line 169 of file DataSink.cpp.
References h5Writer_m, sddsWriter_m, and statWriter_m.
Referenced by DataSink().
| void DataSink::storeCavityInformation | ( | ) |
Write cavity information from H5 file.
Definition at line 107 of file DataSink.cpp.
References Options::enableHDF5, and h5Writer_m.
| void DataSink::writeGeomToVtk | ( | BoundaryGeometry & | bg, |
| std::string | fn ) |
Write geometry points and surface triangles to vtk file
| fn | specifies the name of vtk file contains the geometry |
Definition at line 121 of file DataSink.cpp.
References Options::enableVTK, and BoundaryGeometry::writeGeomToVtk().
| void DataSink::writeImpactStatistics | ( | const PartBunch_t * | beam, |
| long long int & | step, | ||
| size_t & | impact, | ||
| double & | sey_num, | ||
| size_t | numberOfFieldEmittedParticles, | ||
| bool | nEmissionMode, | ||
| std::string | fn ) |
Write impact number and outgoing secondaries in each time step
| fn | specifies the name of vtk file contains the geometry |
Definition at line 127 of file DataSink.cpp.
References PartBunch< PLayout, T, Dim >::getCharge(), PartBunch< PLayout, T, Dim >::getChargePerParticle(), PartBunch< PLayout, T, Dim >::getT(), PartBunch< PLayout, T, Dim >::getTotalNum(), and Units::s2ns.
|
private |
Definition at line 107 of file DataSink.h.
Referenced by changeH5Wrapper(), dumpH5(), dumpH5(), init(), rewindLines(), and storeCavityInformation().
|
private |
needed to create index for vtk file
Definition at line 114 of file DataSink.h.
Referenced by init().
|
private |
Definition at line 109 of file DataSink.h.
Referenced by init(), and rewindLines().
|
private |
Timer to track statistics write time.
Definition at line 117 of file DataSink.h.
Referenced by dumpSDDS(), and init().
|
private |
Definition at line 108 of file DataSink.h.
Referenced by dumpSDDS(), init(), and rewindLines().