DOLFIN-X
DOLFIN-X C++ interface
|
Interface to HDF5 files. More...
#include <HDF5File.h>
Public Member Functions | |
HDF5File (MPI_Comm comm, const std::string &filename, const std::string &file_mode) | |
Constructor. file_mode should be "a" (append), "w" (write) or "r" (read). | |
~HDF5File () | |
Destructor. | |
void | close () |
Close file. | |
void | flush () |
Flush buffered I/O to disk. | |
bool | has_dataset (const std::string &dataset_name) const |
Check if dataset exists in HDF5 file. | |
void | set_mpi_atomicity (bool atomic) |
Set the MPI atomicity. | |
bool | get_mpi_atomicity () const |
Get the MPI atomicity. | |
hid_t | h5_id () const |
Get the file ID. | |
template<typename T > | |
void | write_data (const std::string &dataset_name, const std::vector< T > &data, const std::vector< std::int64_t > &global_size, bool use_mpi_io) |
Write contiguous data to HDF5 data set. Data is flattened into a 1D array, e.g. [x0, y0, z0, x1, y1, z1] for a vector in 3D. | |
template<typename T > | |
void | write_data (const std::string &dataset_name, const Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > &data, bool use_mpi_io) |
Write 2D dataset to HDF5. Eigen::Arrays on each process must have the same number of columns. | |
Public Attributes | |
bool | chunking = false |
Chunking parameter - partition data into fixed size blocks for efficiency. | |
Interface to HDF5 files.