24#include <opm/simulators/utils/ParallelCommunication.hpp>
53 HDF5File(
const std::string& fileName,
55 Parallel::Communication comm);
66 void write(
const std::string& group,
67 const std::string& dset,
68 const std::vector<char>& buffer,
77 void read(
const std::string& group,
78 const std::string& dset,
79 std::vector<char>& buffer,
84 std::vector<std::string>
list(
const std::string& group)
const;
91 void writeSplit(hid_t grp,
92 const std::vector<char>& buffer,
93 const std::string& dset)
const;
99 void writeRootOnly(hid_t grp,
100 const std::vector<char>& buffer,
101 const std::string& group,
102 const std::string& dset)
const;
106 hid_t getCompression(hsize_t size)
const;
114 void writeDset(
int rank, hid_t dataset_id,
115 hid_t dxpl, hsize_t size,
const void* data)
const;
116 hid_t m_file = H5I_INVALID_HID;
117 Parallel::Communication comm_;
HDF5File(const std::string &fileName, OpenMode mode, Parallel::Communication comm)
Opens HDF5 file for I/O.
Definition HDF5File.cpp:53
void write(const std::string &group, const std::string &dset, const std::vector< char > &buffer, DataSetMode mode=DataSetMode::PROCESS_SPLIT) const
Write a char buffer to a specified location in file.
Definition HDF5File.cpp:99
OpenMode
Enumeration of file opening modes.
Definition HDF5File.hpp:37
@ OVERWRITE
Overwrite and write to an existing file.
Definition HDF5File.hpp:39
@ READ
Open existing file for reading.
Definition HDF5File.hpp:40
@ APPEND
Append to an existing file (creates new if not).
Definition HDF5File.hpp:38
~HDF5File()
Destructor clears up any opened files.
Definition HDF5File.cpp:92
DataSetMode
Enumeration of dataset modes.
Definition HDF5File.hpp:44
@ PROCESS_SPLIT
One separate data set for each parallel process.
Definition HDF5File.hpp:46
@ ROOT_ONLY
A single dataset created at the root process.
Definition HDF5File.hpp:45
void read(const std::string &group, const std::string &dset, std::vector< char > &buffer, DataSetMode mode=DataSetMode::PROCESS_SPLIT) const
Read a char buffer from a specified location in file.
Definition HDF5File.cpp:154
std::vector< std::string > list(const std::string &group) const
Lists the entries in a given group.
Definition HDF5File.cpp:175
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43