From 802646308e042729eb21ffbb7812b22560486fd5 Mon Sep 17 00:00:00 2001 From: Daniel Garcia-Sanchez Date: Sun, 4 Apr 2021 12:14:04 +0200 Subject: [PATCH] Add HDF5 documentation for datatypes --- include/deal.II/base/hdf5.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/include/deal.II/base/hdf5.h b/include/deal.II/base/hdf5.h index 5d357b36bd..fed301a125 100644 --- a/include/deal.II/base/hdf5.h +++ b/include/deal.II/base/hdf5.h @@ -263,7 +263,21 @@ DEAL_II_NAMESPACE_OPEN * 4 5 * @endcode * - * # Complex numbers and HDF5 + * # Datatypes + * Attribute datatypes can be float, `double`, `std::complex`, + * `std::complex`, `int`, `unsigned int`, `bool` and `std::string`. + * HDF5Object::get_attribute() and HDF5Object::set_attribute() can be used with + * all of these datatypes. + * + * Dataset datatypes can be `float`, `double`, `std::complex`, + * `std::complex`, `int` and `unsigned int`. DataSet::read(), + * DataSet::write(), DataSet::read_selection(), etc. can be used with all of + * these datatypes. Note that the dataset datatype can not be `bool`, the + * reason is that it can not be assumed that `std::vector` stores the + * elements in a contiguous way. + * + * + * ## Complex numbers and HDF5 * There is no official HDF5 format to store `std::complex` numbers in a HDF5 * file. But the *de facto* standard is to store the `std::complex` number in a * compound type in which `r` corresponds to the real part and `i` corresponds -- 2.39.5