Addressing @aprilnovak's PR comments.

This commit is contained in:
Patrick Shriwise 2020-12-09 13:10:53 -06:00
parent 7cd3e388a4
commit b982704d4f
4 changed files with 11 additions and 6 deletions

View file

@ -276,7 +276,7 @@ should be set to:
<filter type="azimuthal" bins="2" />
:mesh:
The unique ID of a mesh to be tallied over.z
The unique ID of a mesh to be tallied over.
:distribcell:
The single cell which should be tallied uniquely for all instances.

View file

@ -6,7 +6,6 @@
#include <array>
#include <cstdint>
#include <memory>
#include <string>
#include <unordered_set>
#include <vector>

View file

@ -82,9 +82,6 @@ if (!settings::LMI && !libMesh::initialized())
#endif
}
if (!settings::LMI) {
fatal_error("libMesh::LibMeshInit object isn't set.");
}
#endif
// Start total and initialization timer

View file

@ -2123,10 +2123,19 @@ LibMesh::LibMesh(const std::string& filename)
void LibMesh::initialize()
{
m_ = std::make_unique<libMesh::Mesh>(settings::LMI->comm(), 3);
if (!settings::LMI) {
fatal_error("Attempting to use an unstructured mesh without a libMesh::LibMeshInit object.");
}
m_ = std::make_unique<libMesh::Mesh>(settings::LMI->comm(), n_dimension_);
m_->read(filename_);
m_->prepare_for_use();
// ensure that the loaded mesh is 3 dimensional
if(m_->spatial_dimension() != n_dimension_) {
fatal_error(fmt::format("Mesh file {} specified for use in an unstructured mesh is not a 3D mesh.", filename_));
}
// create an equation system for storing values
eq_system_name_ = "mesh_" + std::to_string(id_) + "_system";