Inovesa
Tool to simulate beam dynamics in synchrotron light sources
|
HDF5 result file as it is written to disk. More...
#include <HDF5File.hpp>
Public Types | |
enum | AppendType : uint_fast16_t { All, Defaults, PhaseSpace } |
The AppendType enum. More... | |
Public Member Functions | |
HDF5File (const std::string &filename, const std::shared_ptr< PhaseSpace > ps, const ElectricField *ef, const std::shared_ptr< Impedance > imp, const size_t nparticles, const double t_sync, const double f_rev) | |
HDF5File. More... | |
void | addParameterToGroup (std::string groupname, std::string paramname, H5::PredType type, void *data) |
void | append (const ElectricField *ef, const bool fullspectrum=true) |
append synchrotron radiation data More... | |
void | appendPadded (const ElectricField *ef) |
savePaddedProfile More... | |
void | appendRFKicks (const std::vector< std::array< vfps::meshaxis_t, 2 >> &kicks) |
void | appendTracks (const std::vector< PhaseSpace::Position > &p) |
void | append (const PhaseSpace &ps, const timeaxis_t t, const AppendType at=AppendType::Defaults) |
void | append (const WakeKickMap *wkm) |
template<int rank, typename datatype > | |
vfps::HDF5File::DatasetInfo< rank > | _makeDatasetInfo (std::string name, std::array< hsize_t, rank > dims, std::array< hsize_t, rank > chunkdims, std::array< hsize_t, rank > maxdims) |
Static Public Member Functions | |
static std::unique_ptr< PhaseSpace > | readPhaseSpace (std::string fname, meshaxis_t qmin, meshaxis_t qmax, meshaxis_t pmin, meshaxis_t pmax, oclhptr_t oclh, double Qb, double Ib_unscaled, double bl, double dE, int64_t use_step=-1l) |
HDF5 result file as it is written to disk.
The file is created on construction. Constant data is already added on construction. All data that might change during simulation is added later, the file is (only) prepared so that it can be appended.
There are axis (named /Infos/AxisValues_...) and datasets containing the actual data (named .../data). The latter have links to the corrsponding axis next to them, that hold information on the dimension of the dataset.
To avoid slowing down computation, data is saved as a binary copy. This leaves normalization, units and dimensions untouched. Conversion to physical units is facilitated by conversion factors, that are given as attributes to the data frames.
Definition at line 48 of file HDF5File.hpp.
|
strong |
The AppendType enum.
All: save everything Defaults: (no phase space) PhaseSpace: phase space only
Definition at line 98 of file HDF5File.hpp.
vfps::HDF5File::HDF5File | ( | const std::string & | filename, |
const std::shared_ptr< PhaseSpace > | ps, | ||
const ElectricField * | ef, | ||
const std::shared_ptr< Impedance > | imp, | ||
const size_t | nparticles, | ||
const double | t_sync, | ||
const double | f_rev | ||
) |
filename | file name to save HDF5 file to |
ps | phase space (to know dimensions, etc.) |
ef | electric field used for CSR computation |
imp | Impedance |
wfm | wake |
nparticles | |
t_sync | |
f_rev |
Definition at line 29 of file HDF5File.cpp.
void vfps::HDF5File::append | ( | const ElectricField * | ef, |
const bool | fullspectrum = true |
||
) |
append synchrotron radiation data
ef | electric fild used for CSR computation |
fullspectrum | safe full CSR spectrum or only integrated power |
Definition at line 358 of file HDF5File.cpp.
void vfps::HDF5File::appendPadded | ( | const ElectricField * | ef | ) |
savePaddedProfile
ef | |
timestep | 0 or 1 (for start or end of simulation) |
Definition at line 366 of file HDF5File.cpp.