void
set_attribute(const std::string &attr_name, const T value);
+ /**
+ * Returns the #name of the object. In the case of File, #name corresponds
+ * to the file name. In the case of Group and DataSet, #name corresponds to
+ * the name of the object in the HDF5 file.
+ */
+ std::string
+ get_name() const;
+ protected:
+ /**
+ * Name of the HDF5Oject. In the case of File, @p name corresponds to the
+ * file name. In the case of Group and DataSet @p name corresponds to the
+ * name of the object in the HDF5 file.
+ */
const std::string name;
- protected:
/**
* HDF5 identifier for the objects File, Group and DataSet. The
* `std::shared_ptr<>` pointer allows the object to be copied. For example
+ std::string
+ HDF5Object::get_name() const
+ {
+ return name;
+ }
+
+
+
DataSet::DataSet(const std::string &name,
const hid_t & parent_group_id,
const bool mpi)
// Read attributes attached to a group
auto test_group = data_file.open_group("test_group");
+ deallog << "group_name: " << test_group.get_name() << std::endl;
#ifdef DEAL_II_WITH_COMPLEX_VALUES
auto group_complex_float =
DEAL::root_total calculated:-3.10361e+08
DEAL::root_total read:-3.10361e+08
+DEAL::group_name: test_group
DEAL::group_string read:test_string_attribute
DEAL::dataset_double read:20.2000
DEAL::dataset_string read:test_dataset_attribute
DEAL::root_total calculated:-3.10361e+08
DEAL::root_total read:-3.10361e+08
+DEAL::group_name: test_group
DEAL::group_complex_total calculated:(1.53171e+09,2.85468e+07)
DEAL::group_complex_total read:(1.53171e+09,2.85468e+07)
DEAL::group_string read:test_string_attribute
// Read attributes attached to a group
auto test_group = data_file.open_group("test_group");
+ deallog << "group_name: " << test_group.get_name() << std::endl;
#ifdef DEAL_II_WITH_COMPLEX_VALUES
auto group_complex_float =
DEAL::root_total calculated:-3.10361e+08
DEAL::root_total read:-3.10361e+08
+DEAL::group_name: test_group
DEAL::group_string read:test_string_attribute
DEAL::dataset_double read:20.2000
DEAL::dataset_string read:test_dataset_attribute
DEAL::root_total calculated:-3.10361e+08
DEAL::root_total read:-3.10361e+08
+DEAL::group_name: test_group
DEAL::group_string read:test_string_attribute
DEAL::dataset_double read:20.2000
DEAL::dataset_string read:test_dataset_attribute
DEAL::root_total calculated:-3.10361e+08
DEAL::root_total read:-3.10361e+08
+DEAL::group_name: test_group
DEAL::group_complex_total calculated:(1.53171e+09,2.85468e+07)
DEAL::group_complex_total read:(1.53171e+09,2.85468e+07)
DEAL::group_string read:test_string_attribute
DEAL::root_total calculated:-3.10361e+08
DEAL::root_total read:-3.10361e+08
+DEAL::group_name: test_group
DEAL::group_complex_total calculated:(1.53171e+09,2.85468e+07)
DEAL::group_complex_total read:(1.53171e+09,2.85468e+07)
DEAL::group_string read:test_string_attribute