60 : _dof_table(dof_table)
63 using Enabled3DElementTraits =
64 decltype(BaseLib::TMP::filter<EnabledElementTraitsLagrange>(
67 BaseLib::TMP::foreach<Enabled3DElementTraits>(
68 [
this, integration_order]<
typename ET>(ET*)
70 using MeshElement =
typename ET::Element;
71 using ShapeFunction =
typename ET::ShapeFunction;
73 _builder[std::type_index(
typeid(MeshElement))] =
74 makeLocalAssemblerBuilder<ShapeFunction>(integration_order);
78 using Enabled1DElementTraits =
79 decltype(BaseLib::TMP::filter<EnabledElementTraitsLagrange>(
82 BaseLib::TMP::foreach<Enabled1DElementTraits>(
83 [
this, integration_order]<
typename ET>(ET*)
85 using MeshElement =
typename ET::Element;
86 using ShapeFunction =
typename ET::ShapeFunction;
88 _builder[std::type_index(
typeid(MeshElement))] =
89 makeLocalAssemblerBuilderBHE<ShapeFunction>(
102 std::unordered_map<std::size_t, BHE::BHETypes*>
const&
104 ConstructorArgs&&... args)
const
106 auto const type_idx = std::type_index(
typeid(mesh_item));
107 auto const it = _builder.find(type_idx);
109 if (it == _builder.end())
112 "You are trying to build a local assembler for an unknown mesh "
113 "element type ({:s})."
114 " Maybe you have disabled this mesh element type in your build "
115 "configuration, or a mesh element order does not match shape "
116 "function order given in the project file.",
120 return it->second(mesh_item,
122 std::forward<ConstructorArgs>(args)...);
136 return [integration_order](
138 std::unordered_map<std::size_t, BHE::BHETypes*>
const&
142 auto const& integration_method = NumLib::IntegrationMethodRegistry::
143 template getIntegrationMethod<
144 typename ShapeFunction::MeshElement>(integration_order);
148 return LADataIntfPtr{
new LocalAssemblerDataSoil<ShapeFunction>{
149 e, integration_method,
150 std::forward<ConstructorArgs>(args)...}};
161 return [integration_order](
163 std::unordered_map<std::size_t, BHE::BHETypes*>
const&
167 auto const& integration_method = NumLib::IntegrationMethodRegistry::
168 template getIntegrationMethod<
169 typename ShapeFunction::MeshElement>(integration_order);
171 auto& bhe = *element_to_bhe_map.at(e.
getID());
173 if (std::holds_alternative<BHE::BHE_1U>(bhe))
176 new LocalAssemblerDataBHE<ShapeFunction, BHE::BHE_1U>{
177 e, integration_method, std::get<BHE::BHE_1U>(bhe),
178 std::forward<ConstructorArgs>(args)...}};
181 if (std::holds_alternative<BHE::BHE_CXA>(bhe))
184 new LocalAssemblerDataBHE<ShapeFunction, BHE::BHE_CXA>{
185 e, integration_method, std::get<BHE::BHE_CXA>(bhe),
186 std::forward<ConstructorArgs>(args)...}};
189 if (std::holds_alternative<BHE::BHE_CXC>(bhe))
192 new LocalAssemblerDataBHE<ShapeFunction, BHE::BHE_CXC>{
193 e, integration_method, std::get<BHE::BHE_CXC>(bhe),
194 std::forward<ConstructorArgs>(args)...}};
197 if (std::holds_alternative<BHE::BHE_2U>(bhe))
200 new LocalAssemblerDataBHE<ShapeFunction, BHE::BHE_2U>{
201 e, integration_method, std::get<BHE::BHE_2U>(bhe),
202 std::forward<ConstructorArgs>(args)...}};
205 if (std::holds_alternative<BHE::BHE_1P>(bhe))
208 new LocalAssemblerDataBHE<ShapeFunction, BHE::BHE_1P>{
209 e, integration_method, std::get<BHE::BHE_1P>(bhe),
210 std::forward<ConstructorArgs>(args)...}};
213 "Trying to create local assembler for an unknown BHE type.");