92 ConstructorArgs&&... args)
const
94 auto const type_idx = std::type_index(
typeid(mesh_item));
95 auto const it =
_builder.find(type_idx);
100 "You are trying to build a local assembler for an unknown mesh "
101 "element type ({:s})."
102 " Maybe you have disabled this mesh element type in your build "
103 "configuration, or a mesh element order does not match shape "
104 "function order given in the project file.",
108 auto const n_local_dof =
_dof_table.getNumberOfElementDOF(
id);
109 auto const n_global_components =
111 auto const varIDs =
_dof_table.getElementVariableIDs(
id);
113 std::vector<unsigned> dofIndex_to_localIndex;
115 n_global_components > DisplacementDim)
117 dofIndex_to_localIndex.resize(n_local_dof);
119 unsigned local_id = 0;
120 for (
auto i : varIDs)
122 for (
int j = 0; j <
_dof_table.getNumberOfVariableComponents(i);
125 auto const& ms =
_dof_table.getMeshSubset(i, j);
126 auto const mesh_id = ms.getMeshID();
131 getNodeIndex(mesh_item, k));
132 auto global_index =
_dof_table.getGlobalIndex(l, i, j);
135 dofIndex_to_localIndex[dof_id++] = local_id;
143 return it->second(mesh_item, varIDs.size(), n_local_dof,
144 dofIndex_to_localIndex,
145 std::forward<ConstructorArgs>(args)...);
165 return [integration_order](
167 std::size_t
const n_variables,
168 std::size_t
const local_matrix_size,
169 std::vector<unsigned>
const& dofIndex_to_localIndex,
170 ConstructorArgs&&... args)
172 auto const& integration_method = NumLib::IntegrationMethodRegistry::
173 template getIntegrationMethod<
174 typename ShapeFunction::MeshElement>(integration_order);
178 if (dofIndex_to_localIndex.empty())
181 new LocalAssemblerDataMatrix<ShapeFunction,
183 e, local_matrix_size, integration_method,
184 std::forward<ConstructorArgs>(args)...}};
188 new LocalAssemblerDataMatrixNearFracture<ShapeFunction,
190 e, n_variables, local_matrix_size,
191 dofIndex_to_localIndex, integration_method,
192 std::forward<ConstructorArgs>(args)...}};
195 new LocalAssemblerDataFracture<ShapeFunction, DisplacementDim>{
196 e, n_variables, local_matrix_size, dofIndex_to_localIndex,
198 std::forward<ConstructorArgs>(args)...}};