mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Adding equation system to mesh.
This commit is contained in:
parent
7e6b23752e
commit
781bc8adf5
2 changed files with 11 additions and 1 deletions
|
|
@ -24,9 +24,10 @@
|
|||
|
||||
#ifdef LIBMESH
|
||||
#include "libmesh/libmesh.h"
|
||||
#include "libmesh/elem.h"
|
||||
#include "libmesh/equation_systems.h"
|
||||
#include "libmesh/mesh.h"
|
||||
#include "libmesh/point.h"
|
||||
#include "libmesh/elem.h"
|
||||
#endif
|
||||
|
||||
namespace openmc {
|
||||
|
|
@ -509,6 +510,8 @@ public:
|
|||
private:
|
||||
std::unique_ptr<libMesh::Mesh> m_;
|
||||
std::unique_ptr<libMesh::PointLocatorBase> point_locator_;
|
||||
std::unique_ptr<libMesh::EquationSystems> equation_systems_;
|
||||
std::string eq_system_name_;
|
||||
libMesh::Elem* first_element_;
|
||||
std::set<libMesh::Elem*> boundary_elements_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2054,6 +2054,13 @@ LibMesh::LibMesh(pugi::xml_node node) : UnstructuredMeshBase(node) {
|
|||
|
||||
m_ = std::unique_ptr<libMesh::Mesh>(new libMesh::Mesh(settings::LMI->comm(), 3));
|
||||
m_->read(filename_);
|
||||
m_->prepare_for_use();
|
||||
|
||||
eq_system_name_ = "mesh_" + std::to_string(id_) + "_system";
|
||||
|
||||
equation_systems_ =
|
||||
std::unique_ptr<libMesh::EquationSystems>(new libMesh::EquationSystems(*m_));
|
||||
auto& eq_sys = equation_systems_->add_system(eq_system_name_);
|
||||
|
||||
point_locator_ = m_->sub_point_locator();
|
||||
point_locator_->enable_out_of_mesh_mode();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue