CartesianMPIHDF.h

template<typename FileDataType, typename Grid, typename Mesh, typename Dir = size_t>
void Cubism::IO::CartesianMPIWriteHDF(const std::string &fname, const std::string &aname, const Grid &grid, const Mesh &mesh, const double time, const Dir face_dir = 0, const bool create_xdmf = true)

Write Cartesian MPI grid data to HDF file.

Write the data carried by the MPI grid to an HDF5 container file. The data that is written to the file is specified by the index space described in mesh.

Template Parameters
  • FileDataType: HDF file data type

  • Grid: Grid type

  • Mesh: Mesh type

  • Dir: Special type that defines a cast to size_t

Parameters
  • fname: Output full filename without file extension

  • aname: Name of quantity in grid

  • grid: Input grid

  • mesh: Input mesh corresponding to the extracted data

  • time: Current time

  • face_dir: Face direction (relevant for Cubism::EntityType::Face)

  • create_xdmf: Flag for XDMF wrapper

template<typename FileDataType, typename Grid, typename Dir = size_t>
void Cubism::IO::CartesianMPIWriteHDF(const std::string &fname, const std::string &aname, const Grid &grid, const double time, const Dir face_dir = 0, const bool create_xdmf = true)

Write Cartesian MPI grid data to HDF file.

Convenience wrapper to dump a full MPI grid to an HDF container file.

Template Parameters
  • FileDataType: HDF file data type

  • Grid: Grid type

  • Dir: Special type that defines a cast to size_t

Parameters
  • fname: Output full filename without file extension

  • aname: Name of quantity in grid

  • grid: Input grid

  • time: Current time

  • face_dir: Face direction (relevant for Cubism::EntityType::Face)

  • create_xdmf: Flag for XDMF wrapper

template<typename FileDataType, typename Grid, typename Mesh, typename Dir = size_t>
void Cubism::IO::CartesianMPIReadHDF(const std::string &fname, Grid &grid, const Mesh &mesh, const Dir face_dir = 0)

Read Cartesian MPI grid data from HDF file.

Read the data of an HDF5 container file into the MPI grid. The data that is read from the file is specified by the index space described in mesh.

Template Parameters
  • FileDataType: HDF file data type

  • Grid: Grid type

  • Mesh: Mesh type

  • Dir: Special type that defines a cast to size_t

Parameters
  • fname: Input full filename without file extension

  • grid: Grid populated with file data

  • mesh: Grid (sub)mesh

  • face_dir: Face direction (relevant for Cubism::EntityType::Face)

template<typename FileDataType, typename Grid, typename Dir = size_t>
void Cubism::IO::CartesianMPIReadHDF(const std::string &fname, Grid &grid, const Dir face_dir = 0)

Read Cartesian grid data from HDF file.

Convenience wrapper to read a full MPI grid from an HDF container file.

Template Parameters
  • FileDataType: HDF file data type

  • Grid: Grid type

  • Dir: Special type that defines a cast to size_t

Parameters
  • fname: Input full filename without file extension

  • grid: Grid populated with file data

  • face_dir: Face direction (relevant for Cubism::EntityType::Face)