21#include "libmesh/libmesh_config.h"
22#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
24#include "libmesh/elem.h"
25#include "libmesh/enum_to_string.h"
26#include "libmesh/fe.h"
27#include "libmesh/fe_interface.h"
28#include "libmesh/fe_macro.h"
39void szabab_nodal_soln(
const Elem * elem,
41 const std::vector<Number> & elem_soln,
42 std::vector<Number> & nodal_soln,
43 const bool add_p_level)
45 const unsigned int n_nodes = elem->n_nodes();
47 const ElemType elem_type = elem->type();
51 const Order totalorder = order + add_p_level*elem->p_level();
54 FEType fe_type(order,
SZABAB);
61 libmesh_assert_equal_to (elem_soln.size(), 1);
63 std::fill(nodal_soln.begin(), nodal_soln.end(), elem_soln[0]);
79 const unsigned int n_sf =
82 std::vector<Point> refspace_nodes;
84 libmesh_assert_equal_to (refspace_nodes.size(),
n_nodes);
85 libmesh_assert_equal_to (elem_soln.size(), n_sf);
88 std::fill(nodal_soln.begin(), nodal_soln.end(), 0);
90 for (
unsigned int n=0; n<
n_nodes; n++)
92 for (
unsigned int i=0; i<n_sf; i++)
93 nodal_soln[n] += elem_soln[i] *
100 libmesh_error_msg(
"ERROR: Invalid total order " << totalorder);
140 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
172 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
203 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
234 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
265 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
296 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
326 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
338unsigned int szabab_n_dofs(
const Elem * e,
const Order o)
341 return szabab_n_dofs(e->type(), o);
346unsigned int szabab_n_dofs_at_node(
const ElemType t,
348 const unsigned int n)
374 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
402 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI3/6/7!");
434 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD4/8/9!");
442 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
470 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
496 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI6/7!");
526 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD8/9!");
534 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
562 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
571 libmesh_fallthrough();
587 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI6/7!");
617 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD8/9!");
625 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
653 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
662 libmesh_fallthrough();
678 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI6!");
708 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD8/9!");
716 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
744 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
753 libmesh_fallthrough();
769 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI6!");
799 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD8/9!");
807 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
835 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
844 libmesh_fallthrough();
860 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI6!");
890 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD8/9!");
898 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
925 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
934 libmesh_fallthrough();
950 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI6!");
980 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD8/9!");
988 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
1000unsigned int szabab_n_dofs_at_node(
const Elem & e,
1002 const unsigned int n)
1004 return szabab_n_dofs_at_node(e.type(), o, n);
1009unsigned int szabab_n_dofs_per_elem(
const ElemType t,
const Order o)
1047 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
1090 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
1135 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
1180 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
1225 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
1269 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
1313 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for SZABAB FE family!");
1326unsigned int szabab_n_dofs_per_elem(
const Elem & e,
const Order o)
1328 return szabab_n_dofs_per_elem(e.type(), o);
1384#ifdef LIBMESH_ENABLE_AMR
1389 const unsigned int variable_number,
1391{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
1396 const unsigned int variable_number,
1398{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
The constraint matrix storage format.
This class handles the numbering of degrees of freedom on a mesh.
This is the base class from which all geometric element types are derived.
static void get_refspace_nodes(const ElemType t, std::vector< Point > &nodes)
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
virtual bool is_hierarchic() const override
static unsigned int n_dofs_per_elem(const ElemType t, const Order o)
virtual FEContinuity get_continuity() const override
static void compute_constraints(DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem)
Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to var...
static unsigned int n_dofs(const ElemType t, const Order o)
static unsigned int n_dofs_at_node(const ElemType t, const Order o, const unsigned int n)
virtual bool shapes_need_reinit() const override
std::string enum_to_string(const T e)
The libMesh namespace provides an interface to certain functionality in the library.
LIBMESH_FE_NODAL_SOLN(BERNSTEIN, bernstein_nodal_soln)
ElemType
Defines an enum for geometric element types.
LIBMESH_FE_SIDE_NODAL_SOLN(HIERARCHIC_VEC)
const dof_id_type n_nodes