24#include <opm/simulators/utils/ParallelCommunication.hpp>
52 HDF5File(
const std::string& fileName,
54 Parallel::Communication comm);
64 void write(
const std::string& group,
65 const std::string& dset,
66 const std::vector<char>& buffer,
74 void read(
const std::string& group,
75 const std::string& dset,
76 std::vector<char>& buffer,
81 std::vector<std::string>
list(
const std::string& group)
const;
88 void writeSplit(hid_t grp,
89 const std::vector<char>& buffer,
90 const std::string& dset)
const;
96 void writeRootOnly(hid_t grp,
97 const std::vector<char>& buffer,
98 const std::string& group,
99 const std::string& dset)
const;
103 hid_t getCompression(hsize_t size)
const;
111 void writeDset(
int rank, hid_t dataset_id,
112 hid_t dxpl, hsize_t size,
const void* data)
const;
113 hid_t m_file = H5I_INVALID_HID;
114 Parallel::Communication comm_;
Class handling simple output to HDF5.
Definition HDF5File.hpp:34
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
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
OpenMode
Enumeration of file opening modes.
Definition HDF5File.hpp:37
@ OVERWRITE
Overwrite and write to an existing file.
@ READ
Open existing file for reading.
@ APPEND
Append to an existing file (creates new if not)
~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.
@ ROOT_ONLY
A single dataset created at the root process.
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 blackoilboundaryratevector.hh:37