9#include <kernel/geometry/mesh_node.hpp>
10#include <kernel/assembly/domain_assembler.hpp>
18 template<
typename Mesh_>
22 typedef Mesh_ MeshType;
23 typedef typename MeshType::ShapeType ShapeType;
30 std::unique_ptr<MeshNodeType> _mesh_node;
33 explicit DomainLevel(
int _lvl_idx, std::unique_ptr<MeshNodeType> node) :
34 _level_index(_lvl_idx),
35 _mesh_node(std::move(node))
39 XASSERT(_mesh_node.get() !=
nullptr);
43 _level_index(_level_index),
44 _mesh_node(std::forward<std::unique_ptr<MeshNodeType>>(other._mesh_node))
52 std::size_t bytes()
const
54 return _mesh_node->bytes();
57 int get_level_index()
const
64 return _mesh_node.get();
69 return _mesh_node.get();
77 const MeshType& get_mesh()
const
79 return *_mesh_node->get_mesh();
82 const PartType* find_halo_part(
int rank)
const
84 return this->_mesh_node->get_halo(rank);
87 const PartType* find_patch_part(
int rank)
const
89 return this->_mesh_node->get_patch(rank);
93 template<
typename Trafo_>
94 void _add_trafo_mesh_part_charts(Trafo_& trafo)
96 XASSERT(&trafo.get_mesh() == &this->get_mesh());
99 const std::deque<String>& mesh_part_names = this->_mesh_node->get_mesh_part_names(
true);
100 for(
const String& part_name : mesh_part_names)
103 const ChartType* chart = this->_mesh_node->find_mesh_part_chart(part_name);
105 PartType* mesh_part = this->_mesh_node->find_mesh_part(part_name);
106 if((chart !=
nullptr) && (mesh_part !=
nullptr))
107 trafo.add_meshpart_chart(*mesh_part, *chart);
112 template<
typename Mesh_,
typename Trafo_,
typename Space_>
119 typedef Mesh_ MeshType;
120 typedef Trafo_ TrafoType;
121 typedef Space_ SpaceType;
131 trafo(BaseClass::get_mesh()),
137 void add_trafo_mesh_part_charts()
139 this->_add_trafo_mesh_part_charts(trafo);
143 template<
typename Mesh_,
typename Trafo_,
typename SpaceVelo_,
typename SpacePres_>
150 typedef Mesh_ MeshType;
151 typedef Trafo_ TrafoType;
152 typedef SpaceVelo_ SpaceVeloType;
153 typedef SpacePres_ SpacePresType;
156 SpaceVeloType space_velo;
157 SpacePresType space_pres;
164 trafo(BaseClass::get_mesh()),
171 void add_trafo_mesh_part_charts()
173 this->_add_trafo_mesh_part_charts(trafo);
177 template<
typename Mesh_,
typename Trafo_,
typename SpaceVelo_,
typename SpacePres_,
typename SpaceStress_>
184 typedef Mesh_ MeshType;
185 typedef Trafo_ TrafoType;
186 typedef SpaceVelo_ SpaceVeloType;
187 typedef SpacePres_ SpacePresType;
188 typedef SpaceStress_ SpaceStressType;
191 SpaceVeloType space_velo;
192 SpacePresType space_pres;
193 SpaceStressType space_stress;
200 trafo(BaseClass::get_mesh()),
208 void add_trafo_mesh_part_charts()
210 this->_add_trafo_mesh_part_charts(trafo);
#define XASSERT(expr)
Assertion macro definition.
Domain Integral Assembler class template.
MeshType * get_mesh()
Returns the mesh of this node.
Class template for partial meshes.
Root mesh node class template.
String class implementation.