mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Ensure n_dimension_ attribute is set for unstructured meshes. (#3575)
This commit is contained in:
parent
ecb0a3361f
commit
ca63da91b9
2 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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();
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue