1 #ifndef AMREX_PARTICLES_HDF5_H_
2 #define AMREX_PARTICLES_HDF5_H_
32 const std::string& compression =
"None@0")
const;
37 void CheckpointHDF5 (
const std::string& dir,
const std::string& name,
bool is_checkpoint,
38 const Vector<std::string>& real_comp_names = Vector<std::string>(),
39 const Vector<std::string>& int_comp_names = Vector<std::string>(),
40 const std::string& compression =
"None@0")
const;
59 const std::string& name,
60 const Vector<int>& write_real_comp,
61 const Vector<int>& write_int_comp,
62 const Vector<std::string>& real_comp_names,
63 const Vector<std::string>& int_comp_names,
64 const std::string& compression,
65 F&&
f,
bool is_checkpoint=
false)
const;
78 void RestartHDF5 (
const std::string& dir,
const std::string& file);
87 void RestartHDF5 (
const std::string& dir,
const std::string& file,
bool is_checkpoint);
95 void WritePlotFileHDF5 (
const std::string& dir,
const std::string& name,
const std::string& compression)
const;
108 template <
class F, std::enable_if_t<!std::is_same_v<F, Vector<std::
string>>>* =
nullptr>
109 void WritePlotFileHDF5 (
const std::string& dir,
const std::string& name,
const std::string& compression, F&&
f)
const;
120 const Vector<std::string>& real_comp_names,
121 const Vector<std::string>& int_comp_names,
122 const std::string& compression)
const;
139 const Vector<std::string>& real_comp_names,
140 const Vector<std::string>& int_comp_names,
141 const std::string& compression, F&&
f)
const;
152 const Vector<std::string>& real_comp_names,
153 const std::string& compression)
const;
168 template <
class F, std::enable_if_t<!std::is_same_v<F, Vector<std::
string>>>* =
nullptr>
170 const Vector<std::string>& real_comp_names,
171 const std::string& compression, F&&
f)
const;
183 const std::string& name,
184 const Vector<int>& write_real_comp,
185 const Vector<int>& write_int_comp,
186 const std::string& compression)
const;
204 const std::string& name,
205 const Vector<int>& write_real_comp,
206 const Vector<int>& write_int_comp,
207 const std::string& compression, F&&
f)
const;
223 const std::string& name,
224 const Vector<int>& write_real_comp,
225 const Vector<int>& write_int_comp,
226 const Vector<std::string>& real_comp_names,
227 const Vector<std::string>& int_comp_names,
228 const std::string& compression)
const;
250 const std::string& name,
251 const Vector<int>& write_real_comp,
252 const Vector<int>& write_int_comp,
253 const Vector<std::string>& real_comp_names,
254 const Vector<std::string>& int_comp_names,
255 const std::string& compression,
264 Vector<int>& which, Vector<int>& count, Vector<Long>& where,
265 const Vector<int>& write_real_comp,
const Vector<int>& write_int_comp,
266 const std::string& compression,
267 const Vector<std::map<std::pair<int, int>,IntVector>>& particle_io_flags,
bool is_checkpoint)
const;
271 template <
class RTYPE>
272 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);
Array4< int const > offset
Definition: AMReX_HypreMLABecLap.cpp:1089
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 WritePlotFilePreHDF5()
void WritePlotFilePostHDF5()
void ReadParticleRealDataHDF5(void *data, size_t size, hid_t fid)
Read a contiguous chunk of real particle data from HDF5 file.
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 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.
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 RestartHDF5(const std::string &dir, const std::string &file)
Restart from checkpoint.
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 CheckpointPostHDF5()
void WriteParticleRealDataHDF5(void *data, size_t size, hid_t fid) const
Write a contiguous chunk of real particle data to an HDF5 file.
AMREX_GPU_HOST_DEVICE Long size(T const &b) noexcept
integer version
Definition: AMReX_GpuRange.H:26
static int f(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition: AMReX_SundialsIntegrator.H:44