From 2d637ba15848aa8147be354c8c785e230f3fe6c5 Mon Sep 17 00:00:00 2001 From: Daniel Garcia-Sanchez Date: Sun, 19 Aug 2018 13:53:26 +0200 Subject: [PATCH] Improve write_hyperslab() --- include/deal.II/base/hdf5.h | 64 ++++++++- source/base/hdf5.cc | 267 +++++++++++++++++++++++++++++++++--- 2 files changed, 306 insertions(+), 25 deletions(-) diff --git a/include/deal.II/base/hdf5.h b/include/deal.II/base/hdf5.h index 768135eeb9..3705a01983 100644 --- a/include/deal.II/base/hdf5.h +++ b/include/deal.II/base/hdf5.h @@ -29,7 +29,7 @@ DEAL_II_NAMESPACE_OPEN /** - * Namespace containing the HDF5 wrappers. + * Namespace containing the HDF5 interface. * * This set of classes can be used to store the data in the hdf5 file format. * @@ -247,10 +247,56 @@ namespace HDF5 const std::vector coordinates); /** - * Writes data to a subset of the dataset. T can be double, int, unsigned - * int, bool or std::complex. + * Writes a data hyperslab to the dataset. The parameters are summarized + * below: + * - Offset: The starting location for the hyperslab. + * - Count: The number of elements to select along each dimension. + */ + // clang-format off + /** + * + * stride and block are set to NULL. For more complex hyperslabs see + * write_hyperslab(const Container &data, const std::vector &data_dimensions, const std::vector &offset, const std::vector &stride, const std::vector &count, const std::vector &block). + */ + // clang-format on + /** + * + * See the "Dataspaces + * and Data Transfer" section in the HDF5 User's Guide. See as well the + * "H5Sselect_hyperslab + * definition". + * + * Datatype conversion takes place at the time of a read or write and is + * automatic. See the "Data + * Transfer: Datatype Conversion and Selection" section in the HDF5 + * User's Guide. + */ + template