Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
dorie
dorie
Commits
e3743fea
Commit
e3743fea
authored
Sep 24, 2018
by
Lukas Riedel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve docstrings of H5File
parent
c761cafe
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
dune/dorie/solver/util_h5tools.hh
dune/dorie/solver/util_h5tools.hh
+13
-5
No files found.
dune/dorie/solver/util_h5tools.hh
View file @
e3743fea
...
...
@@ -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"
);
}
//
c
lose the H5 file when this object is destroyed
//
/ C
lose 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.
*
* \
t
param local_data is a 'return value' which gets the data that belongs to the current processor (current hyperslab)
* \
t
param local_cells is a container for storing the number of cells in each dimension
* \
t
param 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment