![]() |
Block-Structured AMR Software Framework
|
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. | |
| void | ReadParticleRealDataHDF5 (void *data, size_t size, hid_t fid) |
| Read a contiguous chunk of real particle data from HDF5 file. | |
| 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. | |
| 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. | |
| 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. | |
| void | CheckpointPreHDF5 () |
| Prepare metadata used by deferred HDF5 checkpoint writes. | |
| void | CheckpointPostHDF5 () |
| Finalize a checkpoint header handed off by CheckpointPreHDF5(). | |
| void | RestartHDF5 (const std::string &dir, const std::string &file) |
| Restart from checkpoint. | |
| void | RestartHDF5 (const std::string &dir, const std::string &file, bool is_checkpoint) |
| Older version, for backwards compatibility. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| void | WritePlotFilePreHDF5 () |
| Plotfile-friendly alias for CheckpointPreHDF5(). | |
| void | WritePlotFilePostHDF5 () |
| Plotfile-friendly alias for CheckpointPostHDF5(). | |
| 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 |
| Write all particles from one AMR level into the given HDF5 group. | |
| 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) |
| Read particle records from HDF5 datasets into a level/tile buffer. | |
HDF5-specific ParticleContainer hooks (checkpointing, plotfile output, and supporting helpers shared by all particle types).
| 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.
| dir | Directory that owns the per-type subdirectory. |
| name | Particle type subdirectory (e.g., "Tracer"). |
| is_checkpoint | Reserved for parity with ASCII checkpoints (ignored because HDF5 always writes id/cpu). |
| real_comp_names | Optional labels for each real component. |
| int_comp_names | Optional labels for each integer component. |
| compression | Compression scheme, e.g., "ZFP_ACCURACY@0.001". |
| 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") |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| void CheckpointPostHDF5 | ( | ) |
Finalize a checkpoint header handed off by CheckpointPreHDF5().
Aggregates distributed offsets/counts, appends per-level bookkeeping, and removes empty per-file fragments when requested.
| void CheckpointPreHDF5 | ( | ) |
Prepare metadata used by deferred HDF5 checkpoint writes.
Tallies particles/NextID values per level so CheckpointPostHDF5() can finish the header without revisiting particle data.
| 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 |
Read particle records from HDF5 datasets into a level/tile buffer.
| RTYPE | Floating-point storage type stored in the file. |
| offset | Starting element offset inside the dataset. |
| count | Number of entries to load. |
| grd | Grid index being populated. |
| lev | AMR level index being populated. |
| int_dset | HDF5 dataset handle for integer components. |
| real_dset | HDF5 dataset handle for real components. |
| finest_level_in_file | Finest level encoded in the file (for sanity checks). |
| convert_ids | True when reading Version_Two_Dot_One checkpoints whose 64-bit id/cpu pairs were split into two 32-bit words and must be reassembled. |
| 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 |
Write all particles from one AMR level into the given HDF5 group.
| level | AMR level whose particles are written. |
| grp | Open HDF5 group corresponding to level_d. |
| which | Placeholder vector kept for API compatibility (unused by the HDF5 backend). |
| count | Per-grid particle counts updated in place. |
| where | Placeholder vector kept for API compatibility (unused by the HDF5 backend). |
| write_real_comp | Flags enabling each real component. |
| write_int_comp | Flags enabling each integer component. |
| compression | Compression string (ZFP_*, SZ, etc.). |
| particle_io_flags | Per-grid/tile masks returned by the filter functor. |
| is_checkpoint | Reserved; the HDF5 writer always preserves id/cpu regardless of this flag. |
| 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") |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| name | 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 |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| name | 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 |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| name | 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 |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| name | 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 |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| name | 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 |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| name | 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 |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| name | 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 |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| 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") |
| name | 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 |
| compression | compression parameter (i.e. "ZFP_ACCURACY@0.001", "SZ@sz.config") |
| f | callable that returns whether or not to write each particle |
| void WritePlotFilePostHDF5 | ( | ) |
Plotfile-friendly alias for CheckpointPostHDF5().
| void WritePlotFilePreHDF5 | ( | ) |
Plotfile-friendly alias for CheckpointPreHDF5().