diff --git a/include/openmc/hdf5_interface.h b/include/openmc/hdf5_interface.h index f601673041..ae91ce2ae9 100644 --- a/include/openmc/hdf5_interface.h +++ b/include/openmc/hdf5_interface.h @@ -51,7 +51,7 @@ inline hid_t create_group(hid_t parent_id, const std::stringstream& name) hid_t file_open(const std::string& filename, char mode, bool parallel=false); - +hid_t open_group(hid_t group_id, const std::string& name); void write_string(hid_t group_id, const char* name, const std::string& buffer, bool indep); diff --git a/src/hdf5_interface.cpp b/src/hdf5_interface.cpp index 0f8db2dc5f..522c9c2625 100644 --- a/src/hdf5_interface.cpp +++ b/src/hdf5_interface.cpp @@ -225,6 +225,11 @@ file_open(const std::string& filename, char mode, bool parallel) return file_open(filename.c_str(), mode, parallel); } +hid_t open_group(hid_t group_id, const std::string& name) +{ + return open_group(group_id, name.c_str()); +} + void file_close(hid_t file_id) { H5Fclose(file_id);