From 58d477c657140c46e05d4ed2d35b26cbf8986a48 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 8 Apr 2020 14:13:16 -0500 Subject: [PATCH] Renaming UnstructuredMeshBase class to UnstructuredMesh. --- include/openmc/mesh.h | 12 ++++++------ src/mesh.cpp | 10 +++++----- src/state_point.cpp | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/openmc/mesh.h b/include/openmc/mesh.h index 1505556805..f4a6dcc33e 100644 --- a/include/openmc/mesh.h +++ b/include/openmc/mesh.h @@ -274,13 +274,13 @@ public: int set_grid(); }; -class UnstructuredMeshBase : public Mesh { +class UnstructuredMesh : public Mesh { public: // constructors - UnstructuredMeshBase() {}; - UnstructuredMeshBase(pugi::xml_node node); - UnstructuredMeshBase(const std::string& filename); + UnstructuredMesh() {}; + UnstructuredMesh(pugi::xml_node node); + UnstructuredMesh(const std::string& filename); std::string bin_label(int bin) const override; @@ -311,7 +311,7 @@ public: #ifdef DAGMC -class MOABUnstructuredMesh : public UnstructuredMeshBase { +class MOABUnstructuredMesh : public UnstructuredMesh { public: @@ -480,7 +480,7 @@ private: #endif #ifdef LIBMESH -class LibMesh : public UnstructuredMeshBase { +class LibMesh : public UnstructuredMesh { typedef std::vector> UnstructuredMeshHits; diff --git a/src/mesh.cpp b/src/mesh.cpp index 0f92032e37..538c3661dc 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -112,7 +112,7 @@ StructuredMesh::bin_label(int bin) const { // Untructured Mesh implementation //============================================================================== -UnstructuredMeshBase::UnstructuredMeshBase(pugi::xml_node node) : Mesh(node) { +UnstructuredMesh::UnstructuredMesh(pugi::xml_node node) : Mesh(node) { // check the mesh type if (check_for_node(node, "type")) { auto temp = get_node_value(node, "type", true, true); @@ -132,12 +132,12 @@ UnstructuredMeshBase::UnstructuredMeshBase(pugi::xml_node node) : Mesh(node) { } std::string -UnstructuredMeshBase::bin_label(int bin) const { +UnstructuredMesh::bin_label(int bin) const { return fmt::format("Mesh Index ({})", bin); }; void -UnstructuredMeshBase::to_hdf5(hid_t group) const +UnstructuredMesh::to_hdf5(hid_t group) const { hid_t mesh_group = create_group(group, fmt::format("mesh {}", id_)); @@ -1614,7 +1614,7 @@ openmc_rectilinear_mesh_set_grid(int32_t index, const double* grid_x, #ifdef DAGMC -MOABUnstructuredMesh::MOABUnstructuredMesh(pugi::xml_node node) : UnstructuredMeshBase(node) { +MOABUnstructuredMesh::MOABUnstructuredMesh(pugi::xml_node node) : UnstructuredMesh(node) { initialize(); } @@ -2162,7 +2162,7 @@ double UnstructuredMesh::get_volume_frac(int bin = -1) const { #endif #ifdef LIBMESH -LibMesh::LibMesh(pugi::xml_node node) : UnstructuredMeshBase(node) { +LibMesh::LibMesh(pugi::xml_node node) : UnstructuredMesh(node) { initialize(); } diff --git a/src/state_point.cpp b/src/state_point.cpp index c9f436a6ed..e8767947c5 100644 --- a/src/state_point.cpp +++ b/src/state_point.cpp @@ -784,7 +784,7 @@ void write_unstructured_mesh_results() { // check if the filter uses an unstructured mesh auto mesh_filter = dynamic_cast(filter.get()); auto mesh_idx = mesh_filter->mesh(); - auto umesh = dynamic_cast(model::meshes[mesh_idx].get()); + auto umesh = dynamic_cast(model::meshes[mesh_idx].get()); if (!umesh) continue;