Go to the source code of this file.
Functions | |
void | WriteParticleRealDataHDF5 (void *data, size_t size, hid_t fid) const |
Write a contiguous chunk of real particle data to an HDF5 file. More... | |
void | ReadParticleRealDataHDF5 (void *data, size_t size, hid_t fid) |
Read a contiguous chunk of real particle data from HDF5 file. More... | |
void | CheckpointHDF5 (const std::string &dir, const std::string &name, const std::string &compression="None@0") const |
Writes a particle checkpoint to file, suitable for restarting. More... | |
void | CheckpointHDF5 (const std::string &dir, const std::string &name, bool is_checkpoint, const Vector< std::string > &real_comp_names=Vector< std::string >(), const Vector< std::string > &int_comp_names=Vector< std::string >(), const std::string &compression="None@0") const |
Writes a particle checkpoint to file, suitable for restarting. More... | |
template<class F > | |
void | WriteHDF5ParticleData (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, const std::string &compression, F &&f, bool is_checkpoint=false) const |
Writes particle data to disk in the HDF5 format. More... | |
void | CheckpointPreHDF5 () |
void | CheckpointPostHDF5 () |
void | RestartHDF5 (const std::string &dir, const std::string &file) |
Restart from checkpoint. More... | |
void | RestartHDF5 (const std::string &dir, const std::string &file, bool is_checkpoint) |
Older version, for backwards compatibility. More... | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const std::string &compression) const |
This version of WritePlotFile writes all components and assigns component names. More... | |
template<class F , std::enable_if_t<!std::is_same_v< F, Vector< std::string >>> * = nullptr> | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const std::string &compression, F &&f) const |
This version of WritePlotFile writes all components and assigns component names. More... | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, const std::string &compression) const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components. More... | |
template<class F > | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, const std::string &compression, F &&f) const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components. More... | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const std::string &compression) const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components. More... | |
template<class F , std::enable_if_t<!std::is_same_v< F, Vector< std::string >>> * = nullptr> | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const std::string &compression, F &&f) const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components. More... | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const std::string &compression) const |
This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components. More... | |
template<class F > | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const std::string &compression, F &&f) const |
This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components. More... | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, const std::string &compression) const |
This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not. More... | |
template<class F > | |
void | WritePlotFileHDF5 (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, const std::string &compression, F &&f) const |
This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not. More... | |
void | WritePlotFilePreHDF5 () |
void | WritePlotFilePostHDF5 () |
void | WriteParticlesHDF5 (int level, hid_t grp, Vector< int > &which, Vector< int > &count, Vector< Long > &where, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const std::string &compression, const Vector< std::map< std::pair< int, int >, IntVector >> &particle_io_flags, bool is_checkpoint) const |
template<class RTYPE > | |
void | ReadParticlesHDF5 (hsize_t offset, hsize_t count, int grd, int lev, hid_t int_dset, hid_t real_dset, int finest_level_in_file, bool convert_ids) |
void CheckpointHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
bool | is_checkpoint, | ||
const Vector< std::string > & | real_comp_names = Vector< std::string >() , |
||
const Vector< std::string > & | int_comp_names = Vector< std::string >() , |
||
const std::string & | compression = "None@0" |
||
) | const |
Writes a particle checkpoint to file, suitable for restarting.
void CheckpointHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const std::string & | compression = "None@0" |
||
) | const |
Writes a particle checkpoint to file, suitable for restarting.
dir | The base directory into which to write (i.e. "plt00000") |
name | The name of the sub-directory for this particle type (i.e. "Tracer") |
fid | The HDF5 file ID |
compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
void CheckpointPostHDF5 | ( | ) |
void CheckpointPreHDF5 | ( | ) |
void ReadParticleRealDataHDF5 | ( | void * | data, |
size_t | size, | ||
hid_t | fid | ||
) |
Read a contiguous chunk of real particle data from HDF5 file.
data | A pointer to the start of the buffer into which to read |
size | The number of elements to read |
fid | The istream from which to read the data |
|
protected |
void RestartHDF5 | ( | const std::string & | dir, |
const std::string & | file | ||
) |
Restart from checkpoint.
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
void RestartHDF5 | ( | const std::string & | dir, |
const std::string & | file, | ||
bool | is_checkpoint | ||
) |
Older version, for backwards compatibility.
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
is_checkpoint | Whether the particle id and cpu are included in the file. |
void WriteHDF5ParticleData | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< int > & | write_real_comp, | ||
const Vector< int > & | write_int_comp, | ||
const Vector< std::string > & | real_comp_names, | ||
const Vector< std::string > & | int_comp_names, | ||
const std::string & | compression, | ||
F && | f, | ||
bool | is_checkpoint = false |
||
) | const |
Writes particle data to disk in the HDF5 format.
F | function type |
dir | The base directory into which to write (i.e. "plt00000") |
name | The name of the sub-directory for this particle type (i.e. "Tracer") |
write_real_comp | for each real component, whether or not we include that component in the file |
write_int_comp | for each integer component, whether or not we include that component in the file |
real_comp_names | for each real component, a name to label the data with |
int_comp_names | for each integer component, a name to label the data with |
f | callable that returns whether a given particle should be written or not |
is_checkpoint | Whether the particle id and cpu are included in the file. |
compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
void WriteParticleRealDataHDF5 | ( | void * | data, |
size_t | size, | ||
hid_t | fid | ||
) | const |
Write a contiguous chunk of real particle data to an HDF5 file.
data | A pointer to the start of the buffer to write |
size | The number of elements to write |
fid | The HDF5 file ID |
void WriteParticlesHDF5 | ( | int | level, |
hid_t | grp, | ||
Vector< int > & | which, | ||
Vector< int > & | count, | ||
Vector< Long > & | where, | ||
const Vector< int > & | write_real_comp, | ||
const Vector< int > & | write_int_comp, | ||
const std::string & | compression, | ||
const Vector< std::map< std::pair< int, int >, IntVector >> & | particle_io_flags, | ||
bool | is_checkpoint | ||
) | const |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const std::string & | compression | ||
) | const |
This version of WritePlotFile writes all components and assigns component names.
dir | The base directory into which to write (i.e. "plt00000") |
name | The name of the sub-directory for this particle type (i.e. "Tracer") |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const std::string & | compression, | ||
F && | f | ||
) | const |
This version of WritePlotFile writes all components and assigns component names.
This version also lets you pass in a functor to toggle whether each particle gets output.
F | function type |
dir | The base directory into which to write (i.e. "plt00000") |
name | The name of the sub-directory for this particle type (i.e. "Tracer") |
f | callable that returns whether or not to write each particle |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< int > & | write_real_comp, | ||
const Vector< int > & | write_int_comp, | ||
const std::string & | compression | ||
) | const |
This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components.
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
write_real_comp | for each real component, whether to include that comp in the file |
write_int_comp | for each integer component, whether to include that comp in the file |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< int > & | write_real_comp, | ||
const Vector< int > & | write_int_comp, | ||
const std::string & | compression, | ||
F && | f | ||
) | const |
This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components.
This version also lets you pass in a functor to toggle whether each particle gets output.
F | function type |
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
write_real_comp | for each real component, whether to include that comp in the file |
write_int_comp | for each integer component, whether to include that comp in the file |
f | callable that returns whether or not to write each particle |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< int > & | write_real_comp, | ||
const Vector< int > & | write_int_comp, | ||
const Vector< std::string > & | real_comp_names, | ||
const Vector< std::string > & | int_comp_names, | ||
const std::string & | compression | ||
) | const |
This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not.
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
write_real_comp | for each real component, whether to include that comp in the file |
write_int_comp | for each integer component, whether to include that comp in the file |
real_comp_names | for each real component, a name to label the data with |
int_comp_names | for each integer component, a name to label the data with |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< int > & | write_real_comp, | ||
const Vector< int > & | write_int_comp, | ||
const Vector< std::string > & | real_comp_names, | ||
const Vector< std::string > & | int_comp_names, | ||
const std::string & | compression, | ||
F && | f | ||
) | const |
This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not.
This version also lets you pass in a functor to toggle whether each particle gets output.
F | function type |
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
write_real_comp | for each real component, whether to include that comp in the file |
write_int_comp | for each integer component, whether to include that comp in the file |
real_comp_names | for each real component, a name to label the data with |
int_comp_names | for each integer component, a name to label the data with |
f | callable that returns whether or not to write each particle |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< std::string > & | real_comp_names, | ||
const std::string & | compression | ||
) | const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components.
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
real_comp_names | for each real component, a name to label the data with |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< std::string > & | real_comp_names, | ||
const std::string & | compression, | ||
F && | f | ||
) | const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components.
This version also lets you pass in a functor to toggle whether each particle gets output.
F | function type |
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
real_comp_names | for each real component, a name to label the data with |
f | callable that returns whether or not to write each particle |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< std::string > & | real_comp_names, | ||
const Vector< std::string > & | int_comp_names, | ||
const std::string & | compression | ||
) | const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components.
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
real_comp_names | for each real component, a name to label the data with |
int_comp_names | for each integer component, a name to label the data with |
void WritePlotFileHDF5 | ( | const std::string & | dir, |
const std::string & | name, | ||
const Vector< std::string > & | real_comp_names, | ||
const Vector< std::string > & | int_comp_names, | ||
const std::string & | compression, | ||
F && | f | ||
) | const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components.
This version also lets you pass in a functor to toggle whether each particle gets output.
F | function type |
dir | The base directory into which to write (i.e. "plt00000") |
file | The name of the sub-directory for this particle type (i.e. "Tracer") |
real_comp_names | for each real component, a name to label the data with |
int_comp_names | for each integer component, a name to label the data with |
f | callable that returns whether or not to write each particle |
void WritePlotFilePostHDF5 | ( | ) |
void WritePlotFilePreHDF5 | ( | ) |