19 #include "libmesh/libmesh_config.h" 21 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 24 #include "libmesh/inf_fe.h" 25 #include "libmesh/inf_fe_macro.h" 26 #include "libmesh/fe.h" 27 #include "libmesh/fe_interface.h" 28 #include "libmesh/fe_compute_data.h" 29 #include "libmesh/elem.h" 30 #include "libmesh/enum_to_string.h" 32 #include "libmesh/remote_elem.h" 35 #include "libmesh/dof_map.h" 43 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
48 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
52 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
55 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
65 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
67 const Elem * inf_elem)
82 #ifdef LIBMESH_ENABLE_DEPRECATED 83 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
92 unsigned int n_base, n_radial;
93 compute_node_indices(inf_elem_type, n, n_base, n_radial);
108 #endif // LIBMESH_ENABLE_DEPRECATED 112 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
114 const Elem * inf_elem,
115 const unsigned int n)
121 unsigned int n_base, n_radial;
122 compute_node_indices(inf_elem->
type(), n, n_base, n_radial);
133 #ifdef LIBMESH_ENABLE_DEPRECATED 134 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
138 libmesh_deprecated();
148 #endif // LIBMESH_ENABLE_DEPRECATED 152 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
154 const Elem * inf_elem)
169 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
172 const std::vector<Number> & ,
173 std::vector<Number> & nodal_soln)
176 if (!_warned_for_nodal_soln)
178 libMesh::err <<
"WARNING: nodal_soln(...) does _not_ work for infinite elements." << std::endl
179 <<
" Will return an empty nodal solution. Use " << std::endl
180 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" << std::endl;
181 _warned_for_nodal_soln =
true;
204 #ifdef LIBMESH_ENABLE_DEPRECATED 205 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
208 const unsigned int i,
211 libmesh_deprecated();
213 libmesh_assert_not_equal_to (Dim, 0);
219 libMesh::err <<
"WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
220 <<
" return the correct trial function! Use " << std::endl
221 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" 223 _warned_for_shape =
true;
229 const Real v (p(Dim-1));
231 unsigned int i_base, i_radial;
232 compute_shape_indices(fet, inf_elem_type, i, i_base, i_radial);
245 #endif // LIBMESH_ENABLE_DEPRECATED 249 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
251 const Elem * inf_elem,
252 const unsigned int i,
256 libmesh_assert_not_equal_to (Dim, 0);
262 libMesh::err <<
"WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
263 <<
" return the correct trial function! Use " << std::endl
264 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" 266 _warned_for_shape =
true;
271 const Real v (p(Dim-1));
272 std::unique_ptr<const Elem> base_el (inf_elem->
build_side_ptr(0));
274 unsigned int i_base, i_radial;
275 compute_shape_indices(fet, inf_elem, i, i_base, i_radial);
288 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
290 const Elem * inf_elem,
291 const unsigned int i,
293 const bool add_p_level)
298 tmp_fet = fet.
order + add_p_level * inf_elem->
p_level();
305 #ifdef LIBMESH_ENABLE_DEPRECATED 306 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
309 const unsigned int i,
310 const unsigned int j,
313 libmesh_deprecated();
315 libmesh_assert_not_equal_to (Dim, 0);
316 libmesh_assert_greater (Dim,j);
321 libMesh::err <<
"WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
322 <<
" return the correct trial function gradients! Use " << std::endl
323 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" 325 _warned_for_dshape =
true;
331 const Real v (p(Dim-1));
333 unsigned int i_base, i_radial;
334 compute_shape_indices(fe_t, inf_elem_type, i, i_base, i_radial);
350 #endif // LIBMESH_ENABLE_DEPRECATED 353 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
355 const Elem * inf_elem,
356 const unsigned int i,
357 const unsigned int j,
360 libmesh_assert_not_equal_to (Dim, 0);
361 libmesh_assert_greater (Dim,j);
366 libMesh::err <<
"WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
367 <<
" return the correct trial function gradients! Use " << std::endl
368 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" 370 _warned_for_dshape =
true;
374 const Real v (p(Dim-1));
376 std::unique_ptr<const Elem> base_el (inf_elem->
build_side_ptr(0));
378 unsigned int i_base, i_radial;
380 if ((-1. > v ) || (v > 1.))
386 compute_shape_indices(fe_t, inf_elem, i, i_base, i_radial);
406 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
408 const Elem * inf_elem,
412 libmesh_assert_not_equal_to (Dim, 0);
417 const Real v (p(Dim-1));
418 std::unique_ptr<const Elem> base_el (inf_elem->
build_side_ptr(0));
426 Real interpolated_dist = 0.;
438 const unsigned int n_base_nodes = base_el->n_nodes();
441 const Order base_mapping_order (base_el->default_order());
442 const ElemType base_mapping_elem_type (base_el->type());
445 for (
unsigned int n=0; n<n_base_nodes; n++)
446 interpolated_dist +=
Point(base_el->point(n) - origin).
norm()
453 const unsigned int n_base_nodes = base_el->n_nodes();
456 const Order base_mapping_order (base_el->default_order());
457 const ElemType base_mapping_elem_type (base_el->type());
460 for (
unsigned int n=0; n<n_base_nodes; n++)
461 interpolated_dist +=
Point(base_el->point(n) - origin).
norm()
467 libmesh_error_msg(
"Unknown Dim = " << Dim);
475 data.
phase = interpolated_dist
480 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 491 const Number time_harmonic = exp(exponent);
493 const Number time_harmonic = 1;
494 #endif //LIBMESH_USE_COMPLEX_NUMBERS 501 const unsigned int n_dof = n_dofs (fet, inf_elem);
502 data.
shape.resize(n_dof);
505 data.
dshape.resize(n_dof);
508 for (
unsigned int d=0; d<Dim; d++)
515 std::vector<Point> pt = {p};
517 fe->reinit(inf_elem, &pt);
534 for (
unsigned int i=0; i<n_dof; i++)
537 unsigned int i_base, i_radial;
538 compute_shape_indices(fet, inf_elem, i, i_base, i_radial);
565 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 575 libmesh_not_implemented();
583 libmesh_error_msg(
"compute_data() for 1-dimensional InfFE not implemented.");
587 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
589 const Elem * inf_elem,
590 const unsigned int i,
591 const unsigned int j,
593 const bool add_p_level)
598 tmp_fet = fet.
order + add_p_level * inf_elem->
p_level();
609 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
611 const unsigned int outer_node_index,
612 unsigned int & base_node,
613 unsigned int & radial_node)
615 switch (inf_elem_type)
619 libmesh_assert_less (outer_node_index, 2);
621 radial_node = outer_node_index;
629 libmesh_assert_less (outer_node_index, 4);
630 base_node = outer_node_index % 2;
631 radial_node = outer_node_index / 2;
637 libmesh_assert_less (outer_node_index, 6);
638 base_node = outer_node_index % 3;
639 radial_node = outer_node_index / 3;
645 libmesh_assert_less (outer_node_index, 8);
646 base_node = outer_node_index % 4;
647 radial_node = outer_node_index / 4;
655 switch (outer_node_index)
661 base_node = outer_node_index;
669 base_node = outer_node_index-2;
688 libmesh_error_msg(
"Unrecognized outer_node_index = " << outer_node_index);
696 switch (outer_node_index)
704 base_node = outer_node_index;
714 base_node = outer_node_index-4;
724 base_node = outer_node_index-4;
734 base_node = outer_node_index-8;
740 libmesh_assert_equal_to (inf_elem_type,
INFHEX18);
748 libmesh_assert_equal_to (inf_elem_type,
INFHEX18);
755 libmesh_error_msg(
"Unrecognized outer_node_index = " << outer_node_index);
762 switch (outer_node_index)
769 base_node = outer_node_index;
778 base_node = outer_node_index-3;
787 base_node = outer_node_index-3;
796 base_node = outer_node_index-6;
801 libmesh_error_msg(
"Unrecognized outer_node_index = " << outer_node_index);
807 libmesh_error_msg(
"ERROR: Bad infinite element type=" <<
Utility::enum_to_string(inf_elem_type) <<
", node=" << outer_node_index);
816 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
818 const unsigned int outer_node_index,
819 unsigned int & base_node,
820 unsigned int & radial_node)
822 libmesh_assert_not_equal_to (inf_elem_type,
INVALID_ELEM);
824 static std::vector<unsigned int> _static_base_node_index;
825 static std::vector<unsigned int> _static_radial_node_index;
844 if (inf_elem_type==_compute_node_indices_fast_current_elem_type)
846 base_node = _static_base_node_index [outer_node_index];
847 radial_node = _static_radial_node_index[outer_node_index];
853 _compute_node_indices_fast_current_elem_type = inf_elem_type;
857 switch (inf_elem_type)
900 libmesh_error_msg(
"ERROR: Bad infinite element type=" <<
Utility::enum_to_string(inf_elem_type) <<
", node=" << outer_node_index);
904 _static_base_node_index.resize (
n_nodes);
905 _static_radial_node_index.resize(
n_nodes);
907 for (
unsigned int n=0; n<
n_nodes; n++)
908 compute_node_indices (inf_elem_type,
910 _static_base_node_index [outer_node_index],
911 _static_radial_node_index[outer_node_index]);
914 base_node = _static_base_node_index [outer_node_index];
915 radial_node = _static_radial_node_index[outer_node_index];
925 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
927 const Elem * inf_elem,
928 const unsigned int i,
929 unsigned int & base_shape,
930 unsigned int & radial_shape)
956 const unsigned int radial_order_p_one = radial_order+1;
974 switch (inf_elem_type)
979 n_base_side_nodes = 0;
980 n_base_face_nodes = 0;
989 n_base_side_nodes = 0;
990 n_base_face_nodes = 0;
999 n_base_side_nodes = 1;
1000 n_base_face_nodes = 0;
1002 n_base_face_dof = 0;
1008 n_base_vertices = 4;
1009 n_base_side_nodes = 0;
1010 n_base_face_nodes = 0;
1011 n_base_side_dof = 0;
1012 n_base_face_dof = 0;
1018 n_base_vertices = 4;
1019 n_base_side_nodes = 4;
1020 n_base_face_nodes = 0;
1022 n_base_face_dof = 0;
1028 n_base_vertices = 4;
1029 n_base_side_nodes = 4;
1030 n_base_face_nodes = 1;
1039 n_base_vertices = 3;
1040 n_base_side_nodes = 0;
1041 n_base_face_nodes = 0;
1042 n_base_side_dof = 0;
1043 n_base_face_dof = 0;
1049 n_base_vertices = 3;
1050 n_base_side_nodes = 3;
1051 n_base_face_nodes = 0;
1053 n_base_face_dof = 0;
1064 const unsigned int n_dof_at_base_vertices = n_base_vertices*n_base_vertex_dof;
1065 const unsigned int n_dof_at_all_vertices = n_dof_at_base_vertices*radial_order_p_one;
1067 const unsigned int n_dof_at_base_sides = n_base_side_nodes*n_base_side_dof;
1068 const unsigned int n_dof_at_all_sides = n_dof_at_base_sides*radial_order_p_one;
1070 const unsigned int n_dof_at_base_face = n_base_face_nodes*n_base_face_dof;
1071 const unsigned int n_dof_at_all_faces = n_dof_at_base_face*radial_order_p_one;
1075 if (i < n_dof_at_base_vertices)
1082 else if (i < n_dof_at_all_vertices)
1089 const unsigned int i_offset = i - n_dof_at_base_vertices;
1092 radial_shape = (i_offset % radial_order) + 1;
1093 base_shape = i_offset / radial_order;
1096 else if (i < n_dof_at_all_vertices+n_dof_at_base_sides)
1100 base_shape = i - radial_order * n_dof_at_base_vertices;
1103 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides)
1106 const unsigned int i_offset = i - (n_dof_at_all_vertices
1107 + n_dof_at_base_sides);
1108 radial_shape = (i_offset % radial_order) + 1;
1109 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices;
1112 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_base_face)
1116 base_shape = i - radial_order*(n_dof_at_base_vertices
1117 + n_dof_at_base_sides);
1120 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces)
1123 const unsigned int i_offset = i - (n_dof_at_all_vertices
1124 + n_dof_at_all_sides
1125 + n_dof_at_base_face);
1126 radial_shape = (i_offset % radial_order) + 1;
1127 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides;
1130 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces+n_base_elem_dof)
1134 base_shape = i - (n_dof_at_all_vertices
1135 + n_dof_at_all_sides
1136 + n_dof_at_all_faces);
1141 libmesh_assert_less (i, n_dofs(fet, inf_elem));
1143 const unsigned int i_offset = i - (n_dof_at_all_vertices
1144 + n_dof_at_all_sides
1145 + n_dof_at_all_faces
1147 radial_shape = (i_offset % radial_order) + 1;
1148 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides + n_dof_at_base_face;
1157 #ifdef LIBMESH_ENABLE_DEPRECATED 1158 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
1161 const unsigned int i,
1162 unsigned int & base_shape,
1163 unsigned int & radial_shape)
1167 libmesh_deprecated();
1170 const unsigned int radial_order_p_one = radial_order+1;
1187 switch (inf_elem_type)
1191 n_base_vertices = 1;
1192 n_base_side_nodes = 0;
1193 n_base_face_nodes = 0;
1194 n_base_side_dof = 0;
1195 n_base_face_dof = 0;
1201 n_base_vertices = 2;
1202 n_base_side_nodes = 0;
1203 n_base_face_nodes = 0;
1204 n_base_side_dof = 0;
1205 n_base_face_dof = 0;
1211 n_base_vertices = 2;
1212 n_base_side_nodes = 1;
1213 n_base_face_nodes = 0;
1215 n_base_face_dof = 0;
1221 n_base_vertices = 4;
1222 n_base_side_nodes = 0;
1223 n_base_face_nodes = 0;
1224 n_base_side_dof = 0;
1225 n_base_face_dof = 0;
1231 n_base_vertices = 4;
1232 n_base_side_nodes = 4;
1233 n_base_face_nodes = 0;
1235 n_base_face_dof = 0;
1241 n_base_vertices = 4;
1242 n_base_side_nodes = 4;
1243 n_base_face_nodes = 1;
1252 n_base_vertices = 3;
1253 n_base_side_nodes = 0;
1254 n_base_face_nodes = 0;
1255 n_base_side_dof = 0;
1256 n_base_face_dof = 0;
1262 n_base_vertices = 3;
1263 n_base_side_nodes = 3;
1264 n_base_face_nodes = 0;
1266 n_base_face_dof = 0;
1277 const unsigned int n_dof_at_base_vertices = n_base_vertices*n_base_vertex_dof;
1278 const unsigned int n_dof_at_all_vertices = n_dof_at_base_vertices*radial_order_p_one;
1280 const unsigned int n_dof_at_base_sides = n_base_side_nodes*n_base_side_dof;
1281 const unsigned int n_dof_at_all_sides = n_dof_at_base_sides*radial_order_p_one;
1283 const unsigned int n_dof_at_base_face = n_base_face_nodes*n_base_face_dof;
1284 const unsigned int n_dof_at_all_faces = n_dof_at_base_face*radial_order_p_one;
1288 if (i < n_dof_at_base_vertices)
1295 else if (i < n_dof_at_all_vertices)
1302 const unsigned int i_offset = i - n_dof_at_base_vertices;
1305 radial_shape = (i_offset % radial_order) + 1;
1306 base_shape = i_offset / radial_order;
1309 else if (i < n_dof_at_all_vertices+n_dof_at_base_sides)
1313 base_shape = i - radial_order * n_dof_at_base_vertices;
1316 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides)
1319 const unsigned int i_offset = i - (n_dof_at_all_vertices
1320 + n_dof_at_base_sides);
1321 radial_shape = (i_offset % radial_order) + 1;
1322 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices;
1325 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_base_face)
1329 base_shape = i - radial_order*(n_dof_at_base_vertices
1330 + n_dof_at_base_sides);
1333 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces)
1336 const unsigned int i_offset = i - (n_dof_at_all_vertices
1337 + n_dof_at_all_sides
1338 + n_dof_at_base_face);
1339 radial_shape = (i_offset % radial_order) + 1;
1340 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides;
1343 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces+n_base_elem_dof)
1347 base_shape = i - (n_dof_at_all_vertices
1348 + n_dof_at_all_sides
1349 + n_dof_at_all_faces);
1355 const unsigned int i_offset = i - (n_dof_at_all_vertices
1356 + n_dof_at_all_sides
1357 + n_dof_at_all_faces
1359 radial_shape = (i_offset % radial_order) + 1;
1360 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides + n_dof_at_base_face;
1366 #endif // LIBMESH_ENABLE_DEPRECATED 1369 #ifdef LIBMESH_ENABLE_AMR 1370 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS 1372 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
1408 libmesh_not_implemented();
1413 #endif //LIBMESH_ENABLE_NODE_CONSTRAINTS 1416 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
1419 const unsigned int variable_number,
1420 const Elem * child_elem)
1434 bool need_constraints=
false;
1436 if (child_neighbor->level() < child_elem->
level())
1438 need_constraints =
true;
1441 if (!need_constraints)
1475 std::vector<dof_id_type> child_base_dof_indices, parent_base_dof_indices;
1476 std::vector<dof_id_type> child_elem_dof_indices, parent_elem_dof_indices;
1478 const Elem * parent_elem = child_elem->
parent();
1485 dof_map.
dof_indices (child_elem, child_elem_dof_indices,
1487 dof_map.
dof_indices (parent_elem, parent_elem_dof_indices,
1490 const unsigned int n_total_dofs = child_elem_dof_indices.size();
1493 std::vector<unsigned int> radial_shape_index(n_total_dofs);
1494 std::vector<unsigned int> base_shape_index(n_total_dofs);
1497 unsigned int max_base_id=0;
1498 unsigned int max_radial_id=0;
1500 for (
unsigned int n=0; n<n_total_dofs; ++n)
1502 compute_shape_indices (fe_type,
1505 base_shape_index[n],
1506 radial_shape_index[n]);
1509 if (base_shape_index[n] > max_base_id)
1510 max_base_id = base_shape_index[n];
1511 if (radial_shape_index[n] > max_radial_id)
1512 max_radial_id = radial_shape_index[n];
1517 libmesh_assert_equal_to( (max_base_id+1)*(max_radial_id+1), n_total_dofs );
1528 std::unique_ptr<const Elem> child_base, parent_base;
1532 const unsigned int n_base_dofs =
1536 dof_map.
dof_indices (child_base.get(), child_base_dof_indices,
1538 dof_map.
dof_indices (parent_base.get(), parent_base_dof_indices,
1544 for (
unsigned int child_base_dof=0; child_base_dof != n_base_dofs; ++child_base_dof)
1546 libmesh_assert_less (child_base_dof, child_base->n_nodes());
1549 const dof_id_type child_base_dof_g = child_base_dof_indices[child_base_dof];
1553 bool self_constraint =
false;
1554 for (
unsigned int parent_base_dof=0;
1555 parent_base_dof != n_base_dofs; parent_base_dof++)
1557 libmesh_assert_less (parent_base_dof, parent_base->n_nodes());
1561 parent_base_dof_indices[parent_base_dof];
1563 if (parent_base_dof_g == child_base_dof_g)
1565 self_constraint =
true;
1570 if (self_constraint)
1577 libmesh_assert_equal_to(n_elem_dofs, n_total_dofs);
1578 for(
unsigned int child_elem_dof=0; child_elem_dof != n_elem_dofs; ++child_elem_dof)
1580 if (base_shape_index[child_elem_dof] != child_base_dof)
1589 if (radial_shape_index[child_elem_dof] > 0)
1601 const dof_id_type child_elem_dof_g = child_elem_dof_indices[child_elem_dof];
1614 constraint_row = &(constraints[child_elem_dof_g]);
1619 const Point & support_point = child_base->point(child_base_dof);
1627 for (
unsigned int parent_base_dof=0;
1628 parent_base_dof != n_base_dofs; parent_base_dof++)
1646 for (
unsigned int parent_elem_dof=0;
1647 parent_elem_dof != n_elem_dofs; parent_elem_dof++)
1649 if (base_shape_index[parent_elem_dof] != parent_base_dof)
1654 if (radial_shape_index[parent_elem_dof] != radial_shape_index[child_elem_dof])
1659 parent_elem_dof_indices[parent_elem_dof];
1663 if ((std::abs(parent_base_dof_value) > 1.e-5) &&
1664 (std::abs(parent_base_dof_value) < .999))
1666 constraint_row->emplace(parent_elem_dof_g, parent_base_dof_value);
1671 else if (parent_base_dof_value >= .999)
1673 libmesh_assert_equal_to (child_base_dof_g, parent_base_dof_indices[parent_base_dof]);
1674 libmesh_assert_equal_to (child_elem_dof_g, parent_elem_dof_g);
1686 #endif // LIBMESH_ENABLE_AMR 1695 #ifdef LIBMESH_ENABLE_DEPRECATED 1714 #endif // LIBMESH_ENABLE_DEPRECATED 1746 #ifdef LIBMESH_ENABLE_AMR 1750 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS 1759 #endif //ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS static void compute_node_indices_fast(const ElemType inf_elem_type, const unsigned int outer_node_index, unsigned int &base_node, unsigned int &radial_node)
Does the same as compute_node_indices(), but stores the maps for the current element type...
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
FEFamily family
The type of finite element.
bool need_derivative()
Check whether derivatives should be computed or not.
static Real shape_deriv(const FEType &fet, const Elem *inf_elem, const unsigned int i, const unsigned int j, const Point &p)
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
static unsigned int n_dofs_per_elem(const FEType &fet, const ElemType inf_elem_type)
const Elem * parent() const
static bool _warned_for_shape
Order
defines an enum for polynomial orders.
A specific instantiation of the FEBase class.
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
static unsigned int n_dofs(const Order o_radial)
static unsigned int n_dofs_per_elem(const Order o_radial)
virtual Point origin() const
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
static unsigned int n_dofs_at_node(const FEType &fet, const ElemType inf_elem_type, const unsigned int n)
static Real shape_deriv(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const unsigned int j, const Point &p)
IntRange< unsigned short > side_index_range() const
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
static Real decay_deriv(const unsigned int dim, const Real)
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
class FEComputeData hides arbitrary data to be passed to and from children of FEBase through the FEIn...
const Point & p
Holds the point where the data are to be computed.
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Real phase
Storage for the computed phase lag.
INSTANTIATE_INF_FE_MBRF(1, CARTESIAN, void, reinit(const Elem *, const unsigned int, const Real, const std::vector< Point > *const, const std::vector< Real > *const))
This is the base class from which all geometric element types are derived.
std::vector< Gradient > dshape
Storage for the computed shape derivative values.
The Node constraint storage format.
static Real shape(const FEType &fet, const ElemType t, const unsigned int i, const Point &p)
unsigned int p_level() const
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
std::vector< std::vector< Real > > local_transform
Storage for local to global mapping at p.
The libMesh namespace provides an interface to certain functionality in the library.
static void compute_node_indices(const ElemType inf_elem_type, const unsigned int outer_node_index, unsigned int &base_node, unsigned int &radial_node)
Computes the indices in the base base_node and in radial direction radial_node (either 0 or 1) associ...
static std::unique_ptr< const Elem > build_elem(const Elem *inf_elem)
Build the base element of an infinite element.
Real speed
The wave speed.
static unsigned int n_dofs_at_node(const Order o_radial, const unsigned int n_onion)
const Number imaginary
The imaginary unit, .
static bool _warned_for_dshape
This class handles the numbering of degrees of freedom on a mesh.
static void inf_compute_constraints(DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *child_elem)
Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to var...
const dof_id_type n_nodes
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const
static Order mapping_order()
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
bool is_constrained_dof(const dof_id_type dof) const
const FEType & variable_type(const unsigned int i) const
static Real decay(const unsigned int dim, const Real v)
static Real eval(Real v, Order o_radial, unsigned int i)
Number frequency
The frequency to evaluate shape functions including the wave number depending terms.
std::vector< Number > shape
Storage for the computed shape function values.
int get_order() const
Explicitly request the order as an int.
std::string enum_to_string(const T e)
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
const Elem * neighbor_ptr(unsigned int i) const
unsigned int level() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
std::map< dof_id_type, Real, std::less< dof_id_type >, Threads::scalable_allocator< std::pair< const dof_id_type, Real > > > DofConstraintRow
A row of the Dof constraint matrix.
static void inf_compute_node_constraints(NodeConstraints &constraints, const Elem *elem)
static bool _warned_for_nodal_soln
static members that are used to issue warning messages only once.
static std::unique_ptr< FEGenericBase > build_InfFE(const unsigned int dim, const FEType &type)
Builds a specific infinite element type.
static void compute_data(const FEType &fe_t, const Elem *inf_elem, FEComputeData &data)
Generalized version of shape(), takes an Elem *.
SimpleRange< NeighborPtrIter > neighbor_ptr_range()
Returns a range with all neighbors of an element, usable in range-based for loops.
static void nodal_soln(const FEType &fet, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Usually, this method would build the nodal soln from the element soln.
static ElemType _compute_node_indices_fast_current_elem_type
When compute_node_indices_fast() is used, this static variable remembers the element type for which t...
virtual ElemType type() const =0
A Point defines a location in LIBMESH_DIM dimensional Real space.
const Point & point(const unsigned int i) const
The constraint matrix storage format.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
static unsigned int n_dofs(const FEType &fet, const Elem *inf_elem)
const RemoteElem * remote_elem