242 std::shared_ptr<const lf::mesh::Mesh> mesh_p) {
244 LF_VERIFY_MSG(mesh_p !=
nullptr,
"Missing mesh!");
245 LF_VERIFY_MSG((rfs_quad_p_ !=
nullptr) || (rfs_tria_p_ !=
nullptr),
246 "Missing FE specification for cells");
247 LF_VERIFY_MSG((mesh_p->DimMesh() == 2),
"Only for 2D meshes");
252 (rfs_tria_p_ !=
nullptr),
253 "Missing FE specification for triangles though mesh contains some");
255 (rfs_quad_p_ !=
nullptr),
256 "Missing FE specification for quads though mesh contains some");
261 if (rfs_tria_p_ !=
nullptr) {
264 "Wrong type for triangle!");
265 LF_VERIFY_MSG((*rfs_tria_p_).NumRefShapeFunctions(2) <= 1,
266 "At most one shape function can be assigned to each vertex");
268 num_rsf_node_ = (*rfs_tria_p_).NumRefShapeFunctions(2);
269 num_rsf_edge_ = (*rfs_tria_p_).NumRefShapeFunctions(1);
270 num_rsf_tria_ = (*rfs_tria_p_).NumRefShapeFunctions(0);
272 if (rfs_quad_p_ !=
nullptr) {
275 "Wrong type for quad!");
276 LF_VERIFY_MSG((*rfs_quad_p_).NumRefShapeFunctions(2) <= 1,
277 "At most one shape function can be assigned to each vertex");
279 num_rsf_node_ = (*rfs_quad_p_).NumRefShapeFunctions(2);
280 num_rsf_edge_ = (*rfs_quad_p_).NumRefShapeFunctions(1);
281 num_rsf_quad_ = (*rfs_quad_p_).NumRefShapeFunctions(0);
283 if (rfs_edge_p_ !=
nullptr) {
285 "Wrong type for edge!");
286 LF_VERIFY_MSG((*rfs_edge_p_).NumRefShapeFunctions(1) <= 1,
287 "At most one shape function can be assigned to each vertex");
288 num_rsf_node_ = (*rfs_edge_p_).NumRefShapeFunctions(1);
289 num_rsf_edge_ = (*rfs_edge_p_).NumRefShapeFunctions(0);
295 if ((rfs_tria_p_ !=
nullptr) && (rfs_quad_p_ !=
nullptr)) {
296 LF_ASSERT_MSG(((*rfs_tria_p_).NumRefShapeFunctions(2) ==
297 (*rfs_quad_p_).NumRefShapeFunctions(2)),
298 "#RSF mismatch on nodes "
299 << (*rfs_tria_p_).NumRefShapeFunctions(2) <<
" <-> "
300 << (*rfs_quad_p_).NumRefShapeFunctions(2));
301 LF_ASSERT_MSG(((*rfs_tria_p_).NumRefShapeFunctions(1) ==
302 (*rfs_quad_p_).NumRefShapeFunctions(1)),
303 "#RSF mismatch on edges "
304 << (*rfs_tria_p_).NumRefShapeFunctions(1) <<
" <-> "
305 << (*rfs_quad_p_).NumRefShapeFunctions(1));
307 if ((rfs_tria_p_ !=
nullptr) && (rfs_edge_p_ !=
nullptr)) {
308 LF_ASSERT_MSG(((*rfs_tria_p_).NumRefShapeFunctions(2) ==
309 (*rfs_edge_p_).NumRefShapeFunctions(1)),
310 "#RSF mismatch on nodes "
311 << (*rfs_tria_p_).NumRefShapeFunctions(2) <<
" <-> "
312 << (*rfs_edge_p_).NumRefShapeFunctions(1));
313 LF_ASSERT_MSG(((*rfs_tria_p_).NumRefShapeFunctions(1) ==
314 (*rfs_edge_p_).NumRefShapeFunctions(0)),
315 "#RSF mismatch on edges "
316 << (*rfs_tria_p_).NumRefShapeFunctions(1) <<
" <-> "
317 << (*rfs_edge_p_).NumRefShapeFunctions(0));
319 if ((rfs_quad_p_ !=
nullptr) && (rfs_edge_p_ !=
nullptr)) {
320 LF_ASSERT_MSG(((*rfs_quad_p_).NumRefShapeFunctions(2) ==
321 (*rfs_edge_p_).NumRefShapeFunctions(1)),
322 "#RSF mismatch on edges "
323 << (*rfs_quad_p_).NumRefShapeFunctions(2) <<
" <-> "
324 << (*rfs_edge_p_).NumRefShapeFunctions(1));
325 LF_ASSERT_MSG(((*rfs_quad_p_).NumRefShapeFunctions(1) ==
326 (*rfs_edge_p_).NumRefShapeFunctions(0)),
327 "#RSF mismatch on edges "
328 << (*rfs_quad_p_).NumRefShapeFunctions(1) <<
" <-> "
329 << (*rfs_edge_p_).NumRefShapeFunctions(0));