Skip to content
17 changes: 17 additions & 0 deletions include/openmc/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class Mesh {
// Constructors and destructor
Mesh() = default;
Mesh(pugi::xml_node node);
Mesh(hid_t group);
virtual ~Mesh() = default;

// Methods
Expand Down Expand Up @@ -258,6 +259,7 @@ class StructuredMesh : public Mesh {
public:
StructuredMesh() = default;
StructuredMesh(pugi::xml_node node) : Mesh {node} {};
StructuredMesh(hid_t group) : Mesh {group} {};
virtual ~StructuredMesh() = default;

using MeshIndex = std::array<int, 3>;
Expand Down Expand Up @@ -423,6 +425,7 @@ class PeriodicStructuredMesh : public StructuredMesh {
public:
PeriodicStructuredMesh() = default;
PeriodicStructuredMesh(pugi::xml_node node) : StructuredMesh {node} {};
PeriodicStructuredMesh(hid_t group) : StructuredMesh {group} {};

Position local_coords(const Position& r) const override
{
Expand All @@ -442,6 +445,7 @@ class RegularMesh : public StructuredMesh {
// Constructors
RegularMesh() = default;
RegularMesh(pugi::xml_node node);
RegularMesh(hid_t group);

// Overridden methods
int get_index_in_direction(double r, int i) const override;
Expand Down Expand Up @@ -492,6 +496,7 @@ class RectilinearMesh : public StructuredMesh {
// Constructors
RectilinearMesh() = default;
RectilinearMesh(pugi::xml_node node);
RectilinearMesh(hid_t group);

// Overridden methods
int get_index_in_direction(double r, int i) const override;
Expand Down Expand Up @@ -534,6 +539,7 @@ class CylindricalMesh : public PeriodicStructuredMesh {
// Constructors
CylindricalMesh() = default;
CylindricalMesh(pugi::xml_node node);
CylindricalMesh(hid_t group);

// Overridden methods
virtual MeshIndex get_indices(Position r, bool& in_mesh) const override;
Expand Down Expand Up @@ -598,6 +604,7 @@ class SphericalMesh : public PeriodicStructuredMesh {
// Constructors
SphericalMesh() = default;
SphericalMesh(pugi::xml_node node);
SphericalMesh(hid_t group);

// Overridden methods
virtual MeshIndex get_indices(Position r, bool& in_mesh) const override;
Expand Down Expand Up @@ -668,6 +675,7 @@ class UnstructuredMesh : public Mesh {
// Constructors
UnstructuredMesh() { n_dimension_ = 3; };
UnstructuredMesh(pugi::xml_node node);
UnstructuredMesh(hid_t group);

static const std::string mesh_type;
virtual std::string get_mesh_type() const override;
Expand Down Expand Up @@ -774,6 +782,7 @@ class MOABMesh : public UnstructuredMesh {
// Constructors
MOABMesh() = default;
MOABMesh(pugi::xml_node);
MOABMesh(hid_t group);
MOABMesh(const std::string& filename, double length_multiplier = 1.0);
MOABMesh(std::shared_ptr<moab::Interface> external_mbi);

Expand Down Expand Up @@ -943,6 +952,7 @@ class LibMesh : public UnstructuredMesh {
public:
// Constructors
LibMesh(pugi::xml_node node);
LibMesh(hid_t group);
LibMesh(const std::string& filename, double length_multiplier = 1.0);
LibMesh(libMesh::MeshBase& input_mesh, double length_multiplier = 1.0);

Expand Down Expand Up @@ -1069,6 +1079,13 @@ class AdaptiveLibMesh : public LibMesh {
//! \param[in] root XML node
void read_meshes(pugi::xml_node root);

//! Read meshes from a HDF5 file
//
//! \param[in] group HDF5 group
//! \param[out] mesh_map mapping from mesh ids inside HDF5 group to global mesh
//! ids
void read_meshes(hid_t group, std::unordered_map<int32_t, int32_t>& mesh_map);

//! Write mesh data to an HDF5 group
//
//! \param[in] group HDF5 group
Expand Down
5 changes: 3 additions & 2 deletions include/openmc/weight_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ class WeightWindows {
WeightWindows(pugi::xml_node node);
~WeightWindows();
static WeightWindows* create(int32_t id = -1);
static WeightWindows* from_hdf5(
hid_t wws_group, const std::string& group_name);
static WeightWindows* from_hdf5(hid_t wws_group,
const std::string& group_name,
std::unordered_map<int32_t, int32_t>& id_map);

//----------------------------------------------------------------------------
// Methods
Expand Down
Loading