Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/openmc/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,8 @@ class UnstructuredMesh : public Mesh {

public:
// Constructors
UnstructuredMesh() {};
UnstructuredMesh() { n_dimension_ = 3; };
UnstructuredMesh(pugi::xml_node node);
UnstructuredMesh(const std::string& filename);

static const std::string mesh_type;
virtual std::string get_mesh_type() const override;
Expand Down
5 changes: 5 additions & 0 deletions src/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@ Position StructuredMesh::sample_element(

UnstructuredMesh::UnstructuredMesh(pugi::xml_node node) : Mesh(node)
{
n_dimension_ = 3;

// check the mesh type
if (check_for_node(node, "type")) {
auto temp = get_node_value(node, "type", true, true);
Expand Down Expand Up @@ -2519,7 +2521,9 @@ MOABMesh::MOABMesh(pugi::xml_node node) : UnstructuredMesh(node)
}

MOABMesh::MOABMesh(const std::string& filename, double length_multiplier)
: UnstructuredMesh()
{
n_dimension_ = 3;
filename_ = filename;
set_length_multiplier(length_multiplier);
initialize();
Expand Down Expand Up @@ -3242,6 +3246,7 @@ LibMesh::LibMesh(libMesh::MeshBase& input_mesh, double length_multiplier)
LibMesh::LibMesh(const std::string& filename, double length_multiplier)
: adaptive_(false)
{
n_dimension_ = 3;
set_mesh_pointer_from_filename(filename);
set_length_multiplier(length_multiplier);
initialize();
Expand Down