Commit e3743fea authored by Lukas Riedel's avatar Lukas Riedel

Improve docstrings of H5File

parent c761cafe
......@@ -29,6 +29,10 @@ namespace Dune {
hid_t h5_group_id;
public:
/// Initialize thsi file reader. This does not open the H5 file!
/** \param filePath_ Path to the H5 file
* \param verbose_ Verbosity of the output
*/
explicit H5File(const std::string& filePath_, const int verbose_):
fileOpen(false), filePath(filePath_), verbose(verbose_)
{
......@@ -36,13 +40,16 @@ namespace Dune {
DUNE_THROW(Exception,"File '" << filePath << "' is not readable");
}
// close the H5 file when this object is destroyed
/// Close the H5 file when this object is destroyed
~H5File ()
{
if (fileOpen)
close();
}
/// Open a group inside the file
/** \param group_name Internal name/path of the group
*/
void open(const std::string& group_name="./")
{
if(fileOpen)
......@@ -69,10 +76,10 @@ namespace Dune {
/** Read data set from multi-dim. array in sequential mode from HDF5 file.
*
* \tparam local_data is a 'return value' which gets the data that belongs to the current processor (current hyperslab)
* \tparam local_cells is a container for storing the number of cells in each dimension
* \tparam dataset_name is the group and name of the dataset to be read
*
* \param local_data is a 'return value' which gets the data that belongs to the current processor (current hyperslab)
* \param local_cells is a container for storing the number of cells in each dimension
* \param dataset_name is the group and name of the dataset to be read
* \param data_type The H5 data type to read.
*/
template<typename VEC, typename CELLVEC>
void read_dataset(VEC& local_data,
......@@ -147,6 +154,7 @@ namespace Dune {
H5Pclose(h5_plist_id);
}
/// Close the H5 file
void close()
{
if (not fileOpen)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment