85 ConstructorArgs&&... args)
const
87 auto const type_idx = std::type_index(
typeid(mesh_item));
88 auto const it =
_builder.find(type_idx);
93 "You are trying to build a local assembler for an unknown mesh "
94 "element type ({:s})."
95 " Maybe you have disabled this mesh element type in your build "
96 "configuration, or a mesh element order does not match shape "
97 "function order given in the project file.",
101 auto const n_local_dof =
_dof_table.getNumberOfElementDOF(
id);
102 auto const n_global_components =
104 auto const varIDs =
_dof_table.getElementVariableIDs(
id);
106 std::vector<unsigned> dofIndex_to_localIndex;
108 n_global_components > DisplacementDim)
110 dofIndex_to_localIndex.resize(n_local_dof);
112 unsigned local_id = 0;
113 for (
auto i : varIDs)
115 for (
int j = 0; j <
_dof_table.getNumberOfVariableComponents(i);
118 auto const& ms =
_dof_table.getMeshSubset(i, j);
119 auto const mesh_id = ms.getMeshID();
124 getNodeIndex(mesh_item, k));
125 auto global_index =
_dof_table.getGlobalIndex(l, i, j);
128 dofIndex_to_localIndex[dof_id++] = local_id;
136 return it->second(mesh_item, varIDs.size(), n_local_dof,
137 dofIndex_to_localIndex,
138 std::forward<ConstructorArgs>(args)...);
158 return [integration_order](
160 std::size_t
const n_variables,
161 std::size_t
const local_matrix_size,
162 std::vector<unsigned>
const& dofIndex_to_localIndex,
163 ConstructorArgs&&... args)
165 auto const& integration_method = NumLib::IntegrationMethodRegistry::
166 template getIntegrationMethod<
167 typename ShapeFunction::MeshElement>(integration_order);
171 if (dofIndex_to_localIndex.empty())
176 e, local_matrix_size, integration_method,
177 std::forward<ConstructorArgs>(args)...}};
183 e, n_variables, local_matrix_size,
184 dofIndex_to_localIndex, integration_method,
185 std::forward<ConstructorArgs>(args)...}};
188 new LocalAssemblerDataFracture<ShapeFunction, DisplacementDim>{
189 e, n_variables, local_matrix_size, dofIndex_to_localIndex,
191 std::forward<ConstructorArgs>(args)...}};