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 #ifdef LIBMESH_ENABLE_DEPRECATED 66 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
80 #endif // LIBMESH_ENABLE_DEPRECATED 84 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
86 const Elem * inf_elem)
101 #ifdef LIBMESH_ENABLE_DEPRECATED 102 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
105 const unsigned int n)
107 libmesh_deprecated();
111 unsigned int n_base, n_radial;
112 compute_node_indices(inf_elem_type, n, n_base, n_radial);
127 #endif // LIBMESH_ENABLE_DEPRECATED 131 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
133 const Elem * inf_elem,
134 const unsigned int n)
140 unsigned int n_base, n_radial;
141 compute_node_indices(inf_elem->
type(), n, n_base, n_radial);
152 #ifdef LIBMESH_ENABLE_DEPRECATED 153 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
157 libmesh_deprecated();
167 #endif // LIBMESH_ENABLE_DEPRECATED 171 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
173 const Elem * inf_elem)
188 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
191 const std::vector<Number> & ,
192 std::vector<Number> & nodal_soln)
195 if (!_warned_for_nodal_soln)
197 libMesh::err <<
"WARNING: nodal_soln(...) does _not_ work for infinite elements." << std::endl
198 <<
" Will return an empty nodal solution. Use " << std::endl
199 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" << std::endl;
200 _warned_for_nodal_soln =
true;
223 #ifdef LIBMESH_ENABLE_DEPRECATED 224 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
227 const unsigned int i,
230 libmesh_deprecated();
232 libmesh_assert_not_equal_to (Dim, 0);
238 libMesh::err <<
"WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
239 <<
" return the correct trial function! Use " << std::endl
240 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" 242 _warned_for_shape =
true;
248 const Real v (p(Dim-1));
250 unsigned int i_base, i_radial;
251 compute_shape_indices(fet, inf_elem_type, i, i_base, i_radial);
264 #endif // LIBMESH_ENABLE_DEPRECATED 268 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
270 const Elem * inf_elem,
271 const unsigned int i,
275 libmesh_assert_not_equal_to (Dim, 0);
281 libMesh::err <<
"WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
282 <<
" return the correct trial function! Use " << std::endl
283 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" 285 _warned_for_shape =
true;
290 const Real v (p(Dim-1));
291 std::unique_ptr<const Elem> base_el (inf_elem->
build_side_ptr(0));
293 unsigned int i_base, i_radial;
294 compute_shape_indices(fet, inf_elem, i, i_base, i_radial);
307 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
309 const Elem * inf_elem,
310 const unsigned int i,
312 const bool add_p_level)
317 tmp_fet = fet.
order + add_p_level * inf_elem->
p_level();
324 #ifdef LIBMESH_ENABLE_DEPRECATED 325 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
328 const unsigned int i,
329 const unsigned int j,
332 libmesh_deprecated();
334 libmesh_assert_not_equal_to (Dim, 0);
335 libmesh_assert_greater (Dim,j);
340 libMesh::err <<
"WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
341 <<
" return the correct trial function gradients! Use " << std::endl
342 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" 344 _warned_for_dshape =
true;
350 const Real v (p(Dim-1));
352 unsigned int i_base, i_radial;
353 compute_shape_indices(fe_t, inf_elem_type, i, i_base, i_radial);
369 #endif // LIBMESH_ENABLE_DEPRECATED 372 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
374 const Elem * inf_elem,
375 const unsigned int i,
376 const unsigned int j,
379 libmesh_assert_not_equal_to (Dim, 0);
380 libmesh_assert_greater (Dim,j);
385 libMesh::err <<
"WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
386 <<
" return the correct trial function gradients! Use " << std::endl
387 <<
" InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" 389 _warned_for_dshape =
true;
393 const Real v (p(Dim-1));
395 std::unique_ptr<const Elem> base_el (inf_elem->
build_side_ptr(0));
397 unsigned int i_base, i_radial;
399 if ((-1. > v ) || (v > 1.))
405 compute_shape_indices(fe_t, inf_elem, i, i_base, i_radial);
425 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
427 const Elem * inf_elem,
431 libmesh_assert_not_equal_to (Dim, 0);
436 const Real v (p(Dim-1));
437 std::unique_ptr<const Elem> base_el (inf_elem->
build_side_ptr(0));
445 Real interpolated_dist = 0.;
457 const unsigned int n_base_nodes = base_el->n_nodes();
460 const Order base_mapping_order (base_el->default_order());
461 const ElemType base_mapping_elem_type (base_el->type());
464 for (
unsigned int n=0; n<n_base_nodes; n++)
465 interpolated_dist +=
Point(base_el->point(n) - origin).
norm()
472 const unsigned int n_base_nodes = base_el->n_nodes();
475 const Order base_mapping_order (base_el->default_order());
476 const ElemType base_mapping_elem_type (base_el->type());
479 for (
unsigned int n=0; n<n_base_nodes; n++)
480 interpolated_dist +=
Point(base_el->point(n) - origin).
norm()
486 libmesh_error_msg(
"Unknown Dim = " << Dim);
494 data.
phase = interpolated_dist
499 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 510 const Number time_harmonic = exp(exponent);
512 const Number time_harmonic = 1;
513 #endif //LIBMESH_USE_COMPLEX_NUMBERS 520 const unsigned int n_dof = n_dofs (fet, inf_elem);
521 data.
shape.resize(n_dof);
524 data.
dshape.resize(n_dof);
527 for (
unsigned int d=0; d<Dim; d++)
534 std::vector<Point> pt = {p};
536 fe->reinit(inf_elem, &pt);
553 for (
unsigned int i=0; i<n_dof; i++)
556 unsigned int i_base, i_radial;
557 compute_shape_indices(fet, inf_elem, i, i_base, i_radial);
584 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 594 libmesh_not_implemented();
602 libmesh_error_msg(
"compute_data() for 1-dimensional InfFE not implemented.");
606 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
608 const Elem * inf_elem,
609 const unsigned int i,
610 const unsigned int j,
612 const bool add_p_level)
617 tmp_fet = fet.
order + add_p_level * inf_elem->
p_level();
628 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
630 const unsigned int outer_node_index,
631 unsigned int & base_node,
632 unsigned int & radial_node)
634 switch (inf_elem_type)
638 libmesh_assert_less (outer_node_index, 2);
640 radial_node = outer_node_index;
648 libmesh_assert_less (outer_node_index, 4);
649 base_node = outer_node_index % 2;
650 radial_node = outer_node_index / 2;
656 libmesh_assert_less (outer_node_index, 6);
657 base_node = outer_node_index % 3;
658 radial_node = outer_node_index / 3;
664 libmesh_assert_less (outer_node_index, 8);
665 base_node = outer_node_index % 4;
666 radial_node = outer_node_index / 4;
674 switch (outer_node_index)
680 base_node = outer_node_index;
688 base_node = outer_node_index-2;
707 libmesh_error_msg(
"Unrecognized outer_node_index = " << outer_node_index);
715 switch (outer_node_index)
723 base_node = outer_node_index;
733 base_node = outer_node_index-4;
743 base_node = outer_node_index-4;
753 base_node = outer_node_index-8;
759 libmesh_assert_equal_to (inf_elem_type,
INFHEX18);
767 libmesh_assert_equal_to (inf_elem_type,
INFHEX18);
774 libmesh_error_msg(
"Unrecognized outer_node_index = " << outer_node_index);
781 switch (outer_node_index)
788 base_node = outer_node_index;
797 base_node = outer_node_index-3;
806 base_node = outer_node_index-3;
815 base_node = outer_node_index-6;
820 libmesh_error_msg(
"Unrecognized outer_node_index = " << outer_node_index);
826 libmesh_error_msg(
"ERROR: Bad infinite element type=" <<
Utility::enum_to_string(inf_elem_type) <<
", node=" << outer_node_index);
835 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
837 const unsigned int outer_node_index,
838 unsigned int & base_node,
839 unsigned int & radial_node)
841 libmesh_assert_not_equal_to (inf_elem_type,
INVALID_ELEM);
843 static std::vector<unsigned int> _static_base_node_index;
844 static std::vector<unsigned int> _static_radial_node_index;
863 if (inf_elem_type==_compute_node_indices_fast_current_elem_type)
865 base_node = _static_base_node_index [outer_node_index];
866 radial_node = _static_radial_node_index[outer_node_index];
872 _compute_node_indices_fast_current_elem_type = inf_elem_type;
876 switch (inf_elem_type)
919 libmesh_error_msg(
"ERROR: Bad infinite element type=" <<
Utility::enum_to_string(inf_elem_type) <<
", node=" << outer_node_index);
923 _static_base_node_index.resize (
n_nodes);
924 _static_radial_node_index.resize(
n_nodes);
926 for (
unsigned int n=0; n<
n_nodes; n++)
927 compute_node_indices (inf_elem_type,
929 _static_base_node_index [outer_node_index],
930 _static_radial_node_index[outer_node_index]);
933 base_node = _static_base_node_index [outer_node_index];
934 radial_node = _static_radial_node_index[outer_node_index];
944 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
946 const Elem * inf_elem,
947 const unsigned int i,
948 unsigned int & base_shape,
949 unsigned int & radial_shape)
975 const unsigned int radial_order_p_one = radial_order+1;
993 switch (inf_elem_type)
998 n_base_side_nodes = 0;
999 n_base_face_nodes = 0;
1000 n_base_side_dof = 0;
1001 n_base_face_dof = 0;
1007 n_base_vertices = 2;
1008 n_base_side_nodes = 0;
1009 n_base_face_nodes = 0;
1010 n_base_side_dof = 0;
1011 n_base_face_dof = 0;
1017 n_base_vertices = 2;
1018 n_base_side_nodes = 1;
1019 n_base_face_nodes = 0;
1021 n_base_face_dof = 0;
1027 n_base_vertices = 4;
1028 n_base_side_nodes = 0;
1029 n_base_face_nodes = 0;
1030 n_base_side_dof = 0;
1031 n_base_face_dof = 0;
1037 n_base_vertices = 4;
1038 n_base_side_nodes = 4;
1039 n_base_face_nodes = 0;
1041 n_base_face_dof = 0;
1047 n_base_vertices = 4;
1048 n_base_side_nodes = 4;
1049 n_base_face_nodes = 1;
1058 n_base_vertices = 3;
1059 n_base_side_nodes = 0;
1060 n_base_face_nodes = 0;
1061 n_base_side_dof = 0;
1062 n_base_face_dof = 0;
1068 n_base_vertices = 3;
1069 n_base_side_nodes = 3;
1070 n_base_face_nodes = 0;
1072 n_base_face_dof = 0;
1083 const unsigned int n_dof_at_base_vertices = n_base_vertices*n_base_vertex_dof;
1084 const unsigned int n_dof_at_all_vertices = n_dof_at_base_vertices*radial_order_p_one;
1086 const unsigned int n_dof_at_base_sides = n_base_side_nodes*n_base_side_dof;
1087 const unsigned int n_dof_at_all_sides = n_dof_at_base_sides*radial_order_p_one;
1089 const unsigned int n_dof_at_base_face = n_base_face_nodes*n_base_face_dof;
1090 const unsigned int n_dof_at_all_faces = n_dof_at_base_face*radial_order_p_one;
1094 if (i < n_dof_at_base_vertices)
1101 else if (i < n_dof_at_all_vertices)
1108 const unsigned int i_offset = i - n_dof_at_base_vertices;
1111 radial_shape = (i_offset % radial_order) + 1;
1112 base_shape = i_offset / radial_order;
1115 else if (i < n_dof_at_all_vertices+n_dof_at_base_sides)
1119 base_shape = i - radial_order * n_dof_at_base_vertices;
1122 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides)
1125 const unsigned int i_offset = i - (n_dof_at_all_vertices
1126 + n_dof_at_base_sides);
1127 radial_shape = (i_offset % radial_order) + 1;
1128 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices;
1131 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_base_face)
1135 base_shape = i - radial_order*(n_dof_at_base_vertices
1136 + n_dof_at_base_sides);
1139 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces)
1142 const unsigned int i_offset = i - (n_dof_at_all_vertices
1143 + n_dof_at_all_sides
1144 + n_dof_at_base_face);
1145 radial_shape = (i_offset % radial_order) + 1;
1146 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides;
1149 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces+n_base_elem_dof)
1153 base_shape = i - (n_dof_at_all_vertices
1154 + n_dof_at_all_sides
1155 + n_dof_at_all_faces);
1160 libmesh_assert_less (i, n_dofs(fet, inf_elem));
1162 const unsigned int i_offset = i - (n_dof_at_all_vertices
1163 + n_dof_at_all_sides
1164 + n_dof_at_all_faces
1166 radial_shape = (i_offset % radial_order) + 1;
1167 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides + n_dof_at_base_face;
1176 #ifdef LIBMESH_ENABLE_DEPRECATED 1177 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
1180 const unsigned int i,
1181 unsigned int & base_shape,
1182 unsigned int & radial_shape)
1186 libmesh_deprecated();
1189 const unsigned int radial_order_p_one = radial_order+1;
1206 switch (inf_elem_type)
1210 n_base_vertices = 1;
1211 n_base_side_nodes = 0;
1212 n_base_face_nodes = 0;
1213 n_base_side_dof = 0;
1214 n_base_face_dof = 0;
1220 n_base_vertices = 2;
1221 n_base_side_nodes = 0;
1222 n_base_face_nodes = 0;
1223 n_base_side_dof = 0;
1224 n_base_face_dof = 0;
1230 n_base_vertices = 2;
1231 n_base_side_nodes = 1;
1232 n_base_face_nodes = 0;
1234 n_base_face_dof = 0;
1240 n_base_vertices = 4;
1241 n_base_side_nodes = 0;
1242 n_base_face_nodes = 0;
1243 n_base_side_dof = 0;
1244 n_base_face_dof = 0;
1250 n_base_vertices = 4;
1251 n_base_side_nodes = 4;
1252 n_base_face_nodes = 0;
1254 n_base_face_dof = 0;
1260 n_base_vertices = 4;
1261 n_base_side_nodes = 4;
1262 n_base_face_nodes = 1;
1271 n_base_vertices = 3;
1272 n_base_side_nodes = 0;
1273 n_base_face_nodes = 0;
1274 n_base_side_dof = 0;
1275 n_base_face_dof = 0;
1281 n_base_vertices = 3;
1282 n_base_side_nodes = 3;
1283 n_base_face_nodes = 0;
1285 n_base_face_dof = 0;
1296 const unsigned int n_dof_at_base_vertices = n_base_vertices*n_base_vertex_dof;
1297 const unsigned int n_dof_at_all_vertices = n_dof_at_base_vertices*radial_order_p_one;
1299 const unsigned int n_dof_at_base_sides = n_base_side_nodes*n_base_side_dof;
1300 const unsigned int n_dof_at_all_sides = n_dof_at_base_sides*radial_order_p_one;
1302 const unsigned int n_dof_at_base_face = n_base_face_nodes*n_base_face_dof;
1303 const unsigned int n_dof_at_all_faces = n_dof_at_base_face*radial_order_p_one;
1307 if (i < n_dof_at_base_vertices)
1314 else if (i < n_dof_at_all_vertices)
1321 const unsigned int i_offset = i - n_dof_at_base_vertices;
1324 radial_shape = (i_offset % radial_order) + 1;
1325 base_shape = i_offset / radial_order;
1328 else if (i < n_dof_at_all_vertices+n_dof_at_base_sides)
1332 base_shape = i - radial_order * n_dof_at_base_vertices;
1335 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides)
1338 const unsigned int i_offset = i - (n_dof_at_all_vertices
1339 + n_dof_at_base_sides);
1340 radial_shape = (i_offset % radial_order) + 1;
1341 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices;
1344 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_base_face)
1348 base_shape = i - radial_order*(n_dof_at_base_vertices
1349 + n_dof_at_base_sides);
1352 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+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_base_face);
1358 radial_shape = (i_offset % radial_order) + 1;
1359 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides;
1362 else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces+n_base_elem_dof)
1366 base_shape = i - (n_dof_at_all_vertices
1367 + n_dof_at_all_sides
1368 + n_dof_at_all_faces);
1373 libmesh_assert_less (i, n_dofs(fet, inf_elem_type));
1375 const unsigned int i_offset = i - (n_dof_at_all_vertices
1376 + n_dof_at_all_sides
1377 + n_dof_at_all_faces
1379 radial_shape = (i_offset % radial_order) + 1;
1380 base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides + n_dof_at_base_face;
1386 #endif // LIBMESH_ENABLE_DEPRECATED 1389 #ifdef LIBMESH_ENABLE_AMR 1390 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS 1392 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
1428 libmesh_not_implemented();
1433 #endif //LIBMESH_ENABLE_NODE_CONSTRAINTS 1436 template <
unsigned int Dim, FEFamily T_radial, InfMapType T_map>
1439 const unsigned int variable_number,
1440 const Elem * child_elem)
1454 bool need_constraints=
false;
1456 if (child_neighbor->level() < child_elem->
level())
1458 need_constraints =
true;
1461 if (!need_constraints)
1495 std::vector<dof_id_type> child_base_dof_indices, parent_base_dof_indices;
1496 std::vector<dof_id_type> child_elem_dof_indices, parent_elem_dof_indices;
1498 const Elem * parent_elem = child_elem->
parent();
1505 dof_map.
dof_indices (child_elem, child_elem_dof_indices,
1507 dof_map.
dof_indices (parent_elem, parent_elem_dof_indices,
1510 const unsigned int n_total_dofs = child_elem_dof_indices.size();
1513 std::vector<unsigned int> radial_shape_index(n_total_dofs);
1514 std::vector<unsigned int> base_shape_index(n_total_dofs);
1517 unsigned int max_base_id=0;
1518 unsigned int max_radial_id=0;
1520 for (
unsigned int n=0; n<n_total_dofs; ++n)
1522 compute_shape_indices (fe_type,
1525 base_shape_index[n],
1526 radial_shape_index[n]);
1529 if (base_shape_index[n] > max_base_id)
1530 max_base_id = base_shape_index[n];
1531 if (radial_shape_index[n] > max_radial_id)
1532 max_radial_id = radial_shape_index[n];
1537 libmesh_assert_equal_to( (max_base_id+1)*(max_radial_id+1), n_total_dofs );
1548 std::unique_ptr<const Elem> child_base, parent_base;
1552 const unsigned int n_base_dofs =
1556 dof_map.
dof_indices (child_base.get(), child_base_dof_indices,
1558 dof_map.
dof_indices (parent_base.get(), parent_base_dof_indices,
1564 for (
unsigned int child_base_dof=0; child_base_dof != n_base_dofs; ++child_base_dof)
1566 libmesh_assert_less (child_base_dof, child_base->n_nodes());
1569 const dof_id_type child_base_dof_g = child_base_dof_indices[child_base_dof];
1573 bool self_constraint =
false;
1574 for (
unsigned int parent_base_dof=0;
1575 parent_base_dof != n_base_dofs; parent_base_dof++)
1577 libmesh_assert_less (parent_base_dof, parent_base->n_nodes());
1581 parent_base_dof_indices[parent_base_dof];
1583 if (parent_base_dof_g == child_base_dof_g)
1585 self_constraint =
true;
1590 if (self_constraint)
1597 libmesh_assert_equal_to(n_elem_dofs, n_total_dofs);
1598 for(
unsigned int child_elem_dof=0; child_elem_dof != n_elem_dofs; ++child_elem_dof)
1600 if (base_shape_index[child_elem_dof] != child_base_dof)
1609 if (radial_shape_index[child_elem_dof] > 0)
1621 const dof_id_type child_elem_dof_g = child_elem_dof_indices[child_elem_dof];
1634 constraint_row = &(constraints[child_elem_dof_g]);
1639 const Point & support_point = child_base->point(child_base_dof);
1647 for (
unsigned int parent_base_dof=0;
1648 parent_base_dof != n_base_dofs; parent_base_dof++)
1666 for (
unsigned int parent_elem_dof=0;
1667 parent_elem_dof != n_elem_dofs; parent_elem_dof++)
1669 if (base_shape_index[parent_elem_dof] != parent_base_dof)
1674 if (radial_shape_index[parent_elem_dof] != radial_shape_index[child_elem_dof])
1679 parent_elem_dof_indices[parent_elem_dof];
1683 if ((std::abs(parent_base_dof_value) > 1.e-5) &&
1684 (std::abs(parent_base_dof_value) < .999))
1686 constraint_row->emplace(parent_elem_dof_g, parent_base_dof_value);
1691 else if (parent_base_dof_value >= .999)
1693 libmesh_assert_equal_to (child_base_dof_g, parent_base_dof_indices[parent_base_dof]);
1694 libmesh_assert_equal_to (child_elem_dof_g, parent_elem_dof_g);
1706 #endif // LIBMESH_ENABLE_AMR 1715 #ifdef LIBMESH_ENABLE_DEPRECATED 1737 #endif // LIBMESH_ENABLE_DEPRECATED 1769 #ifdef LIBMESH_ENABLE_AMR 1773 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS 1782 #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.
const FEType & variable_type(const unsigned int c) const
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.
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 unsigned int n_dofs(const FEType &fet, const ElemType inf_elem_type)
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
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.
const RemoteElem * remote_elem