Classes | Functions
hdf5_diagnostics.hpp File Reference

Simulation output to hdf5 file format. More...

#include <H5Cpp.h>
#include <string>
#include "hdsim2d.hpp"
#include "../../misc/int2str.hpp"
#include "diagnostics.hpp"
#include "../../tessellation/Delaunay.hpp"
Include dependency graph for hdf5_diagnostics.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Snapshot
 Container for snapshot data. More...
 
class  DiagnosticAppendix
 Addition data to be written in a snapshot. More...
 

Functions

Snapshot read_hdf5_snapshot (const string &fname, bool mpioverride=false)
 Load snapshot data into memory. More...
 
void write_snapshot_to_hdf5 (hdsim const &sim, string const &fname, const vector< DiagnosticAppendix *> &appendices=vector< DiagnosticAppendix *>())
 Writes the simulation data into an HDF5 file. More...
 
void read_hdf5_snapshot (ResetDump &dump, string const &fname, EquationOfState const *eos)
 Reads an HDF5 snapshot file in order to restart the simulation. More...
 
void ConvertHDF5toBinary (string const &input, string const &output)
 Converts an HDF5 snapshot file to the RICH custom reset binary format. More...
 
void WriteDelaunay (Delaunay const &tri, string const &filename)
 Writes the Delaunay triangulation data into an HDF5 file. More...
 
Snapshot ReDistributeData (string const &filename, Tessellation const &proctess, size_t snapshot_number)
 Reads an HDF5 snapshot file in order to restart the simulation with a different cpu number. More...
 
Snapshot ReDistributeData2 (string const &filename, Tessellation const &proctess, size_t snapshot_number, bool mpioverride=false)
 Reads an HDF5 snapshot file in order to restart the simulation with a different cpu number. Slower but more robust then other method. More...
 
void WriteTess (Tessellation const &tess, string const &filename)
 Writes the tessellation data into an HDF5 file. More...
 

Detailed Description

Simulation output to hdf5 file format.

Author
Elad Steinberg

Definition in file hdf5_diagnostics.hpp.

Function Documentation

◆ ConvertHDF5toBinary()

void ConvertHDF5toBinary ( string const &  input,
string const &  output 
)

Converts an HDF5 snapshot file to the RICH custom reset binary format.

Parameters
inputThe path to the HDF5 file
outputThe path to the new binary file

◆ read_hdf5_snapshot() [1/2]

Snapshot read_hdf5_snapshot ( const string &  fname,
bool  mpioverride = false 
)

Load snapshot data into memory.

Parameters
fnameFile name
mpioverrideFlag for not reading mpi data when MPI is on
Returns
Snapshot data

Definition at line 399 of file hdf5_diagnostics.cpp.

Here is the caller graph for this function:

◆ read_hdf5_snapshot() [2/2]

void read_hdf5_snapshot ( ResetDump dump,
string const &  fname,
EquationOfState const *  eos 
)

Reads an HDF5 snapshot file in order to restart the simulation.

Parameters
dumpThe dump data structure, should be when passed
fnameThe path to the HDF5 file
eosThe equation of state

◆ ReDistributeData()

Snapshot ReDistributeData ( string const &  filename,
Tessellation const &  proctess,
size_t  snapshot_number 
)

Reads an HDF5 snapshot file in order to restart the simulation with a different cpu number.

Returns
dump The snapshot structure relevent for current cpu
Parameters
filenameFile name
proctessTessellation of the processors
snapshot_numberNumber of old cpus

Definition at line 533 of file hdf5_diagnostics.cpp.

Here is the call graph for this function:

◆ ReDistributeData2()

Snapshot ReDistributeData2 ( string const &  filename,
Tessellation const &  proctess,
size_t  snapshot_number,
bool  mpioverride = false 
)

Reads an HDF5 snapshot file in order to restart the simulation with a different cpu number. Slower but more robust then other method.

Returns
dump The snapshot structure relevent for current cpu
Parameters
filenameFile name
proctessTessellation of the processors
snapshot_numberNumber of old cpus
mpioverrideFlag for not reading mpi data when MPI is on

Definition at line 645 of file hdf5_diagnostics.cpp.

Here is the call graph for this function:

◆ write_snapshot_to_hdf5()

void write_snapshot_to_hdf5 ( hdsim const &  sim,
string const &  fname,
const vector< DiagnosticAppendix *> &  appendices = vector< DiagnosticAppendix *>() 
)

Writes the simulation data into an HDF5 file.

Parameters
simThe hdsim class of the simulation
fnameThe name of the output file
appendicesAdditional data to be written to snapshot

Definition at line 271 of file hdf5_diagnostics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteDelaunay()

void WriteDelaunay ( Delaunay const &  tri,
string const &  filename 
)

Writes the Delaunay triangulation data into an HDF5 file.

Parameters
triThe triangulation
filenameThe name of the output file

Definition at line 503 of file hdf5_diagnostics.cpp.

Here is the call graph for this function:

◆ WriteTess()

void WriteTess ( Tessellation const &  tess,
string const &  filename 
)

Writes the tessellation data into an HDF5 file.

Parameters
tessThe tessellation
filenameThe name of the output file

Definition at line 675 of file hdf5_diagnostics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: