30#include <boost/mpi/communicator.hpp>
38#include <unordered_map>
195 void create_groups();
201 void create_datasets();
206 void load_datasets();
221 void create_hard_links();
223 std::filesystem::path m_file_path;
224 std::filesystem::path m_backup_path;
225 std::filesystem::path m_script_path;
226 std::filesystem::path m_absolute_script_path;
227 std::string m_mass_unit;
228 std::string m_length_unit;
229 std::string m_time_unit;
230 std::string m_force_unit;
231 std::string m_velocity_unit;
232 std::string m_charge_unit;
234 boost::mpi::communicator m_comm;
235 unsigned int m_fields;
236 std::unique_ptr<HighFive::File> m_h5md_file;
237 std::unique_ptr<std::unordered_map<std::string, HighFive::DataSet>>
244 return "The given .h5 file does not match the specifications in 'fields'.";
250 return "A backup of the .h5 file exists. This usually means that either "
251 "you forgot to call the 'close' method or your simulation crashed.";
Vector implementation and trait types for boost qvm interoperability.
Class for writing H5MD files.
void write(const ParticleRange &particles, double time, int step, BoxGeometry const &geometry)
Write data to the hdf5 file.
auto const & chunk_size() const
Retrieve the set chunk size.
auto const & length_unit() const
Retrieve the set length unit.
auto const & time_unit() const
Retrieve the set time unit.
void close()
Method to perform the renaming of the temporary file from "filename" + ".bak" to "filename".
auto const & file_path() const
Retrieve the path to the hdf5 file.
auto const & force_unit() const
Retrieve the set force unit.
auto const & mass_unit() const
Retrieve the set mass unit.
auto const & charge_unit() const
Retrieve the set charge unit.
auto const & velocity_unit() const
Retrieve the set velocity unit.
std::vector< std::string > valid_fields() const
Build the list of valid output fields.
auto const & script_path() const
Retrieve the path to the simulation script.
void flush()
Method to enforce flushing the buffer to disk.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
H5MDOutputFields
Constants which indicate what to output.
Layout information for H5MD files.
const char * what() const noexcept override
const char * what() const noexcept override