libMesh
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
libMesh::FEInterface Class Reference

This class provides an encapsulated access to all static public member functions of finite element classes. More...

#include <fe_interface.h>

Public Types

typedef unsigned int(* n_dofs_at_node_ptr) (const ElemType, const Order, const unsigned int)
 
typedef Real(* shape_ptr) (const FEType fe_t, const Elem *elem, const unsigned int i, const Point &p, const bool add_p_level)
 Typedef for pointer to a function that returns FE shape function values.
 
typedef Real(* shape_deriv_ptr) (const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
 Typedef for pointer to a function that returns FE shape function derivative values.
 
typedef Real(* shape_second_deriv_ptr) (const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
 Typedef for pointer to a function that returns FE shape function second derivative values.
 

Public Member Functions

virtual ~FEInterface ()=default
 Destructor.
 

Static Public Member Functions

static unsigned int n_shape_functions (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int n_shape_functions (const FEType &fe_t, const Elem *elem, const bool add_p_level=true)
 
static unsigned int n_shape_functions (const FEType &fe_t, const int extra_order, const Elem *elem)
 Same as above, but ignores the elem->p_level() and uses the specified extra_order instead.
 
static unsigned int n_dofs (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int n_dofs (const unsigned int dim, const FEType &fe_t, const Elem *elem)
 Similar to the function above but takes an Elem * and accounts for p-refinement internally, if any.
 
static unsigned int n_dofs (const FEType &fe_t, const Elem *elem, const bool add_p_level=true)
 
static unsigned int n_dofs (const FEType &fe_t, int extra_order, const Elem *elem)
 
static unsigned int n_dofs_at_node (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
 
static n_dofs_at_node_ptr n_dofs_at_node_function (const unsigned int dim, const FEType &fe_t)
 
static n_dofs_at_node_ptr n_dofs_at_node_function (const FEType &fe_t, const Elem *elem)
 
static unsigned int n_dofs_at_node (const FEType &fe_t, const Elem *elem, const unsigned int n, const bool add_p_level=true)
 
static unsigned int n_dofs_at_node (const FEType &fe_t, const int extra_order, const Elem *elem, const unsigned int n)
 
static unsigned int n_dofs_per_elem (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int n_dofs_per_elem (const FEType &fe_t, const Elem *elem, const bool add_p_level=true)
 
static unsigned int n_dofs_per_elem (const FEType &fe_t, const int extra_order, const Elem *elem)
 Same thing but internally elem->p_level() is ignored and extra_order is used instead.
 
static void dofs_on_side (const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int s, std::vector< unsigned int > &di, const bool add_p_level=true)
 Fills the vector di with the local degree of freedom indices associated with side s of element elem Automatically decides which finite element class to use.
 
static void dofs_on_edge (const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int e, std::vector< unsigned int > &di, const bool add_p_level=true)
 Fills the vector di with the local degree of freedom indices associated with edge e of element elem Automatically decides which finite element class to use.
 
static void nodal_soln (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln, const bool add_p_level=true, const unsigned int vdim=1)
 Build the nodal soln from the element soln.
 
static void side_nodal_soln (const FEType &fe_t, const Elem *elem, const unsigned int side, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln, const bool add_p_level=true, const unsigned int vdim=1)
 Build the nodal soln on one side from the (full) element soln.
 
static Point map (unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
 This is now deprecated; use FEMap::map instead.
 
static Point inverse_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
 This is now deprecated; use FEMap::inverse_map instead.
 
static void inverse_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &physical_points, std::vector< Point > &reference_points, const Real tolerance=TOLERANCE, const bool secure=true)
 This is now deprecated; use FEMap::inverse_map instead.
 
static bool on_reference_element (const Point &p, const ElemType t, const Real eps=TOLERANCE)
 
static Real shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
 
static Real shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p)
 
static Real shape (const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, const bool add_p_level=true)
 
static Real shape (const FEType &fe_t, int extra_order, const Elem *elem, const unsigned int i, const Point &p)
 
template<typename OutputType >
static void shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p, OutputType &phi)
 
template<typename OutputType >
static void shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, OutputType &phi)
 
template<typename OutputType >
static void shape (const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, OutputType &phi)
 
template<typename OutputType >
static void shape (const FEType &fe_t, int extra_order, const Elem *elem, const unsigned int i, const Point &p, OutputType &phi)
 
template<typename OutputType >
static void shapes (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const std::vector< Point > &p, std::vector< OutputType > &phi, const bool add_p_level=true)
 Fills phi with the values of the \( i^{th} \) shape function at point p.
 
template<typename OutputType >
static void all_shapes (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< OutputType > > &phi, const bool add_p_level=true)
 
static shape_ptr shape_function (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static shape_ptr shape_function (const FEType &fe_t, const Elem *elem)
 
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)
 
static Real shape_deriv (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p)
 
static Real shape_deriv (const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p)
 
static Real shape_deriv (const FEType &fe_t, int extra_order, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p)
 Non-deprecated version of function above.
 
template<typename OutputType >
static void shape_derivs (const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const std::vector< Point > &p, std::vector< OutputType > &dphi, const bool add_p_level=true)
 Fills dphi with the derivatives of the \( i^{th} \) shape function at point p in direction j.
 
template<typename OutputType >
static void all_shape_derivs (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< OutputType > > *comps[3], const bool add_p_level=true)
 
static shape_deriv_ptr shape_deriv_function (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static shape_deriv_ptr shape_deriv_function (const FEType &fe_t, const Elem *elem)
 Non-deprecated version of the function above.
 
static Real shape_second_deriv (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const unsigned int j, const Point &p)
 
static Real shape_second_deriv (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p)
 
static Real shape_second_deriv (const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p)
 
static Real shape_second_deriv (const FEType &fe_t, int extra_order, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p)
 Non-deprecated version of function above taking an extra_order parameter.
 
static shape_second_deriv_ptr shape_second_deriv_function (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static shape_second_deriv_ptr shape_second_deriv_function (const FEType &fe_t, const Elem *elem)
 
static void compute_data (const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
 Lets the appropriate child of FEBase compute the requested data for the input specified in data, and sets the values in data.
 
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 variable number var_number.
 
static void compute_periodic_constraints (DofConstraints &constraints, DofMap &dof_map, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const unsigned int variable_number, const Elem *elem)
 Computes the constraint matrix contributions (for periodic boundary conditions) corresponding to variable number var_number.
 
static unsigned int max_order (const FEType &fe_t, const ElemType &el_t)
 
static bool extra_hanging_dofs (const FEType &fe_t)
 
static FEFieldType field_type (const FEType &fe_type)
 
static FEFieldType field_type (const FEFamily &fe_family)
 
static bool orientation_dependent (const FEFamily &fe_family)
 
static unsigned int n_vec_dim (const MeshBase &mesh, const FEType &fe_type)
 
static FEContinuity get_continuity (const FEType &fe_type)
 Returns the input FEType's FEContinuity based on the underlying FEFamily and potentially the Order, although we do not currently support FEs with order-dependent continuity.
 
static bool is_hierarchic (const FEType &fe_type)
 Returns whether or not the input FEType's higher-order shape functions are always hierarchic.
 
template<>
void shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p, Real &phi)
 
template<>
void shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, Real &phi)
 
template<>
void shape (const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, Real &phi)
 
template<>
void shape (const FEType &fe_t, int extra_order, const Elem *elem, const unsigned int i, const Point &p, Real &phi)
 
template<>
void shapes (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const std::vector< Point > &p, std::vector< Real > &phi, const bool add_p_level)
 
template<>
void all_shapes (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< Real > > &phi, const bool add_p_level)
 
template<>
void shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p, RealGradient &phi)
 
template<>
void shape (const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, RealGradient &phi)
 
template<>
void shape (const FEType &fe_t, int extra_order, const Elem *elem, const unsigned int i, const Point &p, RealGradient &phi)
 
template<>
void shapes (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const std::vector< Point > &p, std::vector< RealGradient > &phi, const bool add_p_level)
 
template<>
void all_shapes (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< RealGradient > > &phi, const bool add_p_level)
 
template<>
void shape_derivs (const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const std::vector< Point > &p, std::vector< Real > &dphi, const bool add_p_level)
 
template<>
void all_shape_derivs (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< Real > > *comps[3], const bool add_p_level)
 
template<>
void shape_derivs (const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const std::vector< Point > &p, std::vector< RealGradient > &dphi, const bool add_p_level)
 
template<>
void shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, RealGradient &phi)
 

Private Member Functions

 FEInterface ()
 Empty constructor.
 

Static Private Member Functions

static bool is_InfFE_elem (const ElemType et)
 
static unsigned int ifem_n_shape_functions (const FEType &fe_t, const Elem *elem)
 
static unsigned int ifem_n_dofs (const FEType &fe_t, const Elem *elem)
 
static unsigned int ifem_n_dofs_at_node (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
 
static unsigned int ifem_n_dofs_at_node (const FEType &fe_t, const Elem *elem, const unsigned int n)
 
static unsigned int ifem_n_dofs_per_elem (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int ifem_n_dofs_per_elem (const FEType &fe_t, const Elem *elem)
 
static void ifem_nodal_soln (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
 
static Point ifem_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
 
static Point ifem_inverse_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
 
static void ifem_inverse_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &physical_points, std::vector< Point > &reference_points, const Real tolerance=TOLERANCE, const bool secure=true)
 
static bool ifem_on_reference_element (const Point &p, const ElemType t, const Real eps)
 
static Real ifem_shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
 
static Real ifem_shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p)
 
static Real ifem_shape (const FEType &fe_t, const Elem *t, const unsigned int i, const Point &p)
 
static Real ifem_shape_deriv (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const unsigned int j, const Point &p)
 
static Real ifem_shape_deriv (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p)
 
static Real ifem_shape_deriv (const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p)
 
static void ifem_compute_data (const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
 

Detailed Description

This class provides an encapsulated access to all static public member functions of finite element classes.

Using this class, one need not worry about the correct finite element class.

Author
Daniel Dreyer
Date
2002-2007

Interface class which provides access to FE functions.

Definition at line 65 of file fe_interface.h.

Member Typedef Documentation

◆ n_dofs_at_node_ptr

typedef unsigned int(* libMesh::FEInterface::n_dofs_at_node_ptr) (const ElemType, const Order, const unsigned int)

Definition at line 151 of file fe_interface.h.

◆ shape_deriv_ptr

typedef Real(* libMesh::FEInterface::shape_deriv_ptr) (const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)

Typedef for pointer to a function that returns FE shape function derivative values.

The p_level() of the passed-in elem is accounted for internally when the add_p_level flag is set to true. For more information, see fe.h.

Definition at line 648 of file fe_interface.h.

◆ shape_ptr

typedef Real(* libMesh::FEInterface::shape_ptr) (const FEType fe_t, const Elem *elem, const unsigned int i, const Point &p, const bool add_p_level)

Typedef for pointer to a function that returns FE shape function values.

The p_level() of the passed-in elem is accounted for internally when the add_p_level flag is set to true. For more information, see fe.h.

Definition at line 541 of file fe_interface.h.

◆ shape_second_deriv_ptr

typedef Real(* libMesh::FEInterface::shape_second_deriv_ptr) (const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)

Typedef for pointer to a function that returns FE shape function second derivative values.

The p_level() of the passed-in elem is accounted for internally when the add_p_level flag is set to true. For more information, see fe.h.

Definition at line 753 of file fe_interface.h.

Constructor & Destructor Documentation

◆ FEInterface()

libMesh::FEInterface::FEInterface ( )
private

Empty constructor.

Do not create an object of this type.

Definition at line 43 of file fe_interface.C.

44{
45 libmesh_error_msg("ERROR: Do not define an object of this type.");
46}

◆ ~FEInterface()

virtual libMesh::FEInterface::~FEInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ all_shape_derivs() [1/2]

template<typename OutputType >
static void libMesh::FEInterface::all_shape_derivs ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Point > &  p,
std::vector< std::vector< OutputType > > *  comps[3],
const bool  add_p_level = true 
)
static

◆ all_shape_derivs() [2/2]

template<>
void libMesh::FEInterface::all_shape_derivs ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Point > &  p,
std::vector< std::vector< Real > > *  comps[3],
const bool  add_p_level 
)
static

Definition at line 1556 of file fe_interface.C.

1562{
1563#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1564
1565 if (elem && is_InfFE_elem(elem->type()))
1566 {
1567 for (auto j : make_range(dim))
1568 for (auto i : index_range(*comps[j]))
1569 FEInterface::shape_derivs<Real>(fe_t, elem, i, j, p, (*comps[j])[i], add_p_level);
1570 return;
1571 }
1572#endif
1573
1574 const Order o = fe_t.order;
1575
1576 switch(dim)
1577 {
1578 case 0:
1579 fe_scalar_vec_error_switch(0, all_shape_derivs(elem,o,p,comps,add_p_level), , ; return;);
1580 break;
1581 case 1:
1582 fe_scalar_vec_error_switch(1, all_shape_derivs(elem,o,p,comps,add_p_level), , ; return;);
1583 break;
1584 case 2:
1585 fe_scalar_vec_error_switch(2, all_shape_derivs(elem,o,p,comps,add_p_level), , ; return;);
1586 break;
1587 case 3:
1588 fe_scalar_vec_error_switch(3, all_shape_derivs(elem,o,p,comps,add_p_level), , ; return;);
1589 break;
1590 default:
1591 libmesh_error_msg("Invalid dimension = " << dim);
1592 }
1593
1594 return;
1595}
unsigned int dim
static bool is_InfFE_elem(const ElemType et)
static void all_shape_derivs(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< OutputType > > *comps[3], const bool add_p_level=true)
FEInterface()
Empty constructor.
static void shape_derivs(const FEType &fe_t, const Elem *elem, const unsigned int i, const unsigned int j, const std::vector< Point > &p, std::vector< OutputType > &dphi, const bool add_p_level=true)
Fills dphi with the derivatives of the shape function at point p in direction j.
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition int_range.h:153
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition int_range.h:176

References all_shape_derivs(), dim, libMesh::index_range(), is_InfFE_elem(), libMesh::make_range(), libMesh::FEType::order, and libMesh::Elem::type().

◆ all_shapes() [1/3]

template<typename OutputType >
static void libMesh::FEInterface::all_shapes ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Point > &  p,
std::vector< std::vector< OutputType > > &  phi,
const bool  add_p_level = true 
)
static

◆ all_shapes() [2/3]

template<>
void libMesh::FEInterface::all_shapes ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Point > &  p,
std::vector< std::vector< Real > > &  phi,
const bool  add_p_level 
)
static

Definition at line 1096 of file fe_interface.C.

1102{
1103#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1104
1105 if (elem && is_InfFE_elem(elem->type()))
1106 {
1107 for (auto i : index_range(phi))
1108 FEInterface::shapes<Real>(dim, fe_t, elem, i, p, phi[i], add_p_level);
1109 return;
1110 }
1111#endif
1112
1113 const Order o = fe_t.order;
1114
1115 switch(dim)
1116 {
1117 case 0:
1118 fe_scalar_vec_error_switch(0, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1119 break;
1120 case 1:
1121 fe_scalar_vec_error_switch(1, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1122 break;
1123 case 2:
1124 fe_scalar_vec_error_switch(2, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1125 break;
1126 case 3:
1127 fe_scalar_vec_error_switch(3, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1128 break;
1129 default:
1130 libmesh_error_msg("Invalid dimension = " << dim);
1131 }
1132
1133 return;
1134}
static void all_shapes(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< OutputType > > &phi, const bool add_p_level=true)
static void shapes(const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const std::vector< Point > &p, std::vector< OutputType > &phi, const bool add_p_level=true)
Fills phi with the values of the shape function at point p.

References all_shapes(), dim, libMesh::index_range(), is_InfFE_elem(), libMesh::FEType::order, and libMesh::Elem::type().

◆ all_shapes() [3/3]

template<>
void libMesh::FEInterface::all_shapes ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Point > &  p,
std::vector< std::vector< RealGradient > > &  phi,
const bool  add_p_level 
)
static

Definition at line 1312 of file fe_interface.C.

1318{
1319 // This is actually an issue for infinite elements: They require type 'Gradient'!
1320 if (elem->infinite())
1321 libmesh_not_implemented();
1322
1323 const Order o = fe_t.order;
1324
1325 switch(dim)
1326 {
1327 case 0:
1328 fe_vector_scalar_error_switch(0, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1329 break;
1330 case 1:
1331 fe_vector_scalar_error_switch(1, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1332 break;
1333 case 2:
1334 fe_vector_scalar_error_switch(2, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1335 break;
1336 case 3:
1337 fe_vector_scalar_error_switch(3, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1338 break;
1339 default:
1340 libmesh_error_msg("Invalid dimension = " << dim);
1341 }
1342
1343 return;
1344}

References all_shapes(), dim, libMesh::Elem::infinite(), and libMesh::FEType::order.

◆ compute_constraints()

void libMesh::FEInterface::compute_constraints ( DofConstraints &  constraints,
DofMap &  dof_map,
const unsigned int  variable_number,
const Elem *  elem 
)
static

Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to variable number var_number.

Definition at line 1967 of file fe_interface.C.

1971{
1972 libmesh_assert(elem);
1973
1974 const FEType & fe_t = dof_map.variable_type(variable_number);
1975
1976 switch (elem->dim())
1977 {
1978 case 0:
1979 case 1:
1980 {
1981 // No constraints in 0D/1D.
1982 return;
1983 }
1984
1985
1986 case 2:
1987 {
1988 switch (fe_t.family)
1989 {
1990 case CLOUGH:
1992 dof_map,
1993 variable_number,
1994 elem); return;
1995
1996 case HERMITE:
1998 dof_map,
1999 variable_number,
2000 elem); return;
2001
2002 case LAGRANGE:
2004 dof_map,
2005 variable_number,
2006 elem); return;
2007
2008 case HIERARCHIC:
2010 dof_map,
2011 variable_number,
2012 elem); return;
2013
2014 case HIERARCHIC_VEC:
2016 dof_map,
2017 variable_number,
2018 elem); return;
2019
2020 case SIDE_HIERARCHIC:
2022 dof_map,
2023 variable_number,
2024 elem); return;
2025
2026 case LAGRANGE_VEC:
2028 dof_map,
2029 variable_number,
2030 elem); return;
2031
2032 fe_family_horder_case_func(2, compute_constraints (constraints,
2033 dof_map,
2034 variable_number,
2035 elem), , ; return;)
2036 default:
2037 return;
2038 }
2039 }
2040
2041
2042 case 3:
2043 {
2044 switch (fe_t.family)
2045 {
2046 case HERMITE:
2048 dof_map,
2049 variable_number,
2050 elem); return;
2051
2052 case LAGRANGE:
2054 dof_map,
2055 variable_number,
2056 elem); return;
2057
2058 case HIERARCHIC:
2060 dof_map,
2061 variable_number,
2062 elem); return;
2063
2064 case SIDE_HIERARCHIC:
2066 dof_map,
2067 variable_number,
2068 elem); return;
2069
2070 case LAGRANGE_VEC:
2072 dof_map,
2073 variable_number,
2074 elem); return;
2075
2076 case HIERARCHIC_VEC:
2078 dof_map,
2079 variable_number,
2080 elem); return;
2081
2082 fe_family_horder_case_func(3, compute_constraints (constraints,
2083 dof_map,
2084 variable_number,
2085 elem), , ; return;)
2086 default:
2087 return;
2088 }
2089 }
2090
2091
2092 default:
2093 libmesh_error_msg("Invalid dimension = " << elem->dim());
2094 }
2095}
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 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...
libmesh_assert(ctx)

References libMesh::CLOUGH, libMesh::FE< Dim, T >::compute_constraints(), compute_constraints(), libMesh::Elem::dim(), libMesh::FEType::family, libMesh::HERMITE, libMesh::HIERARCHIC, libMesh::HIERARCHIC_VEC, libMesh::LAGRANGE, libMesh::LAGRANGE_VEC, libMesh::libmesh_assert(), libMesh::SIDE_HIERARCHIC, and libMesh::DofMap::variable_type().

Referenced by compute_constraints().

◆ compute_data()

void libMesh::FEInterface::compute_data ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
FEComputeData &  data 
)
static

Lets the appropriate child of FEBase compute the requested data for the input specified in data, and sets the values in data.

See this as a generalization of shape(). With infinite elements disabled, computes values for all shape functions of elem evaluated at p.

Note
On a p-refined element, fe_t.order should be the base order of the element.
Todo:
For consistency with other FEInterface routines, this function should be updated so that it does not take a dim argument.

Definition at line 1893 of file fe_interface.C.

1897{
1898#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1899
1900 if (elem && is_InfFE_elem(elem->type()))
1901 {
1902 data.init();
1903 ifem_compute_data(dim, fe_t, elem, data);
1904 return;
1905 }
1906
1907#endif
1908
1909 const unsigned int n_dof = n_dofs (fe_t, elem);
1910 const Point & p = data.p;
1911 data.shape.resize(n_dof);
1912
1913 if (data.need_derivative())
1914 {
1915 data.dshape.resize(n_dof);
1916 data.local_transform.resize(dim);
1917
1918 for (unsigned int d=0; d<dim; d++)
1919 data.local_transform[d].resize(dim);
1920
1921 auto fe = FEBase::build(dim, fe_t);
1922 std::vector<Point> pt = {p};
1923 fe->get_dphideta(); // to compute the map
1924 fe->reinit(elem, &pt);
1925
1926 // compute the reference->physical map.
1927 data.local_transform[0][0] = fe->get_dxidx()[0];
1928 if (dim > 1)
1929 {
1930 data.local_transform[1][0] = fe->get_detadx()[0];
1931 data.local_transform[1][1] = fe->get_detady()[0];
1932 data.local_transform[0][1] = fe->get_dxidy()[0];
1933 if (dim > 2)
1934 {
1935 data.local_transform[2][0] = fe->get_dzetadx()[0];
1936 data.local_transform[2][1] = fe->get_dzetady()[0];
1937 data.local_transform[2][2] = fe->get_dzetadz()[0];
1938 data.local_transform[1][2] = fe->get_detadz()[0];
1939 data.local_transform[0][2] = fe->get_dxidz()[0];
1940 }
1941 }
1942 }
1943
1944 // set default values for all the output fields
1945 data.init();
1946
1947 for (unsigned int n=0; n<n_dof; n++)
1948 {
1949 // Here we pass the original fe_t object. Additional p-levels
1950 // (if any) are handled internally by the shape() and
1951 // shape_deriv() functions since they have access to the elem
1952 // pointer. Note that we are already using the n_dof value
1953 // appropriate to the elevated p-level.
1954 data.shape[n] = shape(fe_t, elem, n, p);
1955 if (data.need_derivative())
1956 {
1957 for (unsigned int j=0; j<dim; j++)
1958 data.dshape[n](j) = shape_deriv(fe_t, elem, n, j, p);
1959 }
1960 }
1961}
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
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)
static void ifem_compute_data(const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)

References libMesh::FEGenericBase< OutputType >::build(), dim, libMesh::FEComputeData::dshape, ifem_compute_data(), libMesh::FEComputeData::init(), is_InfFE_elem(), libMesh::FEComputeData::local_transform, n_dofs(), libMesh::FEComputeData::need_derivative(), libMesh::FEComputeData::p, libMesh::FEComputeData::shape, shape(), shape_deriv(), and libMesh::Elem::type().

Referenced by libMesh::MeshFunction::_gradient_on_elem(), libMesh::MeshFunction::discontinuous_value(), libMesh::DTKEvaluator::evaluate(), ifem_compute_data(), LinearElasticityWithContact::move_mesh(), and libMesh::MeshFunction::operator()().

◆ compute_periodic_constraints()

void libMesh::FEInterface::compute_periodic_constraints ( DofConstraints &  constraints,
DofMap &  dof_map,
const PeriodicBoundaries &  boundaries,
const MeshBase &  mesh,
const PointLocatorBase *  point_locator,
const unsigned int  variable_number,
const Elem *  elem 
)
static

Computes the constraint matrix contributions (for periodic boundary conditions) corresponding to variable number var_number.

Definition at line 2103 of file fe_interface.C.

2110{
2111 const FEType & fe_t = dof_map.variable_type(variable_number);
2112 // No element-specific optimizations currently exist, although
2113 // we do have to select the right compute_periodic_constraints
2114 // for the OutputType of this FEType.
2115 switch (field_type(fe_t))
2116 {
2117 case TYPE_SCALAR:
2119 constraints, dof_map, boundaries, mesh, point_locator, variable_number, elem);
2120 break;
2121 case TYPE_VECTOR:
2123 constraints, dof_map, boundaries, mesh, point_locator, variable_number, elem);
2124 break;
2125 default:
2126 libmesh_error_msg(
2127 "compute_periodic_constraints only set up for vector or scalar FEFieldTypes");
2128 }
2129}
static void compute_periodic_constraints(DofConstraints &constraints, DofMap &dof_map, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const unsigned int variable_number, const Elem *elem)
Computes the constraint matrix contributions (for meshes with periodic boundary conditions) correspon...
Definition fe_base.C:1880
static FEFieldType field_type(const FEType &fe_type)
MeshBase & mesh

References libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), field_type(), mesh, libMesh::TYPE_SCALAR, libMesh::TYPE_VECTOR, and libMesh::DofMap::variable_type().

◆ dofs_on_edge()

void libMesh::FEInterface::dofs_on_edge ( const Elem *const  elem,
const unsigned int  dim,
const FEType &  fe_t,
unsigned int  e,
std::vector< unsigned int > &  di,
const bool  add_p_level = true 
)
static

Fills the vector di with the local degree of freedom indices associated with edge e of element elem Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the base order of the element.

Todo:
For consistency with other FEInterface routines, this function should be updated so that it does not take a dim argument.

Definition at line 615 of file fe_interface.C.

621{
622 const Order o = fe_t.order;
623
624 void_fe_with_vec_switch(dofs_on_edge(elem, o, e, di, add_p_level));
625}
static void dofs_on_edge(const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int e, std::vector< unsigned int > &di, const bool add_p_level=true)
Fills the vector di with the local degree of freedom indices associated with edge e of element elem A...

References dofs_on_edge(), and libMesh::FEType::order.

Referenced by libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), dofs_on_edge(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectEdges::operator()().

◆ dofs_on_side()

void libMesh::FEInterface::dofs_on_side ( const Elem *const  elem,
const unsigned int  dim,
const FEType &  fe_t,
unsigned int  s,
std::vector< unsigned int > &  di,
const bool  add_p_level = true 
)
static

Fills the vector di with the local degree of freedom indices associated with side s of element elem Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the base order of the element.

Todo:
For consistency with other FEInterface routines, this function should be updated so that it does not take a dim argument.

Definition at line 601 of file fe_interface.C.

607{
608 const Order o = fe_t.order;
609
610 void_fe_with_vec_switch(dofs_on_side(elem, o, s, di, add_p_level));
611}
static void dofs_on_side(const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int s, std::vector< unsigned int > &di, const bool add_p_level=true)
Fills the vector di with the local degree of freedom indices associated with side s of element elem A...

References dofs_on_side(), and libMesh::FEType::order.

Referenced by alternative_fe_assembly(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), dofs_on_side(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()().

◆ extra_hanging_dofs()

bool libMesh::FEInterface::extra_hanging_dofs ( const FEType &  fe_t)
static
Returns
true if separate degrees of freedom must be allocated for vertex DoFs and edge/face DoFs at a hanging node.

Definition at line 2639 of file fe_interface.C.

2640{
2641 switch (fe_t.family)
2642 {
2643 case LAGRANGE:
2644 case L2_LAGRANGE:
2645 case L2_LAGRANGE_GLL:
2646 case MONOMIAL:
2647 case MONOMIAL_VEC:
2648 case L2_HIERARCHIC:
2649 case SIDE_HIERARCHIC:
2650 case XYZ:
2651 case SUBDIVISION:
2652 case LAGRANGE_VEC:
2653 case L2_LAGRANGE_VEC:
2654 case NEDELEC_ONE:
2655 case RAVIART_THOMAS:
2656 case L2_RAVIART_THOMAS:
2657 return false;
2658 case CLOUGH:
2659 case HERMITE:
2660 case HIERARCHIC:
2661 case HIERARCHIC_VEC:
2662 case L2_HIERARCHIC_VEC:
2663 fe_family_horder_case()
2664 default:
2665 return true;
2666 }
2667}
@ L2_RAVIART_THOMAS
@ L2_HIERARCHIC_VEC

References libMesh::CLOUGH, libMesh::FEType::family, libMesh::HERMITE, libMesh::HIERARCHIC, libMesh::HIERARCHIC_VEC, libMesh::L2_HIERARCHIC, libMesh::L2_HIERARCHIC_VEC, libMesh::L2_LAGRANGE, libMesh::L2_LAGRANGE_GLL, libMesh::L2_LAGRANGE_VEC, libMesh::L2_RAVIART_THOMAS, libMesh::LAGRANGE, libMesh::LAGRANGE_VEC, libMesh::MONOMIAL, libMesh::MONOMIAL_VEC, libMesh::NEDELEC_ONE, libMesh::RAVIART_THOMAS, libMesh::SIDE_HIERARCHIC, libMesh::SUBDIVISION, and libMesh::XYZ.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()().

◆ field_type() [1/2]

FEFieldType libMesh::FEInterface::field_type ( const FEFamily &  fe_family)
static
Returns
Whether the element is vector- or scalar-valued.

Definition at line 2674 of file fe_interface.C.

2675{
2676 switch (fe_family)
2677 {
2678 fe_family_vector_case()
2679 return TYPE_VECTOR;
2680 default:
2681 return TYPE_SCALAR;
2682 }
2683}

References libMesh::TYPE_SCALAR, and libMesh::TYPE_VECTOR.

◆ field_type() [2/2]

FEFieldType libMesh::FEInterface::field_type ( const FEType &  fe_type)
static

◆ get_continuity()

FEContinuity libMesh::FEInterface::get_continuity ( const FEType &  fe_type)
static

Returns the input FEType's FEContinuity based on the underlying FEFamily and potentially the Order, although we do not currently support FEs with order-dependent continuity.

These should exactly match the FEBase::get_continuity() specializations/overrides for the different FE types.

Definition at line 2753 of file fe_interface.C.

2754{
2755 switch (fe_type.family)
2756 {
2757 // Discontinuous elements
2758 case MONOMIAL:
2759 case MONOMIAL_VEC:
2760 case L2_HIERARCHIC:
2761 case L2_LAGRANGE:
2762 case L2_LAGRANGE_GLL:
2763 case XYZ:
2764 case SCALAR:
2765 case L2_RAVIART_THOMAS:
2766 case L2_HIERARCHIC_VEC:
2767 case L2_LAGRANGE_VEC:
2768 return DISCONTINUOUS;
2769
2770 // C0 elements
2771 case LAGRANGE:
2772 case HIERARCHIC:
2773 case BERNSTEIN:
2774 case SZABAB:
2775 case RATIONAL_BERNSTEIN:
2776 case INFINITE_MAP:
2777 case JACOBI_20_00:
2778 case JACOBI_30_00:
2779 case LEGENDRE:
2780 case LAGRANGE_VEC:
2781 case HIERARCHIC_VEC:
2782 return C_ZERO;
2783
2784 // C1 elements
2785 case CLOUGH:
2786 case HERMITE:
2787 case SUBDIVISION:
2788 return C_ONE;
2789
2790 case NEDELEC_ONE:
2791 return H_CURL;
2792
2793 case RAVIART_THOMAS:
2794 return H_DIV;
2795
2796 // Side elements
2797 case SIDE_HIERARCHIC:
2798 return SIDE_DISCONTINUOUS;
2799
2800 default:
2801 libmesh_error_msg("Unknown FE Family " << Utility::enum_to_string(fe_type.family));
2802 }
2803}
std::string enum_to_string(const T e)
@ SIDE_DISCONTINUOUS
@ RATIONAL_BERNSTEIN

References libMesh::BERNSTEIN, libMesh::C_ONE, libMesh::C_ZERO, libMesh::CLOUGH, libMesh::DISCONTINUOUS, libMesh::Utility::enum_to_string(), libMesh::FEType::family, libMesh::H_CURL, libMesh::H_DIV, libMesh::HERMITE, libMesh::HIERARCHIC, libMesh::HIERARCHIC_VEC, libMesh::INFINITE_MAP, libMesh::JACOBI_20_00, libMesh::JACOBI_30_00, libMesh::L2_HIERARCHIC, libMesh::L2_HIERARCHIC_VEC, libMesh::L2_LAGRANGE, libMesh::L2_LAGRANGE_GLL, libMesh::L2_LAGRANGE_VEC, libMesh::L2_RAVIART_THOMAS, libMesh::LAGRANGE, libMesh::LAGRANGE_VEC, libMesh::LEGENDRE, libMesh::MONOMIAL, libMesh::MONOMIAL_VEC, libMesh::NEDELEC_ONE, libMesh::RATIONAL_BERNSTEIN, libMesh::RAVIART_THOMAS, libMesh::SCALAR, libMesh::SIDE_DISCONTINUOUS, libMesh::SIDE_HIERARCHIC, libMesh::SUBDIVISION, libMesh::SZABAB, and libMesh::XYZ.

Referenced by libMesh::DofMap::array_dof_indices(), and FETest< order, family, elem_type, CaseName >::testFEInterface().

◆ ifem_compute_data()

void libMesh::FEInterface::ifem_compute_data ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
FEComputeData &  data 
)
staticprivate

Definition at line 757 of file fe_interface_inf_fe.C.

761{
762 switch (dim)
763 {
764 case 1:
765 {
766 inf_fe_family_mapping_switch(1, compute_data(fe_t, elem,data), , ;break;);
767 break;
768 }
769 case 2:
770 {
771 inf_fe_family_mapping_switch(2, compute_data(fe_t, elem,data), , ;break;);
772 break;
773 }
774 case 3:
775 {
776 inf_fe_family_mapping_switch(3, compute_data(fe_t, elem,data), , ;break;);
777 break;
778 }
779
780
781 default:
782 libmesh_error_msg("Invalid dim = " << dim);
783 break;
784 }
785}
static void compute_data(const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
Lets the appropriate child of FEBase compute the requested data for the input specified in data,...

References compute_data(), and dim.

Referenced by compute_data().

◆ ifem_inverse_map() [1/2]

Point libMesh::FEInterface::ifem_inverse_map ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const Point &  p,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
staticprivate

Definition at line 510 of file fe_interface_inf_fe.C.

516{
517 switch (dim)
518 {
519 // 1D
520 case 1:
521 {
522 switch (fe_t.inf_map)
523 {
524 case CARTESIAN:
525 return InfFE<1,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
526
527 case SPHERICAL:
528 case ELLIPSOIDAL:
529 libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
530
531 /*
532 case SPHERICAL:
533 return InfFE<1,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
534
535 case ELLIPSOIDAL:
536 return InfFE<1,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
537 */
538
539 default:
540 libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
541 }
542 }
543
544
545 // 2D
546 case 2:
547 {
548 switch (fe_t.inf_map)
549 {
550 case CARTESIAN:
551 return InfFE<2,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
552
553 case SPHERICAL:
554 case ELLIPSOIDAL:
555 libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
556
557 /*
558 case SPHERICAL:
559 return InfFE<2,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
560
561 case ELLIPSOIDAL:
562 return InfFE<2,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
563 */
564
565 default:
566 libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
567 }
568 }
569
570
571 // 3D
572 case 3:
573 {
574 switch (fe_t.inf_map)
575 {
576 case CARTESIAN:
577 return InfFE<3,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
578
579 case SPHERICAL:
580 case ELLIPSOIDAL:
581 libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
582
583 /*
584 case SPHERICAL:
585 return InfFE<3,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
586
587 case ELLIPSOIDAL:
588 return InfFE<3,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
589 */
590
591 default:
592 libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
593 }
594 }
595
596 default:
597 libmesh_error_msg("Invalid dim = " << dim);
598 }
599}
static Point inverse_map(const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition inf_fe.h:465

References libMesh::CARTESIAN, dim, libMesh::ELLIPSOIDAL, libMesh::Utility::enum_to_string(), libMesh::FEType::inf_map, libMesh::InfFE< Dim, T_radial, T_map >::inverse_map(), and libMesh::SPHERICAL.

Referenced by inverse_map(), and inverse_map().

◆ ifem_inverse_map() [2/2]

void libMesh::FEInterface::ifem_inverse_map ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Point > &  physical_points,
std::vector< Point > &  reference_points,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
staticprivate

Definition at line 603 of file fe_interface_inf_fe.C.

610{
611 switch (dim)
612 {
613 // 1D
614 case 1:
615 {
616 switch (fe_t.inf_map)
617 {
618 case CARTESIAN:
619 InfFE<1,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
620 return;
621
622 default:
623 libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
624 }
625 }
626
627
628 // 2D
629 case 2:
630 {
631 switch (fe_t.inf_map)
632 {
633 case CARTESIAN:
634 InfFE<2,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
635 return;
636
637 default:
638 libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
639 }
640 }
641
642
643 // 3D
644 case 3:
645 {
646 switch (fe_t.inf_map)
647 {
648 case CARTESIAN:
649 InfFE<3,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
650 return;
651
652 default:
653 libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
654 }
655 }
656
657 default:
658 libmesh_error_msg("Invalid dim = " << dim);
659 }
660}

References libMesh::CARTESIAN, dim, libMesh::Utility::enum_to_string(), libMesh::FEType::inf_map, and libMesh::InfFE< Dim, T_radial, T_map >::inverse_map().

◆ ifem_map()

Point libMesh::FEInterface::ifem_map ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const Point &  p 
)
staticprivate

Definition at line 479 of file fe_interface_inf_fe.C.

483{
484 switch (fe_t.inf_map)
485 {
486 case CARTESIAN:
487 {
488 switch (dim)
489 {
490 case 1:
492 case 2:
494 case 3:
496 default:
497 libmesh_error_msg("Invalid dim = " << dim);
498 }
499 }
500 case SPHERICAL:
501 case ELLIPSOIDAL:
502 libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
503 default:
504 libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
505 }
506}
static Point map(const Elem *inf_elem, const Point &reference_point)
Definition inf_fe.h:457

References libMesh::CARTESIAN, dim, libMesh::ELLIPSOIDAL, libMesh::Utility::enum_to_string(), libMesh::FEType::inf_map, libMesh::InfFE< Dim, T_radial, T_map >::map(), and libMesh::SPHERICAL.

Referenced by map().

◆ ifem_n_dofs()

unsigned int libMesh::FEInterface::ifem_n_dofs ( const FEType &  fe_t,
const Elem *  elem 
)
staticprivate

Definition at line 69 of file fe_interface_inf_fe.C.

71{
72 switch (elem->dim())
73 {
74 // 1D
75 case 1:
76 /*
77 * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
78 * is actually independent of T_radial and T_map, we can use
79 * just any T_radial and T_map
80 */
82
83 // 2D
84 case 2:
86
87 // 3D
88 case 3:
90
91 default:
92 libmesh_error_msg("Unsupported dim = " << elem->dim());
93 }
94}
static unsigned int n_dofs(const FEType &fet, const Elem *inf_elem)

References libMesh::Elem::dim(), and libMesh::InfFE< Dim, T_radial, T_map >::n_dofs().

Referenced by n_dofs(), and n_dofs().

◆ ifem_n_dofs_at_node() [1/2]

unsigned int libMesh::FEInterface::ifem_n_dofs_at_node ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  n 
)
staticprivate

Definition at line 133 of file fe_interface_inf_fe.C.

136{
137 switch (elem->dim())
138 {
139 // 1D
140 case 1:
141 /*
142 * Since InfFE<Dim,T_radial,T_map>::n_dofs_at_node(...)
143 * is actually independent of T_radial and T_map, we can use
144 * just any T_radial and T_map
145 */
147
148 // 2D
149 case 2:
151
152 // 3D
153 case 3:
155
156 default:
157 libmesh_error_msg("Unsupported dim = " << elem->dim());
158 }
159}
static unsigned int n_dofs_at_node(const FEType &fet, const ElemType inf_elem_type, const unsigned int n)

References libMesh::Elem::dim(), and libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node().

◆ ifem_n_dofs_at_node() [2/2]

unsigned int libMesh::FEInterface::ifem_n_dofs_at_node ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  n 
)
staticprivate
Deprecated:
Call the version of ifem_n_dofs_at_node() which takes a pointer-to-Elem instead.

Definition at line 99 of file fe_interface_inf_fe.C.

103{
104 libmesh_deprecated();
105
106 switch (dim)
107 {
108 // 1D
109 case 1:
110 /*
111 * Since InfFE<Dim,T_radial,T_map>::n_dofs_at_node(...)
112 * is actually independent of T_radial and T_map, we can use
113 * just any T_radial and T_map
114 */
116
117 // 2D
118 case 2:
120
121 // 3D
122 case 3:
124
125 default:
126 libmesh_error_msg("Unsupported dim = " << dim);
127 }
128}

References dim, and libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node().

Referenced by n_dofs_at_node(), n_dofs_at_node(), and n_dofs_at_node().

◆ ifem_n_dofs_per_elem() [1/2]

unsigned int libMesh::FEInterface::ifem_n_dofs_per_elem ( const FEType &  fe_t,
const Elem *  elem 
)
staticprivate

Definition at line 199 of file fe_interface_inf_fe.C.

201{
202 switch (elem->dim())
203 {
204 // 1D
205 case 1:
206 /*
207 * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
208 * is actually independent of T_radial and T_map, we can use
209 * just any T_radial and T_map
210 */
212
213 // 2D
214 case 2:
216
217 // 3D
218 case 3:
220
221 default:
222 libmesh_error_msg("Unsupported dim = " << elem->dim());
223 }
224}
static unsigned int n_dofs_per_elem(const FEType &fet, const ElemType inf_elem_type)

References libMesh::Elem::dim(), and libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_per_elem().

◆ ifem_n_dofs_per_elem() [2/2]

unsigned int libMesh::FEInterface::ifem_n_dofs_per_elem ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t 
)
staticprivate
Deprecated:
Call the version of ifem_n_dofs_per_elem() which takes a pointer-to-Elem instead.

Definition at line 166 of file fe_interface_inf_fe.C.

169{
170 libmesh_deprecated();
171
172 switch (dim)
173 {
174 // 1D
175 case 1:
176 /*
177 * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
178 * is actually independent of T_radial and T_map, we can use
179 * just any T_radial and T_map
180 */
182
183 // 2D
184 case 2:
186
187 // 3D
188 case 3:
190
191 default:
192 libmesh_error_msg("Unsupported dim = " << dim);
193 }
194}

References dim, and libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_per_elem().

Referenced by n_dofs_per_elem(), n_dofs_per_elem(), and n_dofs_per_elem().

◆ ifem_n_shape_functions()

unsigned int libMesh::FEInterface::ifem_n_shape_functions ( const FEType &  fe_t,
const Elem *  elem 
)
staticprivate

Definition at line 39 of file fe_interface_inf_fe.C.

41{
42 switch (elem->dim())
43 {
44 // 1D
45 case 1:
46 /*
47 * Since InfFE<Dim,T_radial,T_map>::n_shape_functions(...)
48 * is actually independent of T_radial and T_map, we can use
49 * just any T_radial and T_map
50 */
52
53 // 2D
54 case 2:
56
57 // 3D
58 case 3:
60
61 default:
62 libmesh_error_msg("Unsupported dim = " << elem->dim());
63 }
64}
virtual unsigned int n_shape_functions() const override
Definition inf_fe.h:552

References libMesh::Elem::dim(), and libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions().

Referenced by n_shape_functions(), and n_shape_functions().

◆ ifem_nodal_soln()

void libMesh::FEInterface::ifem_nodal_soln ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Number > &  elem_soln,
std::vector< Number > &  nodal_soln 
)
staticprivate

Definition at line 229 of file fe_interface_inf_fe.C.

234{
235 switch (dim)
236 {
237
238 // 1D
239 case 1:
240 {
241 switch (fe_t.radial_family)
242 {
243 case INFINITE_MAP:
244 libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
245
246 case JACOBI_20_00:
247 {
248 switch (fe_t.inf_map)
249 {
250 case CARTESIAN:
251 {
253 break;
254 }
255 default:
256 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
257 }
258 break;
259 }
260
261 case JACOBI_30_00:
262 {
263 switch (fe_t.inf_map)
264 {
265 case CARTESIAN:
266 {
268 break;
269 }
270 default:
271 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
272 }
273 break;
274 }
275
276 case LEGENDRE:
277 {
278 switch (fe_t.inf_map)
279 {
280 case CARTESIAN:
281 {
283 break;
284 }
285 default:
286 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
287 }
288 break;
289 }
290
291 case LAGRANGE:
292 {
293 switch (fe_t.inf_map)
294 {
295 case CARTESIAN:
296 {
298 break;
299 }
300 default:
301 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
302 }
303 break;
304 }
305
306 default:
307 libmesh_error_msg("ERROR: Bad FEType.radial_family == " << Utility::enum_to_string(fe_t.radial_family));
308 }
309
310 break;
311 }
312
313
314
315
316 // 2D
317 case 2:
318 {
319 switch (fe_t.radial_family)
320 {
321 case INFINITE_MAP:
322 libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
323
324 case JACOBI_20_00:
325 {
326 switch (fe_t.inf_map)
327 {
328 case CARTESIAN:
329 {
331 break;
332 }
333 default:
334 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
335 }
336 break;
337 }
338
339 case JACOBI_30_00:
340 {
341 switch (fe_t.inf_map)
342 {
343 case CARTESIAN:
344 {
346 break;
347 }
348 default:
349 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
350 }
351 break;
352 }
353
354 case LEGENDRE:
355 {
356 switch (fe_t.inf_map)
357 {
358 case CARTESIAN:
359 {
361 break;
362 }
363 default:
364 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
365 }
366 break;
367 }
368
369 case LAGRANGE:
370 {
371 switch (fe_t.inf_map)
372 {
373 case CARTESIAN:
374 {
376 break;
377 }
378 default:
379 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
380 }
381 break;
382 }
383
384 default:
385 libmesh_error_msg("ERROR: Bad FEType.radial_family == " << Utility::enum_to_string(fe_t.radial_family));
386 }
387
388 break;
389 }
390
391
392
393
394 // 3D
395 case 3:
396 {
397 switch (fe_t.radial_family)
398 {
399 case INFINITE_MAP:
400 libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
401
402 case JACOBI_20_00:
403 {
404 switch (fe_t.inf_map)
405 {
406 case CARTESIAN:
407 {
409 break;
410 }
411 default:
412 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
413 }
414 break;
415 }
416
417 case JACOBI_30_00:
418 {
419 switch (fe_t.inf_map)
420 {
421 case CARTESIAN:
422 {
424 break;
425 }
426 default:
427 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
428 }
429 break;
430 }
431
432 case LEGENDRE:
433 {
434 switch (fe_t.inf_map)
435 {
436 case CARTESIAN:
437 {
439 break;
440 }
441 default:
442 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
443 }
444 break;
445 }
446
447 case LAGRANGE:
448 {
449 switch (fe_t.inf_map)
450 {
451 case CARTESIAN:
452 {
454 break;
455 }
456 default:
457 libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
458 }
459 break;
460 }
461
462
463
464 default:
465 libmesh_error_msg("ERROR: Bad FEType.radial_family == " << Utility::enum_to_string(fe_t.radial_family));
466 }
467
468 break;
469 }
470
471 default:
472 libmesh_error_msg("Invalid dim = " << dim);
473 }
474}
static void nodal_soln(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln, const bool add_p_level=true, const unsigned int vdim=1)
Build the nodal soln from the element soln.
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.

References libMesh::CARTESIAN, dim, libMesh::Utility::enum_to_string(), libMesh::FEType::inf_map, libMesh::INFINITE_MAP, libMesh::JACOBI_20_00, libMesh::JACOBI_30_00, libMesh::LAGRANGE, libMesh::LEGENDRE, libMesh::InfFE< Dim, T_radial, T_map >::nodal_soln(), nodal_soln(), and libMesh::FEType::radial_family.

Referenced by nodal_soln().

◆ ifem_on_reference_element()

bool libMesh::FEInterface::ifem_on_reference_element ( const Point &  p,
const ElemType  t,
const Real  eps 
)
staticprivate

Definition at line 665 of file fe_interface_inf_fe.C.

668{
669 return FEBase::on_reference_element(p,t,eps);
670}
static bool on_reference_element(const Point &p, const ElemType t, const Real eps=TOLERANCE)

References libMesh::FEAbstract::on_reference_element().

◆ ifem_shape() [1/3]

Real libMesh::FEInterface::ifem_shape ( const FEType &  fe_t,
const Elem *  t,
const unsigned int  i,
const Point &  p 
)
staticprivate

Definition at line 701 of file fe_interface_inf_fe.C.

705{
706 // The inf_fe_switch macro requires a "dim" parameter.
707 auto dim = elem->dim();
708
709 inf_fe_switch( shape(fe_t, elem, i, p));
710}

References dim, libMesh::Elem::dim(), and shape().

◆ ifem_shape() [2/3]

Real libMesh::FEInterface::ifem_shape ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p 
)
staticprivate
Deprecated:
Call version that takes a pointer-to-Elem and does not require an explicit dim parameter instead.

Definition at line 687 of file fe_interface_inf_fe.C.

692{
693 libmesh_deprecated();
694
695 inf_fe_switch( shape(fe_t, elem, i, p));
696}

References shape().

◆ ifem_shape() [3/3]

Real libMesh::FEInterface::ifem_shape ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  i,
const Point &  p 
)
staticprivate
Deprecated:
Call version that takes a pointer-to-Elem and does not require an explicit dim parameter instead.

Definition at line 674 of file fe_interface_inf_fe.C.

679{
680 libmesh_deprecated();
681
682 inf_fe_switch(shape(fe_t, t, i, p));
683}

References shape().

Referenced by shape(), shape(), shape(), shape(), shape(), shape(), shape(), shape(), and shapes().

◆ ifem_shape_deriv() [1/3]

Real libMesh::FEInterface::ifem_shape_deriv ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
staticprivate

Definition at line 744 of file fe_interface_inf_fe.C.

749{
750 // The inf_fe_switch macro requires a "dim" parameter.
751 auto dim = elem->dim();
752
753 inf_fe_switch(shape_deriv(fe_t, elem, i, j, p));
754}

References dim, libMesh::Elem::dim(), and shape_deriv().

◆ ifem_shape_deriv() [2/3]

Real libMesh::FEInterface::ifem_shape_deriv ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
staticprivate
Deprecated:
Call version that takes a pointer-to-Elem and does not require an explicit dim parameter instead.

Definition at line 715 of file fe_interface_inf_fe.C.

721{
722 libmesh_deprecated();
723
724 inf_fe_switch(shape_deriv(fe_t, elem, i, j, p));
725}

References shape_deriv().

◆ ifem_shape_deriv() [3/3]

Real libMesh::FEInterface::ifem_shape_deriv ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
staticprivate
Deprecated:
Call version that takes a pointer-to-Elem and does not require an explicit dim parameter instead.

Definition at line 729 of file fe_interface_inf_fe.C.

735{
736 libmesh_deprecated();
737
738 inf_fe_switch(shape_deriv(fe_t, t, i, j, p));
739}

References shape_deriv().

Referenced by shape_deriv(), shape_deriv(), shape_deriv(), and shape_deriv().

◆ inverse_map() [1/2]

Point libMesh::FEInterface::inverse_map ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const Point &  p,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
static

This is now deprecated; use FEMap::inverse_map instead.

Definition at line 696 of file fe_interface.C.

702{
703 libmesh_deprecated();
704#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
705
706 if (is_InfFE_elem(elem->type()))
707 return ifem_inverse_map(dim, fe_t, elem, p,tolerance, secure);
708
709#endif
710
711 fe_with_vec_switch(inverse_map(elem, p, tolerance, secure));
712}
static Point ifem_inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
static Point inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
This is now deprecated; use FEMap::inverse_map instead.

References dim, ifem_inverse_map(), inverse_map(), is_InfFE_elem(), and libMesh::Elem::type().

Referenced by inverse_map(), and inverse_map().

◆ inverse_map() [2/2]

void libMesh::FEInterface::inverse_map ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Point > &  physical_points,
std::vector< Point > &  reference_points,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
static

This is now deprecated; use FEMap::inverse_map instead.

Definition at line 716 of file fe_interface.C.

723{
724 libmesh_deprecated();
725
726 const std::size_t n_pts = physical_points.size();
727
728 // Resize the vector
729 reference_points.resize(n_pts);
730
731 if (n_pts == 0)
732 {
733 libMesh::err << "WARNING: empty vector physical_points!"
734 << std::endl;
735 libmesh_here();
736 return;
737 }
738
739#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
740
741 if (is_InfFE_elem(elem->type()))
742 {
743 ifem_inverse_map(dim, fe_t, elem, physical_points, reference_points, tolerance, secure);
744 return;
745 // libmesh_not_implemented();
746 }
747
748#endif
749
750 void_fe_with_vec_switch(inverse_map(elem, physical_points, reference_points, tolerance, secure));
751}
OStreamProxy err

References dim, libMesh::err, ifem_inverse_map(), inverse_map(), is_InfFE_elem(), and libMesh::Elem::type().

◆ is_hierarchic()

bool libMesh::FEInterface::is_hierarchic ( const FEType &  fe_type)
static

Returns whether or not the input FEType's higher-order shape functions are always hierarchic.

Definition at line 2715 of file fe_interface.C.

2716{
2717 switch (fe_type.family)
2718 {
2719 case HERMITE:
2720 case HIERARCHIC:
2721 case HIERARCHIC_VEC:
2722 case L2_HIERARCHIC:
2723 case L2_HIERARCHIC_VEC:
2724 case MONOMIAL:
2725 case MONOMIAL_VEC:
2726 case SIDE_HIERARCHIC:
2727 case SZABAB:
2728 case XYZ:
2729 return true;
2730
2731 case BERNSTEIN:
2732 case CLOUGH: // maybe some day?
2733 case LAGRANGE:
2734 case LAGRANGE_VEC:
2735 case L2_LAGRANGE:
2736 case L2_LAGRANGE_GLL:
2737 case L2_LAGRANGE_VEC:
2738 case NEDELEC_ONE:
2739 case RATIONAL_BERNSTEIN:
2740 case RAVIART_THOMAS:
2741 case L2_RAVIART_THOMAS:
2742 case SCALAR:
2743 case SUBDIVISION:
2744 return false;
2745
2746 default:
2747 libmesh_error_msg("Unknown FE Family " << Utility::enum_to_string(fe_type.family));
2748 }
2749}

References libMesh::BERNSTEIN, libMesh::CLOUGH, libMesh::Utility::enum_to_string(), libMesh::FEType::family, libMesh::HERMITE, libMesh::HIERARCHIC, libMesh::HIERARCHIC_VEC, libMesh::L2_HIERARCHIC, libMesh::L2_HIERARCHIC_VEC, libMesh::L2_LAGRANGE, libMesh::L2_LAGRANGE_GLL, libMesh::L2_LAGRANGE_VEC, libMesh::L2_RAVIART_THOMAS, libMesh::LAGRANGE, libMesh::LAGRANGE_VEC, libMesh::MONOMIAL, libMesh::MONOMIAL_VEC, libMesh::NEDELEC_ONE, libMesh::RATIONAL_BERNSTEIN, libMesh::RAVIART_THOMAS, libMesh::SCALAR, libMesh::SIDE_HIERARCHIC, libMesh::SUBDIVISION, libMesh::SZABAB, and libMesh::XYZ.

Referenced by FETest< order, family, elem_type, CaseName >::testFEInterface().

◆ is_InfFE_elem()

bool libMesh::FEInterface::is_InfFE_elem ( const ElemType  et)
staticprivate

◆ map()

Point libMesh::FEInterface::map ( unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const Point &  p 
)
static

This is now deprecated; use FEMap::map instead.

Definition at line 681 of file fe_interface.C.

685{
686 libmesh_deprecated();
687#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
688 if (is_InfFE_elem(elem->type()))
689 return ifem_map(dim, fe_t, elem, p);
690#endif
691 fe_with_vec_switch(map(elem, p));
692}
static Point ifem_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
static Point map(unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
This is now deprecated; use FEMap::map instead.

References dim, ifem_map(), is_InfFE_elem(), map(), and libMesh::Elem::type().

Referenced by map().

◆ max_order()

unsigned int libMesh::FEInterface::max_order ( const FEType &  fe_t,
const ElemType &  el_t 
)
static
Returns
The maximum polynomial degree that the given finite element family can support on the given geometric element.

Definition at line 2135 of file fe_interface.C.

2137{
2138 // Yeah, I know, infinity is much larger than 11, but our
2139 // solvers don't seem to like high degree polynomials, and our
2140 // quadrature rules and number_lookups tables
2141 // need to go up higher.
2142 const unsigned int unlimited = 11;
2143
2144 // If we used 0 as a default, then elements missing from this
2145 // table (e.g. infinite elements) would be considered broken.
2146 const unsigned int unknown = unlimited;
2147
2148 switch (fe_t.family)
2149 {
2150 case LAGRANGE:
2151 case LAGRANGE_VEC:
2152 switch (el_t)
2153 {
2154 case EDGE2:
2155 case EDGE3:
2156 case EDGE4:
2157 return 3;
2158 case TRI3:
2159 case TRISHELL3:
2160 case C0POLYGON:
2161 return 1;
2162 case TRI6:
2163 return 2;
2164 case TRI7:
2165 return 3;
2166 case QUAD4:
2167 case QUADSHELL4:
2168 return 1;
2169 case QUAD8:
2170 case QUADSHELL8:
2171 case QUAD9:
2172 case QUADSHELL9:
2173 return 2;
2174 case TET4:
2175 return 1;
2176 case TET10:
2177 return 2;
2178 case TET14:
2179 return 3;
2180 case HEX8:
2181 return 1;
2182 case HEX20:
2183 case HEX27:
2184 return 2;
2185 case PRISM6:
2186 return 1;
2187 case PRISM15:
2188 case PRISM18:
2189 return 2;
2190 case PRISM20:
2191 case PRISM21:
2192 return 3;
2193 case PYRAMID5:
2194 return 1;
2195 case PYRAMID13:
2196 case PYRAMID14:
2197 return 2;
2198 case PYRAMID18:
2199 return 3;
2200 case C0POLYHEDRON:
2201 return 1;
2202 default:
2203 return unknown;
2204 }
2205 break;
2206 case L2_LAGRANGE_GLL:
2207 switch (el_t)
2208 {
2209 case EDGE2:
2210 case EDGE3:
2211 case EDGE4:
2212 case QUAD4:
2213 case QUADSHELL4:
2214 case QUAD8:
2215 case QUADSHELL8:
2216 case QUAD9:
2217 case QUADSHELL9:
2218 case HEX8:
2219 case HEX20:
2220 case HEX27:
2221 // A basis of degree p needs p+1 Gauss-Lobatto points, and QGaussLobatto tabulates
2222 // at most fe_lagrange_gll_max_points_1D
2224 default:
2225 return unknown;
2226 }
2227 break;
2228 case MONOMIAL:
2229 case L2_LAGRANGE:
2230 case L2_LAGRANGE_VEC:
2231 case L2_HIERARCHIC:
2232 case L2_HIERARCHIC_VEC:
2233 case MONOMIAL_VEC:
2234 switch (el_t)
2235 {
2236 case EDGE2:
2237 case EDGE3:
2238 case EDGE4:
2239 case C0POLYGON:
2240 case TRI3:
2241 case TRISHELL3:
2242 case TRI6:
2243 case TRI7:
2244 case QUAD4:
2245 case QUADSHELL4:
2246 case QUAD8:
2247 case QUADSHELL8:
2248 case QUAD9:
2249 case QUADSHELL9:
2250 case TET4:
2251 case TET10:
2252 case TET14:
2253 case HEX8:
2254 case HEX20:
2255 case HEX27:
2256 case PRISM6:
2257 case PRISM15:
2258 case PRISM18:
2259 case PRISM20:
2260 case PRISM21:
2261 case PYRAMID5:
2262 case PYRAMID13:
2263 case PYRAMID14:
2264 case PYRAMID18:
2265 case C0POLYHEDRON:
2266 return unlimited;
2267 default:
2268 return unknown;
2269 }
2270 break;
2271#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
2272 case BERNSTEIN:
2273 case RATIONAL_BERNSTEIN:
2274 switch (el_t)
2275 {
2276 case EDGE2:
2277 case EDGE3:
2278 case EDGE4:
2279 return unlimited;
2280 case TRI3:
2281 case TRISHELL3:
2282 return 1;
2283 case TRI6:
2284 case TRI7:
2285 return 6;
2286 case QUAD4:
2287 case QUADSHELL4:
2288 return 1;
2289 case QUAD8:
2290 case QUADSHELL8:
2291 case QUAD9:
2292 case QUADSHELL9:
2293 return unlimited;
2294 case TET4:
2295 return 1;
2296 case TET10:
2297 case TET14:
2298 return 2;
2299 case HEX8:
2300 return 1;
2301 case HEX20:
2302 return 2;
2303 case HEX27:
2304 return 4;
2305 case C0POLYGON:
2306 case PRISM6:
2307 case PRISM15:
2308 case PRISM18:
2309 case PRISM20:
2310 case PRISM21:
2311 case PYRAMID5:
2312 case PYRAMID13:
2313 case PYRAMID14:
2314 case PYRAMID18:
2315 case C0POLYHEDRON:
2316 return 0;
2317 default:
2318 return unknown;
2319 }
2320 break;
2321 case SZABAB:
2322 switch (el_t)
2323 {
2324 case EDGE2:
2325 return 1;
2326 case EDGE3:
2327 case EDGE4:
2328 return 7;
2329 case TRI3:
2330 case TRISHELL3:
2331 return 1;
2332 case TRI6:
2333 case TRI7:
2334 return 7;
2335 case QUAD4:
2336 case QUADSHELL4:
2337 return 1;
2338 case QUAD8:
2339 case QUADSHELL8:
2340 case QUAD9:
2341 case QUADSHELL9:
2342 return 7;
2343 case C0POLYGON:
2344 case TET4:
2345 case TET10:
2346 case TET14:
2347 case HEX8:
2348 case HEX20:
2349 case HEX27:
2350 case PRISM6:
2351 case PRISM15:
2352 case PRISM18:
2353 case PRISM20:
2354 case PRISM21:
2355 case PYRAMID5:
2356 case PYRAMID13:
2357 case PYRAMID14:
2358 case PYRAMID18:
2359 case C0POLYHEDRON:
2360 return 0;
2361 default:
2362 return unknown;
2363 }
2364 break;
2365#endif
2366 case XYZ:
2367 switch (el_t)
2368 {
2369 case EDGE2:
2370 case EDGE3:
2371 case EDGE4:
2372 case C0POLYGON:
2373 case TRI3:
2374 case TRISHELL3:
2375 case TRI6:
2376 case TRI7:
2377 case QUAD4:
2378 case QUADSHELL4:
2379 case QUAD8:
2380 case QUADSHELL8:
2381 case QUAD9:
2382 case QUADSHELL9:
2383 case TET4:
2384 case TET10:
2385 case TET14:
2386 case HEX8:
2387 case HEX20:
2388 case HEX27:
2389 case PRISM6:
2390 case PRISM15:
2391 case PRISM18:
2392 case PRISM20:
2393 case PRISM21:
2394 case PYRAMID5:
2395 case PYRAMID13:
2396 case PYRAMID14:
2397 case PYRAMID18:
2398 case C0POLYHEDRON:
2399 return unlimited;
2400 default:
2401 return unknown;
2402 }
2403 break;
2404 case CLOUGH:
2405 switch (el_t)
2406 {
2407 case EDGE2:
2408 case EDGE3:
2409 return 3;
2410 case EDGE4:
2411 case TRI3:
2412 case TRISHELL3:
2413 return 0;
2414 case TRI6:
2415 case TRI7:
2416 return 3;
2417 case C0POLYGON:
2418 case QUAD4:
2419 case QUADSHELL4:
2420 case QUAD8:
2421 case QUADSHELL8:
2422 case QUAD9:
2423 case QUADSHELL9:
2424 case TET4:
2425 case TET10:
2426 case TET14:
2427 case HEX8:
2428 case HEX20:
2429 case HEX27:
2430 case PRISM6:
2431 case PRISM15:
2432 case PRISM18:
2433 case PRISM20:
2434 case PRISM21:
2435 case PYRAMID5:
2436 case PYRAMID13:
2437 case PYRAMID14:
2438 case PYRAMID18:
2439 case C0POLYHEDRON:
2440 return 0;
2441 default:
2442 return unknown;
2443 }
2444 break;
2445 case HERMITE:
2446 switch (el_t)
2447 {
2448 case EDGE2:
2449 case EDGE3:
2450 return unlimited;
2451 case EDGE4:
2452 case TRI3:
2453 case TRISHELL3:
2454 case TRI6:
2455 case TRI7:
2456 return 0;
2457 case QUAD4:
2458 case QUADSHELL4:
2459 return 3;
2460 case QUAD8:
2461 case QUADSHELL8:
2462 case QUAD9:
2463 case QUADSHELL9:
2464 return unlimited;
2465 case TET4:
2466 case TET10:
2467 case TET14:
2468 return 0;
2469 case HEX8:
2470 return 3;
2471 case HEX20:
2472 case HEX27:
2473 return unlimited;
2474 case C0POLYGON:
2475 case PRISM6:
2476 case PRISM15:
2477 case PRISM18:
2478 case PRISM20:
2479 case PRISM21:
2480 case PYRAMID5:
2481 case PYRAMID13:
2482 case PYRAMID14:
2483 case PYRAMID18:
2484 case C0POLYHEDRON:
2485 return 0;
2486 default:
2487 return unknown;
2488 }
2489 break;
2490 case HIERARCHIC:
2491 case HIERARCHIC_VEC:
2492 switch (el_t)
2493 {
2494 case EDGE2:
2495 case EDGE3:
2496 case EDGE4:
2497 return unlimited;
2498 case TRI3:
2499 case TRISHELL3:
2500 return 1;
2501 case TRI6:
2502 case TRI7:
2503 return unlimited;
2504 case QUAD4:
2505 case QUADSHELL4:
2506 return 1;
2507 case QUAD8:
2508 case QUADSHELL8:
2509 case QUAD9:
2510 case QUADSHELL9:
2511 return unlimited;
2512 case TET4:
2513 return 1;
2514 case TET10:
2515 return 2;
2516 case TET14:
2517 return unlimited;
2518 case HEX8:
2519 case HEX20:
2520 return 1;
2521 case HEX27:
2522 return unlimited;
2523 case PRISM6:
2524 case PRISM15:
2525 case PRISM18:
2526 case PRISM20:
2527 case PRISM21:
2528 return unlimited;
2529 case C0POLYGON:
2530 case PYRAMID5:
2531 case PYRAMID13:
2532 case PYRAMID14:
2533 case PYRAMID18:
2534 case C0POLYHEDRON:
2535 return 0;
2536 default:
2537 return unknown;
2538 }
2539 break;
2540 case SIDE_HIERARCHIC:
2541 switch (el_t)
2542 {
2543 case EDGE2:
2544 case EDGE3:
2545 case EDGE4:
2546 return unlimited; // although it's all the same as 0...
2547 case TRI3:
2548 case TRISHELL3:
2549 return 0;
2550 case TRI6:
2551 case TRI7:
2552 return unlimited;
2553 case C0POLYGON:
2554 case QUAD4:
2555 case QUADSHELL4:
2556 return 0;
2557 case QUAD8:
2558 case QUADSHELL8:
2559 case QUAD9:
2560 case QUADSHELL9:
2561 return unlimited;
2562 case TET4:
2563 case TET10:
2564 return 0;
2565 case TET14:
2566 return unlimited;
2567 case HEX8:
2568 case HEX20:
2569 return 0;
2570 case HEX27:
2571 return unlimited;
2572 case PRISM6:
2573 case PRISM15:
2574 case PRISM18:
2575 return 0;
2576 case PRISM20:
2577 case PRISM21:
2578 return unlimited;
2579 case PYRAMID5:
2580 case PYRAMID13:
2581 case PYRAMID14:
2582 case PYRAMID18:
2583 case C0POLYHEDRON:
2584 return 0;
2585 default:
2586 return unknown;
2587 }
2588 break;
2589 case SUBDIVISION:
2590 switch (el_t)
2591 {
2592 case TRI3SUBDIVISION:
2593 return unlimited;
2594 default:
2595 return unknown;
2596 }
2597 break;
2598 case NEDELEC_ONE:
2599 switch (el_t)
2600 {
2601 case TRI6:
2602 case TRI7:
2603 case QUAD8:
2604 case QUAD9:
2605 return 5;
2606 case TET10:
2607 case TET14:
2608 case HEX20:
2609 case HEX27:
2610 return 1;
2611 default:
2612 return 0;
2613 }
2614 break;
2615 case RAVIART_THOMAS:
2616 case L2_RAVIART_THOMAS:
2617 switch (el_t)
2618 {
2619 case TRI6:
2620 case TRI7:
2621 case QUAD8:
2622 case QUAD9:
2623 return 5;
2624 case TET14:
2625 case HEX27:
2626 return 1;
2627 default:
2628 return 0;
2629 }
2630 break;
2631 default:
2632 return 0;
2633 break;
2634 }
2635}
constexpr unsigned int fe_lagrange_gll_max_points_1D
The number of points in the largest Gauss-Lobatto rule that QGaussLobatto tabulates,...

References libMesh::BERNSTEIN, libMesh::C0POLYGON, libMesh::C0POLYHEDRON, libMesh::CLOUGH, libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::FEType::family, libMesh::fe_lagrange_gll_max_points_1D, libMesh::HERMITE, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::HIERARCHIC, libMesh::HIERARCHIC_VEC, libMesh::L2_HIERARCHIC, libMesh::L2_HIERARCHIC_VEC, libMesh::L2_LAGRANGE, libMesh::L2_LAGRANGE_GLL, libMesh::L2_LAGRANGE_VEC, libMesh::L2_RAVIART_THOMAS, libMesh::LAGRANGE, libMesh::LAGRANGE_VEC, libMesh::MONOMIAL, libMesh::MONOMIAL_VEC, libMesh::NEDELEC_ONE, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM20, libMesh::PRISM21, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID18, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, libMesh::QUADSHELL8, libMesh::QUADSHELL9, libMesh::RATIONAL_BERNSTEIN, libMesh::RAVIART_THOMAS, libMesh::SIDE_HIERARCHIC, libMesh::SUBDIVISION, libMesh::SZABAB, libMesh::TET10, libMesh::TET14, libMesh::TET4, libMesh::TRI3, libMesh::TRI3SUBDIVISION, libMesh::TRI6, libMesh::TRI7, libMesh::TRISHELL3, and libMesh::XYZ.

Referenced by libMesh::FEAbstract::compute_node_constraints().

◆ n_dofs() [1/4]

unsigned int libMesh::FEInterface::n_dofs ( const FEType &  fe_t,
const Elem *  elem,
const bool  add_p_level = true 
)
static
Returns
The number of DOFs for elem for finite element type fe_t

The p_level() of elem is accounted for internally by increasing the Order of the passed-in FEType if add_p_level is true.

Definition at line 394 of file fe_interface.C.

397{
398 // dim is required by the fe_with_vec_switch macro
399 auto dim = elem->dim();
400
401#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
402
403 // InfElems currently don't support p_level()
404 if (is_InfFE_elem(elem->type()))
405 return ifem_n_dofs(fe_t, elem);
406
407#endif
408
409 // Account for Elem::p_level() when computing total_order
410 fe_with_vec_switch(n_dofs(elem, fe_t.order + add_p_level*elem->p_level()));
411}
static unsigned int ifem_n_dofs(const FEType &fe_t, const Elem *elem)

References dim, libMesh::Elem::dim(), ifem_n_dofs(), is_InfFE_elem(), n_dofs(), libMesh::FEType::order, libMesh::Elem::p_level(), and libMesh::Elem::type().

◆ n_dofs() [2/4]

unsigned int libMesh::FEInterface::n_dofs ( const FEType &  fe_t,
int  extra_order,
const Elem *  elem 
)
static
Returns
The number of DOFs for elem for finite element type fe_t
Note
The p_level() of \elem is ignored and instead a total Order given by fet_t.order + extra_order is used in determining the number of DOFs.

Definition at line 416 of file fe_interface.C.

419{
420 // dim is required by the fe_with_vec_switch macro
421 auto dim = elem->dim();
422
423#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
424
425 // InfElems currently don't support p_level()
426 if (is_InfFE_elem(elem->type()))
427 return ifem_n_dofs(fe_t, elem);
428
429#endif
430
431 // Elem::p_level() is ignored, extra_order is used instead.
432 auto total_order = fe_t.order + extra_order;
433
434 fe_with_vec_switch(n_dofs(elem, total_order));
435}

References dim, libMesh::Elem::dim(), ifem_n_dofs(), is_InfFE_elem(), n_dofs(), libMesh::FEType::order, and libMesh::Elem::type().

◆ n_dofs() [3/4]

unsigned int libMesh::FEInterface::n_dofs ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem 
)
static

Similar to the function above but takes an Elem * and accounts for p-refinement internally, if any.

This function is designed to prevent users from needing to trick FEInterface::n_dofs() into giving them the right number of dofs when working with p-refined elements. See, e.g. FEInterface::compute_data().

Deprecated:
Use n_dofs(const FEType &, Elem*) or n_dofs(const FEType &, int, Elem*) instead.

Definition at line 381 of file fe_interface.C.

384{
385 libmesh_deprecated();
386
387 fe_with_vec_switch(n_dofs(elem, fe_t.order + elem->p_level()));
388}

References n_dofs(), libMesh::FEType::order, and libMesh::Elem::p_level().

◆ n_dofs() [4/4]

unsigned int libMesh::FEInterface::n_dofs ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t 
)
static
Deprecated:
Use n_dofs(const FEType &, Elem*) or n_dofs(const FEType &, int, Elem*) instead.

Definition at line 356 of file fe_interface.C.

359{
360 libmesh_deprecated();
361
362#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
363
364 // We no longer support calling this function with an infinite
365 // ElemType, you must call the FeInterface::n_dofs() taking an Elem*
366 // instead.
367 if (is_InfFE_elem(t))
368 libmesh_not_implemented();
369
370#endif
371
372 const Order o = fe_t.order;
373
374 fe_with_vec_switch(n_dofs(t, o));
375}

References is_InfFE_elem(), n_dofs(), and libMesh::FEType::order.

Referenced by libMesh::DofMap::_dof_indices(), assemble_func(), assemble_SchroedingerEquation(), assemble_wave(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), compute_data(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_functions(), libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_constraints(), libMesh::InfFE< Dim, T_radial, T_map >::init_shape_functions(), main(), n_dofs(), n_dofs(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs(), n_dofs(), n_dofs(), n_shape_functions(), n_shape_functions(), libMesh::HPCoarsenTest::select_refinement(), and FETest< order, family, elem_type, CaseName >::testNodalSoln().

◆ n_dofs_at_node() [1/3]

unsigned int libMesh::FEInterface::n_dofs_at_node ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  n,
const bool  add_p_level = true 
)
static
Returns
The number of dofs at node n for a finite element of type fe_t. Accounts for Elem::p_level() internally if add_p_level is true.

Definition at line 486 of file fe_interface.C.

490{
491 // dim is required by the fe_with_vec_switch macro
492 auto dim = elem->dim();
493
494#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
495
496 if (is_InfFE_elem(elem->type()))
497 return ifem_n_dofs_at_node(fe_t, elem, n);
498
499#endif
500
501 // Account for Elem::p_level() when computing total_order
502 auto total_order = fe_t.order + add_p_level*elem->p_level();
503
504 fe_with_vec_switch(n_dofs_at_node(*elem, total_order, n));
505}
static unsigned int ifem_n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)

References dim, libMesh::Elem::dim(), ifem_n_dofs_at_node(), is_InfFE_elem(), n_dofs_at_node(), libMesh::FEType::order, libMesh::Elem::p_level(), and libMesh::Elem::type().

◆ n_dofs_at_node() [2/3]

unsigned int libMesh::FEInterface::n_dofs_at_node ( const FEType &  fe_t,
const int  extra_order,
const Elem *  elem,
const unsigned int  n 
)
static
Returns
The number of dofs at node n for a finite element of type fe_t. Ignores Elem::p_level() and computes a total Order given by fe_t.order + extra_order when determining the number of DOFs.

Definition at line 510 of file fe_interface.C.

514{
515 // dim is required by the fe_with_vec_switch macro
516 auto dim = elem->dim();
517
518#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
519
520 if (is_InfFE_elem(elem->type()))
521 return ifem_n_dofs_at_node(fe_t, elem, n);
522
523#endif
524
525 // Ignore Elem::p_level() and instead use extra_order to compute total_order.
526 auto total_order = fe_t.order + extra_order;
527
528 fe_with_vec_switch(n_dofs_at_node(*elem, total_order, n));
529}

References dim, libMesh::Elem::dim(), ifem_n_dofs_at_node(), is_InfFE_elem(), n_dofs_at_node(), libMesh::FEType::order, and libMesh::Elem::type().

◆ n_dofs_at_node() [3/3]

unsigned int libMesh::FEInterface::n_dofs_at_node ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  n 
)
static
Returns
The number of dofs at node n for a finite element of type fe_t. Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the total order of the element.

Deprecated:
Call the version of n_dofs_at_node() taking an Elem * instead, this one accounts for Elem::p_level() internally rather than requiring the user to do it.

Definition at line 440 of file fe_interface.C.

444{
445 libmesh_deprecated();
446
447#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
448
449 if (is_InfFE_elem(t))
450 return ifem_n_dofs_at_node(dim, fe_t, t, n);
451
452#endif
453
454 const Order o = fe_t.order;
455
456 fe_with_vec_switch(n_dofs_at_node(t, o, n));
457}

References dim, ifem_n_dofs_at_node(), is_InfFE_elem(), n_dofs_at_node(), and libMesh::FEType::order.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_indices(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_indices(), libMesh::DofMap::constrain_p_dofs(), n_dofs_at_node(), n_dofs_at_node(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node(), n_dofs_at_node(), n_dofs_at_node_function(), n_dofs_at_node_function(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()(), and FEOrientationTestBase< order, family >::test_orientation_determines_shapes().

◆ n_dofs_at_node_function() [1/2]

FEInterface::n_dofs_at_node_ptr libMesh::FEInterface::n_dofs_at_node_function ( const FEType &  fe_t,
const Elem *  elem 
)
static
Returns
A function which evaluates n_dofs_at_node for the requested FE type and element.

Definition at line 474 of file fe_interface.C.

476{
477 // dim is required by the fe_with_vec_switch macro
478 auto dim = elem->dim();
479
480 fe_with_vec_switch(n_dofs_at_node);
481}

References dim, libMesh::Elem::dim(), and n_dofs_at_node().

◆ n_dofs_at_node_function() [2/2]

FEInterface::n_dofs_at_node_ptr libMesh::FEInterface::n_dofs_at_node_function ( const unsigned int  dim,
const FEType &  fe_t 
)
static
Deprecated:
Use the version of this function that takes an Elem* for consistency. The behavior is otherwise exactly the same, since this function does not depend on the Elem::p_level().

Definition at line 462 of file fe_interface.C.

464{
465 libmesh_deprecated();
466
467 fe_with_vec_switch(n_dofs_at_node);
468}

References n_dofs_at_node().

Referenced by libMesh::DofMap::_dof_indices().

◆ n_dofs_per_elem() [1/3]

unsigned int libMesh::FEInterface::n_dofs_per_elem ( const FEType &  fe_t,
const Elem *  elem,
const bool  add_p_level = true 
)
static
Returns
The number of dofs interior to the element, not associated with any interior nodes. Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 556 of file fe_interface.C.

559{
560 // dim is required by the fe_with_vec_switch macro
561 auto dim = elem->dim();
562
563#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
564
565 if (is_InfFE_elem(elem->type()))
566 return ifem_n_dofs_per_elem(fe_t, elem);
567
568#endif
569
570 // Account for Elem::p_level() when computing total_order
571 auto total_order = fe_t.order + add_p_level*elem->p_level();
572
573 fe_with_vec_switch(n_dofs_per_elem(*elem, total_order));
574}
static unsigned int ifem_n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)

References dim, libMesh::Elem::dim(), ifem_n_dofs_per_elem(), is_InfFE_elem(), n_dofs_per_elem(), libMesh::FEType::order, libMesh::Elem::p_level(), and libMesh::Elem::type().

◆ n_dofs_per_elem() [2/3]

unsigned int libMesh::FEInterface::n_dofs_per_elem ( const FEType &  fe_t,
const int  extra_order,
const Elem *  elem 
)
static

Same thing but internally elem->p_level() is ignored and extra_order is used instead.

Definition at line 579 of file fe_interface.C.

582{
583 // dim is required by the fe_with_vec_switch macro
584 auto dim = elem->dim();
585
586#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
587
588 if (is_InfFE_elem(elem->type()))
589 return ifem_n_dofs_per_elem(fe_t, elem);
590
591#endif
592
593 // Ignore Elem::p_level() and instead use extra_order to compute total_order.
594 auto total_order = fe_t.order + extra_order;
595
596 fe_with_vec_switch(n_dofs_per_elem(*elem, total_order));
597}

References dim, libMesh::Elem::dim(), ifem_n_dofs_per_elem(), is_InfFE_elem(), n_dofs_per_elem(), libMesh::FEType::order, and libMesh::Elem::type().

◆ n_dofs_per_elem() [3/3]

unsigned int libMesh::FEInterface::n_dofs_per_elem ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t 
)
static

◆ n_shape_functions() [1/3]

unsigned int libMesh::FEInterface::n_shape_functions ( const FEType &  fe_t,
const Elem *  elem,
const bool  add_p_level = true 
)
static
Returns
The number of shape functions associated with this finite element elem of type fe_t. Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 300 of file fe_interface.C.

303{
304 // dim is required by the fe_with_vec_switch macro
305 auto dim = elem->dim();
306
307#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
308 /*
309 * Since the FEType, stored in DofMap/(some System child), has to
310 * be the _same_ for InfFE and FE, we have to catch calls
311 * to infinite elements through the element type.
312 */
313
314 if (is_InfFE_elem(elem->type()))
315 return ifem_n_shape_functions(fe_t, elem);
316
317#endif
318
319 // Account for Elem::p_level() when computing total_order
320 auto total_order = fe_t.order + add_p_level*elem->p_level();
321
322 fe_with_vec_switch(n_dofs(elem, total_order));
323}
static unsigned int ifem_n_shape_functions(const FEType &fe_t, const Elem *elem)

References dim, libMesh::Elem::dim(), ifem_n_shape_functions(), is_InfFE_elem(), n_dofs(), libMesh::FEType::order, libMesh::Elem::p_level(), and libMesh::Elem::type().

◆ n_shape_functions() [2/3]

unsigned int libMesh::FEInterface::n_shape_functions ( const FEType &  fe_t,
const int  extra_order,
const Elem *  elem 
)
static

Same as above, but ignores the elem->p_level() and uses the specified extra_order instead.

Definition at line 328 of file fe_interface.C.

331{
332 // dim is required by the fe_with_vec_switch macro
333 auto dim = elem->dim();
334
335#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
336 /*
337 * Since the FEType, stored in DofMap/(some System child), has to
338 * be the _same_ for InfFE and FE, we have to catch calls
339 * to infinite elements through the element type.
340 */
341
342 if (is_InfFE_elem(elem->type()))
343 return ifem_n_shape_functions(fe_t, elem);
344
345#endif
346
347 // Ignore Elem::p_level() and instead use extra_order to compute total_order.
348 auto total_order = fe_t.order + extra_order;
349
350 fe_with_vec_switch(n_dofs(elem, total_order));
351}

References dim, libMesh::Elem::dim(), ifem_n_shape_functions(), is_InfFE_elem(), n_dofs(), libMesh::FEType::order, and libMesh::Elem::type().

◆ n_shape_functions() [3/3]

unsigned int libMesh::FEInterface::n_shape_functions ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t 
)
static
Deprecated:
Call the version of this function taking an Elem* instead.

Definition at line 275 of file fe_interface.C.

278{
279 libmesh_deprecated();
280
281#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
282
283 // We no longer support calling this function with an infinite
284 // ElemType, you must call the FeInterface::n_shape_functions()
285 // taking an Elem* instead.
286 if (is_InfFE_elem(t))
287 libmesh_not_implemented();
288
289#endif
290
291 const Order o = fe_t.order;
292
293 fe_with_vec_switch(n_shape_functions(t, o));
294}
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)

References is_InfFE_elem(), n_shape_functions(), and libMesh::FEType::order.

Referenced by libMesh::FEMap::compute_face_map(), libMesh::FEMap::init_face_shape_functions(), libMesh::FEMap::init_reference_to_physical_map(), libMesh::l2_lagrange_gll_nodal_soln(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::FEMap::map(), libMesh::FEMap::map_deriv(), n_shape_functions(), libMesh::rational_fe_shape(), libMesh::rational_fe_shape_deriv(), libMesh::rational_fe_shape_second_deriv(), libMesh::rational_fe_weighted_shapes(), libMesh::rational_fe_weighted_shapes_derivs(), FEGLLLagrangeAgreementTest< elem_type, order >::testAgreesWithLagrange(), and FETest< order, family, elem_type, CaseName >::testFEInterface().

◆ n_vec_dim()

unsigned int libMesh::FEInterface::n_vec_dim ( const MeshBase &  mesh,
const FEType &  fe_type 
)
static
Returns
The number of components of a vector-valued element. Scalar-valued elements return 1.

Definition at line 2704 of file fe_interface.C.

2706{
2707 // We assume the number of vector components is the mesh spatial dimension.
2708 return field_type(fe_type.family) == TYPE_VECTOR ? mesh.spatial_dimension() : 1;
2709}

References libMesh::FEType::family, field_type(), mesh, and libMesh::TYPE_VECTOR.

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::EquationSystems::build_variable_names(), libMesh::Variable::n_components(), libMesh::Nemesis_IO_Helper::write_element_values(), and libMesh::Nemesis_IO_Helper::write_nodal_solution().

◆ nodal_soln()

void libMesh::FEInterface::nodal_soln ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const std::vector< Number > &  elem_soln,
std::vector< Number > &  nodal_soln,
const bool  add_p_level = true,
const unsigned int  vdim = 1 
)
static

Build the nodal soln from the element soln.

This is the solution that will be plotted. Automatically passes the request to the appropriate finite element class member. To indicate that results from this specific implementation of nodal_soln should not be used, the vector nodal_soln is returned empty.

Note
On a p-refined element, fe_t.order should be the base order of the element. The Elem::p_level(), if any, is accounted for internally by this routine.
Todo:
For consistency with other FEInterface routines, this function should be updated so that it does not take a dim argument.

Definition at line 629 of file fe_interface.C.

636{
637#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
638
639 if (is_InfFE_elem(elem->type()))
640 {
641 ifem_nodal_soln(dim, fe_t, elem, elem_soln, nodal_soln);
642 return;
643 }
644
645#endif
646
647 const Order order = fe_t.order;
648
649 void_fe_with_vec_switch(nodal_soln(elem, order, elem_soln, nodal_soln, add_p_level, vdim));
650}
static void ifem_nodal_soln(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)

References dim, ifem_nodal_soln(), is_InfFE_elem(), nodal_soln(), libMesh::FEType::order, and libMesh::Elem::type().

Referenced by libMesh::EquationSystems::build_parallel_solution_vector(), ifem_nodal_soln(), nodal_soln(), side_nodal_soln(), FETest< order, family, elem_type, CaseName >::testNodalSoln(), libMesh::Nemesis_IO_Helper::write_nodal_solution(), libMesh::EnsightIO::write_scalar_ascii(), and libMesh::EnsightIO::write_vector_ascii().

◆ on_reference_element()

bool libMesh::FEInterface::on_reference_element ( const Point &  p,
const ElemType  t,
const Real  eps = TOLERANCE 
)
static
Returns
true if the point p is located on the reference element for element type t, false otherwise.

Since we are doing floating point comparisons, the parameter eps can be specified to indicate a tolerance. For example, \( \xi \le 1 \) becomes \( \xi \le 1 + \epsilon \).

Deprecated:
This method overload does not support all finite element types; e.g. the reference element for an arbitrary polygon or polyhedron type may differ from element to element. Use Elem::on_reference_element() instead.

Definition at line 755 of file fe_interface.C.

758{
759 return FEBase::on_reference_element(p,t,eps);
760}

References libMesh::FEAbstract::on_reference_element().

◆ orientation_dependent()

bool libMesh::FEInterface::orientation_dependent ( const FEFamily &  fe_family)
static
Returns
Whether the element's shape functions are orientation-dependent.

Definition at line 2685 of file fe_interface.C.

2686{
2687 switch (fe_family)
2688 {
2689 case HIERARCHIC:
2690 case L2_HIERARCHIC:
2691 case HIERARCHIC_VEC:
2692 case L2_HIERARCHIC_VEC:
2693 case BERNSTEIN:
2694 case RATIONAL_BERNSTEIN:
2695 case SZABAB:
2696 case NEDELEC_ONE:
2697 case RAVIART_THOMAS:
2698 return true;
2699 default:
2700 return false;
2701 }
2702}

References libMesh::BERNSTEIN, libMesh::HIERARCHIC, libMesh::HIERARCHIC_VEC, libMesh::L2_HIERARCHIC, libMesh::L2_HIERARCHIC_VEC, libMesh::NEDELEC_ONE, libMesh::RATIONAL_BERNSTEIN, libMesh::RAVIART_THOMAS, and libMesh::SZABAB.

Referenced by libMesh::FE< Dim, T >::cache(), and libMesh::FE< Dim, T >::matches_cache().

◆ shape() [1/16]

Real libMesh::FEInterface::shape ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
const bool  add_p_level = true 
)
static
Returns
The value of the \( i^{th} \) shape function at point p.

Non-deprecated version of the shape() function. The Elem::p_level() is accounted for internally if add_p_level

Definition at line 808 of file fe_interface.C.

813{
814 // dim is required by the fe_switch macro
815 auto dim = elem->dim();
816
817#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
818
819 if (elem && is_InfFE_elem(elem->type()))
820 return ifem_shape(fe_t, elem, i, p);
821
822#endif
823
824 // We are calling
825 //
826 // FE<X,Y>::shape(Elem *, Order, unsigned, Point, true)
827 //
828 // See fe.h for more details.
829 fe_switch(shape(elem, fe_t.order, i, p, add_p_level));
830}
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)

References dim, libMesh::Elem::dim(), ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

◆ shape() [2/16]

template<typename OutputType >
static void libMesh::FEInterface::shape ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
OutputType &  phi 
)
static
Returns
The value of the \( i^{th} \) shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate scalar finite element class member.

Non-deprecated version of templated shape() function that accounts for Elem::p_level() internally.

◆ shape() [3/16]

template<>
void libMesh::FEInterface::shape ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
Real &  phi 
)
static

Definition at line 957 of file fe_interface.C.

962{
963 // dim is required by the fe_switch macro
964 auto dim = elem->dim();
965
966#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
967
968 if (is_InfFE_elem(elem->type()))
969 {
970 phi = ifem_shape(fe_t, elem, i, p);
971 return;
972 }
973
974#endif
975
976 // Below we call FE<X,Y>::shape(Elem *, Order, unsigned, Point, true)
977 // so that the Elem::p_level() is accounted for internally.
978 switch(dim)
979 {
980 case 0:
981 fe_scalar_vec_error_switch(0, shape(elem, fe_t.order, i, p, true), phi = , ; break;);
982 break;
983 case 1:
984 fe_scalar_vec_error_switch(1, shape(elem, fe_t.order, i, p, true), phi = , ; break;);
985 break;
986 case 2:
987 fe_scalar_vec_error_switch(2, shape(elem, fe_t.order, i, p, true), phi = , ; break;);
988 break;
989 case 3:
990 fe_scalar_vec_error_switch(3, shape(elem, fe_t.order, i, p, true), phi = , ; break;);
991 break;
992 default:
993 libmesh_error_msg("Invalid dimension = " << dim);
994 }
995}

References dim, libMesh::Elem::dim(), ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

◆ shape() [4/16]

template<>
void libMesh::FEInterface::shape ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
RealGradient &  phi 
)
static

Definition at line 1181 of file fe_interface.C.

1186{
1187 // This API does not currently support infinite elements.
1188#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1189 if (is_InfFE_elem(elem->type()))
1190 {
1191 libmesh_not_implemented();
1192 }
1193#endif
1194
1195 auto dim = elem->dim();
1196
1197 // We are calling
1198 //
1199 // FE<X,Y>::shape(Elem *, Order, unsigned, Point, true)
1200 //
1201 // with the last parameter set to "true" so that the Elem::p_level()
1202 // is accounted for internally. See fe.h for more details.
1203
1204 switch(dim)
1205 {
1206 case 0:
1207 fe_vector_scalar_error_switch(0, shape(elem, fe_t.order, i, p, true), phi = , ; break;);
1208 break;
1209 case 1:
1210 fe_vector_scalar_error_switch(1, shape(elem, fe_t.order, i, p, true), phi = , ; break;);
1211 break;
1212 case 2:
1213 fe_vector_scalar_error_switch(2, shape(elem, fe_t.order, i, p, true), phi = , ; break;);
1214 break;
1215 case 3:
1216 fe_vector_scalar_error_switch(3, shape(elem, fe_t.order, i, p, true), phi = , ; break;);
1217 break;
1218 default:
1219 libmesh_error_msg("Invalid dimension = " << dim);
1220 }
1221}

References dim, libMesh::Elem::dim(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

◆ shape() [5/16]

Real libMesh::FEInterface::shape ( const FEType &  fe_t,
int  extra_order,
const Elem *  elem,
const unsigned int  i,
const Point &  p 
)
static
Returns
The value of the \( i^{th} \) shape function at point p.

Non-deprecated version of the shape() function. The Elem::p_level() is ignored and extra_order is used instead.

Definition at line 835 of file fe_interface.C.

840{
841 // dim is required by the fe_switch macro
842 auto dim = elem->dim();
843
844#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
845
846 if (elem && is_InfFE_elem(elem->type()))
847 return ifem_shape(fe_t, elem, i, p);
848
849#endif
850
851 // We are calling
852 //
853 // FE<X,Y>::shape(Elem *, Order, unsigned, Point, false)
854 //
855 // with the last parameter set to "false" so that the
856 // Elem::p_level() is not used internally and the "total_order" that
857 // we compute is used instead. See fe.h for more details.
858 auto total_order = fe_t.order + extra_order;
859
860 fe_switch(shape(elem, total_order, i, p, false));
861}

References dim, libMesh::Elem::dim(), ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

◆ shape() [6/16]

template<typename OutputType >
static void libMesh::FEInterface::shape ( const FEType &  fe_t,
int  extra_order,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
OutputType &  phi 
)
static
Returns
The value of the \( i^{th} \) shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate scalar finite element class member.

Non-deprecated version of templated shape() function that ignores Elem::p_level() and instead uses extra_order internally.

◆ shape() [7/16]

template<>
void libMesh::FEInterface::shape ( const FEType &  fe_t,
int  extra_order,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
Real &  phi 
)
static

Definition at line 1000 of file fe_interface.C.

1006{
1007 // dim is required by the fe_switch macro
1008 auto dim = elem->dim();
1009
1010#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1011
1012 if (is_InfFE_elem(elem->type()))
1013 {
1014 phi = ifem_shape(fe_t, elem, i, p);
1015 return;
1016 }
1017
1018#endif
1019
1020 // Ignore Elem::p_level() and instead use extra_order to compute total_order
1021 auto total_order = fe_t.order + extra_order;
1022
1023 // Below we call
1024 //
1025 // FE<X,Y>::shape(Elem *, Order, unsigned, Point, false)
1026 //
1027 // so that the Elem::p_level() is ignored and the total_order that
1028 // we compute is used instead.
1029 switch(dim)
1030 {
1031 case 0:
1032 fe_scalar_vec_error_switch(0, shape(elem, total_order, i, p, false), phi = , ; break;);
1033 break;
1034 case 1:
1035 fe_scalar_vec_error_switch(1, shape(elem, total_order, i, p, false), phi = , ; break;);
1036 break;
1037 case 2:
1038 fe_scalar_vec_error_switch(2, shape(elem, total_order, i, p, false), phi = , ; break;);
1039 break;
1040 case 3:
1041 fe_scalar_vec_error_switch(3, shape(elem, total_order, i, p, false), phi = , ; break;);
1042 break;
1043 default:
1044 libmesh_error_msg("Invalid dimension = " << dim);
1045 }
1046}

References dim, libMesh::Elem::dim(), ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

◆ shape() [8/16]

template<>
void libMesh::FEInterface::shape ( const FEType &  fe_t,
int  extra_order,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
RealGradient &  phi 
)
static

Definition at line 1226 of file fe_interface.C.

1232{
1233 // This API does not currently support infinite elements.
1234#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1235 if (is_InfFE_elem(elem->type()))
1236 {
1237 libmesh_not_implemented();
1238 }
1239#endif
1240
1241 auto dim = elem->dim();
1242
1243 // We are calling
1244 //
1245 // FE<X,Y>::shape(Elem *, Order, unsigned, Point, false)
1246 //
1247 // with the last parameter set to "false" so that the
1248 // Elem::p_level() is not used internally and the "total_order" that
1249 // we compute is used instead. See fe.h for more details.
1250 auto total_order = fe_t.order + extra_order;
1251
1252 switch(dim)
1253 {
1254 case 0:
1255 fe_vector_scalar_error_switch(0, shape(elem, total_order, i, p, false), phi = , ; break;);
1256 break;
1257 case 1:
1258 fe_vector_scalar_error_switch(1, shape(elem, total_order, i, p, false), phi = , ; break;);
1259 break;
1260 case 2:
1261 fe_vector_scalar_error_switch(2, shape(elem, total_order, i, p, false), phi = , ; break;);
1262 break;
1263 case 3:
1264 fe_vector_scalar_error_switch(3, shape(elem, total_order, i, p, false), phi = , ; break;);
1265 break;
1266 default:
1267 libmesh_error_msg("Invalid dimension = " << dim);
1268 }
1269}

References dim, libMesh::Elem::dim(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

◆ shape() [9/16]

Real libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p 
)
static
Returns
The value of the \( i^{th} \) shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate finite element class member.
Note
On a p-refined element, fe_t.order should be the base order of the element.
Deprecated:
Use the version of this function that accounts for Elem::p_level() internally or the version which takes an extra_order parameter.

Definition at line 784 of file fe_interface.C.

789{
790 libmesh_deprecated();
791
792#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
793
794 if (elem && is_InfFE_elem(elem->type()))
795 return ifem_shape(fe_t, elem, i, p);
796
797#endif
798
799 const Order o = fe_t.order;
800
801 fe_switch(shape(elem,o,i,p));
802}

References ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

◆ shape() [10/16]

template<typename OutputType >
static void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
OutputType &  phi 
)
static
Returns
The value of the \( i^{th} \) shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate scalar finite element class member.
Note
On a p-refined element, fe_t.order should be the total order of the element.
Deprecated:
Use the version of this function that accounts for Elem::p_level() internally or the version which takes an extra_order parameter.

◆ shape() [11/16]

template<>
void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
Real &  phi 
)
static

Definition at line 912 of file fe_interface.C.

918{
919 libmesh_deprecated();
920
921#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
922
923 if (elem && is_InfFE_elem(elem->type()))
924 {
925 phi = ifem_shape(fe_t, elem, i, p);
926 return;
927 }
928#endif
929
930 const Order o = fe_t.order;
931
932 switch(dim)
933 {
934 case 0:
935 fe_scalar_vec_error_switch(0, shape(elem,o,i,p), phi = , ; break;);
936 break;
937 case 1:
938 fe_scalar_vec_error_switch(1, shape(elem,o,i,p), phi = , ; break;);
939 break;
940 case 2:
941 fe_scalar_vec_error_switch(2, shape(elem,o,i,p), phi = , ; break;);
942 break;
943 case 3:
944 fe_scalar_vec_error_switch(3, shape(elem,o,i,p), phi = , ; break;);
945 break;
946 default:
947 libmesh_error_msg("Invalid dimension = " << dim);
948 }
949
950 return;
951}

References dim, ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

◆ shape() [12/16]

template<>
void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const Point &  p,
RealGradient &  phi 
)
static

Definition at line 1855 of file fe_interface.C.

1861{
1862 libmesh_deprecated();
1863
1864 // This is actually an issue for infinite elements: They require type 'Gradient'!
1865 if (elem->infinite())
1866 libmesh_not_implemented();
1867
1868 const Order o = fe_t.order;
1869
1870 switch(dim)
1871 {
1872 case 0:
1873 fe_vector_scalar_error_switch(0, shape(elem,o,i,p), phi = , ; break;);
1874 break;
1875 case 1:
1876 fe_vector_scalar_error_switch(1, shape(elem,o,i,p), phi = , ; break;);
1877 break;
1878 case 2:
1879 fe_vector_scalar_error_switch(2, shape(elem,o,i,p), phi = , ; break;);
1880 break;
1881 case 3:
1882 fe_vector_scalar_error_switch(3, shape(elem,o,i,p), phi = , ; break;);
1883 break;
1884 default:
1885 libmesh_error_msg("Invalid dimension = " << dim);
1886 }
1887
1888 return;
1889}

References dim, libMesh::Elem::infinite(), libMesh::FEType::order, and shape().

◆ shape() [13/16]

Real libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  i,
const Point &  p 
)
static
Returns
The value of the \( i^{th} \) shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate finite element class member.
Note
On a p-refined element, fe_t.order should be the total order of the element.
Deprecated:
Use the version of this function that accounts for Elem::p_level() internally or the version which takes an extra_order parameter.

Definition at line 764 of file fe_interface.C.

769{
770 libmesh_deprecated();
771
772#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
773
774 if (is_InfFE_elem(t))
775 return ifem_shape(dim, fe_t, t, i, p);
776
777#endif
778
779 const Order o = fe_t.order;
780
781 fe_switch(shape(t,o,i,p));
782}

References dim, ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, and shape().

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), compute_data(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), ifem_shape(), ifem_shape(), ifem_shape(), libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_constraints(), libMesh::l2_lagrange_gll_nodal_soln(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), main(), libMesh::HDivFETransformation< OutputShape >::map_dphi(), libMesh::HCurlFETransformation< OutputShape >::map_phi(), libMesh::HDivFETransformation< OutputShape >::map_phi(), libMesh::rational_fe_shape(), libMesh::rational_fe_shape_deriv(), libMesh::rational_fe_shape_second_deriv(), shape(), shape(), shape(), shape(), shape(), shape(), libMesh::InfFE< Dim, T_radial, T_map >::shape(), libMesh::InfFE< Dim, T_radial, T_map >::shape(), shape(), shape(), shape(), shape(), shape(), shape(), libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv(), libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv(), shape_function(), FEOrientationTestBase< order, family >::shapes(), NavierSystem::side_constraint(), FEOrientationTestBase< order, family >::test_conformity_across_sides(), FEGLLLagrangeAgreementTest< elem_type, order >::testAgreesWithLagrange(), and FETest< order, family, elem_type, CaseName >::testNodalSoln().

◆ shape() [14/16]

template<typename OutputType >
static void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  i,
const Point &  p,
OutputType &  phi 
)
static
Returns
The value of the \( i^{th} \) shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate scalar finite element class member.
Note
On a p-refined element, fe_t.order should be the total order of the element.
Deprecated:
Use the version of this function that accounts for Elem::p_level() internally or the version which takes an extra_order parameter.

◆ shape() [15/16]

template<>
void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  i,
const Point &  p,
Real &  phi 
)
static

Definition at line 867 of file fe_interface.C.

873{
874 libmesh_deprecated();
875
876#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
877
878 if (is_InfFE_elem(t))
879 {
880 phi = ifem_shape(dim, fe_t, t, i, p);
881 return;
882 }
883
884#endif
885
886 const Order o = fe_t.order;
887
888 switch(dim)
889 {
890 case 0:
891 fe_scalar_vec_error_switch(0, shape(t,o,i,p), phi = , ; break;);
892 break;
893 case 1:
894 fe_scalar_vec_error_switch(1, shape(t,o,i,p), phi = , ; break;);
895 break;
896 case 2:
897 fe_scalar_vec_error_switch(2, shape(t,o,i,p), phi = , ; break;);
898 break;
899 case 3:
900 fe_scalar_vec_error_switch(3, shape(t,o,i,p), phi = , ; break;);
901 break;
902 default:
903 libmesh_error_msg("Invalid dimension = " << dim);
904 }
905
906 return;
907}

References dim, ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, and shape().

◆ shape() [16/16]

template<>
void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  i,
const Point &  p,
RealGradient &  phi 
)
static

Definition at line 1140 of file fe_interface.C.

1146{
1147 libmesh_deprecated();
1148
1149 // This API does not currently support infinite elements.
1150#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1151 if (is_InfFE_elem(t))
1152 {
1153 libmesh_not_implemented();
1154 }
1155#endif
1156 const Order o = fe_t.order;
1157
1158 switch(dim)
1159 {
1160 case 0:
1161 fe_vector_scalar_error_switch(0, shape(t,o,i,p), phi = , ; break;);
1162 break;
1163 case 1:
1164 fe_vector_scalar_error_switch(1, shape(t,o,i,p), phi = , ; break;);
1165 break;
1166 case 2:
1167 fe_vector_scalar_error_switch(2, shape(t,o,i,p), phi = , ; break;);
1168 break;
1169 case 3:
1170 fe_vector_scalar_error_switch(3, shape(t,o,i,p), phi = , ; break;);
1171 break;
1172 default:
1173 libmesh_error_msg("Invalid dimension = " << dim);
1174 }
1175}

References dim, is_InfFE_elem(), libMesh::FEType::order, and shape().

◆ shape_deriv() [1/4]

Real libMesh::FEInterface::shape_deriv ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static
Returns
The \( j^{th} \) coordinate of the gradient of the \( i^{th} \) shape function at point p. This method allows you to specify the dimension, element, and order directly. Automatically passes the request to the appropriate scalar finite element class member.
Note
On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 1447 of file fe_interface.C.

1452{
1453 auto dim = elem->dim();
1454
1455 libmesh_assert_greater (dim, j);
1456#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1457
1458 if (is_InfFE_elem(elem->type())){
1459 return ifem_shape_deriv(fe_t, elem, i, j, p);
1460 }
1461
1462#endif
1463
1464 // Account for Elem::p_level() when computing total order. Note: we are calling
1465 // FE::shape_deriv() with the final argument == true so that the Elem::p_level()
1466 // is accounted for automatically internally.
1467 fe_switch(shape_deriv(elem, fe_t.order, i, j, p, true));
1468
1469 // We'll never get here
1470 return 0;
1471}
static Real ifem_shape_deriv(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const unsigned int j, const Point &p)

References dim, libMesh::Elem::dim(), ifem_shape_deriv(), is_InfFE_elem(), libMesh::FEType::order, shape_deriv(), and libMesh::Elem::type().

◆ shape_deriv() [2/4]

Real libMesh::FEInterface::shape_deriv ( const FEType &  fe_t,
int  extra_order,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static

Non-deprecated version of function above.

Definition at line 1475 of file fe_interface.C.

1481{
1482 auto dim = elem->dim();
1483
1484 libmesh_assert_greater (dim, j);
1485#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1486
1487 if (elem->infinite()){
1488 return ifem_shape_deriv(fe_t, elem, i, j, p);
1489 }
1490
1491#endif
1492
1493 // Ignore Elem::p_level() when computing total order, use
1494 // extra_order instead.
1495 auto total_order = fe_t.order + extra_order;
1496
1497 // We call shape_deriv() with the final argument == false so that
1498 // the Elem::p_level() is ignored internally.
1499 switch(dim)
1500 {
1501 case 0:
1502 fe_family_switch (0, shape_deriv(elem, total_order, i, j, p, false), return , ;);
1503 case 1:
1504 fe_family_switch (1, shape_deriv(elem, total_order, i, j, p, false), return , ;);
1505 case 2:
1506 fe_family_switch (2, shape_deriv(elem, total_order, i, j, p, false), return , ;);
1507 case 3:
1508 fe_family_switch (3, shape_deriv(elem, total_order, i, j, p, false), return , ;);
1509 default:
1510 libmesh_error_msg("Invalid dimension = " << dim);
1511 }
1512
1513 // We'll never get here
1514 return 0;
1515}

References dim, libMesh::Elem::dim(), ifem_shape_deriv(), libMesh::Elem::infinite(), libMesh::FEType::order, and shape_deriv().

◆ shape_deriv() [3/4]

Real libMesh::FEInterface::shape_deriv ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static
Deprecated:
Call the version of this function taking an Elem* instead.

Definition at line 1408 of file fe_interface.C.

1414{
1415 libmesh_deprecated();
1416
1417 libmesh_assert_greater (dim,j);
1418#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1419
1420 if (elem->infinite()){
1421 return ifem_shape_deriv(fe_t, elem, i, j, p);
1422 }
1423
1424#endif
1425
1426 const Order o = fe_t.order;
1427
1428 switch(dim)
1429 {
1430 case 0:
1431 fe_family_switch (0, shape_deriv(elem, o, i, j, p), return , ;);
1432 case 1:
1433 fe_family_switch (1, shape_deriv(elem, o, i, j, p), return , ;);
1434 case 2:
1435 fe_family_switch (2, shape_deriv(elem, o, i, j, p), return , ;);
1436 case 3:
1437 fe_family_switch (3, shape_deriv(elem, o, i, j, p), return , ;);
1438 default:
1439 libmesh_error_msg("Invalid dimension = " << dim);
1440 }
1441 return 0;
1442}

References dim, ifem_shape_deriv(), libMesh::Elem::infinite(), libMesh::FEType::order, and shape_deriv().

◆ shape_deriv() [4/4]

Real libMesh::FEInterface::shape_deriv ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static
Returns
The \( j^{th} \) coordinate of the gradient of the \( i^{th} \) shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate scalar finite element class member.
Note
On a p-refined element, fe_t.order should be the total order of the element.
Deprecated:
Call the version of this function taking an Elem* instead.

Definition at line 1384 of file fe_interface.C.

1390{
1391 libmesh_deprecated();
1392
1393 libmesh_assert_greater (dim,j);
1394#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1395
1396 if (is_InfFE_elem(t)){
1397 return ifem_shape_deriv(dim, fe_t, t, i, j, p);
1398 }
1399
1400#endif
1401
1402 const Order o = fe_t.order;
1403 fe_switch(shape_deriv(t,o,i,j,p));
1404 return 0;
1405}

References dim, ifem_shape_deriv(), is_InfFE_elem(), libMesh::FEType::order, and shape_deriv().

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), compute_data(), ifem_shape_deriv(), ifem_shape_deriv(), ifem_shape_deriv(), libMesh::rational_fe_shape_deriv(), libMesh::rational_fe_shape_second_deriv(), shape_deriv(), shape_deriv(), libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv(), libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv(), shape_deriv(), shape_deriv(), and shape_deriv_function().

◆ shape_deriv_function() [1/2]

FEInterface::shape_deriv_ptr libMesh::FEInterface::shape_deriv_function ( const FEType &  fe_t,
const Elem *  elem 
)
static

Non-deprecated version of the function above.

Definition at line 1654 of file fe_interface.C.

1656{
1657 // dim is needed by the fe_switch macros below
1658 auto dim = elem->dim();
1659
1660#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1661 if (is_InfFE_elem(elem->type()))
1662 {
1663 inf_fe_switch(shape_deriv);
1664 }
1665#endif
1666 fe_switch(shape_deriv);
1667}

References dim, libMesh::Elem::dim(), is_InfFE_elem(), shape_deriv(), and libMesh::Elem::type().

◆ shape_deriv_function() [2/2]

static shape_deriv_ptr libMesh::FEInterface::shape_deriv_function ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t 
)
static
Returns
A function which evaluates shape for the requested FE type and dimension.
Deprecated:
Call the version of this function taking an Elem * instead.

Referenced by libMesh::FEMap::init_face_shape_functions(), libMesh::FEMap::init_reference_to_physical_map(), and libMesh::FEMap::map_deriv().

◆ shape_derivs() [1/3]

template<typename OutputType >
static void libMesh::FEInterface::shape_derivs ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const std::vector< Point > &  p,
std::vector< OutputType > &  dphi,
const bool  add_p_level = true 
)
static

Fills dphi with the derivatives of the \( i^{th} \) shape function at point p in direction j.

Referenced by libMesh::rational_fe_weighted_shapes_derivs(), shape_derivs(), and shape_derivs().

◆ shape_derivs() [2/3]

template<>
void libMesh::FEInterface::shape_derivs ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const std::vector< Point > &  p,
std::vector< Real > &  dphi,
const bool  add_p_level 
)
static

Definition at line 1520 of file fe_interface.C.

1527{
1528 const Order o = fe_t.order;
1529
1530 switch(elem->dim())
1531 {
1532 case 0:
1533 fe_scalar_vec_error_switch(0, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1534 break;
1535 case 1:
1536 fe_scalar_vec_error_switch(1, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1537 break;
1538 case 2:
1539 fe_scalar_vec_error_switch(2, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1540 break;
1541 case 3:
1542 fe_scalar_vec_error_switch(3, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1543 break;
1544 default:
1545 libmesh_error_msg("Invalid dimension = " << elem->dim());
1546 }
1547
1548 return;
1549}

References libMesh::Elem::dim(), libMesh::FEType::order, and shape_derivs().

◆ shape_derivs() [3/3]

template<>
void libMesh::FEInterface::shape_derivs ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const std::vector< Point > &  p,
std::vector< RealGradient > &  dphi,
const bool  add_p_level 
)
static

Definition at line 1600 of file fe_interface.C.

1607{
1608 const Order o = fe_t.order;
1609
1610 switch(elem->dim())
1611 {
1612 case 0:
1613 fe_vector_scalar_error_switch(0, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1614 break;
1615 case 1:
1616 fe_vector_scalar_error_switch(1, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1617 break;
1618 case 2:
1619 fe_vector_scalar_error_switch(2, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1620 break;
1621 case 3:
1622 fe_vector_scalar_error_switch(3, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1623 break;
1624 default:
1625 libmesh_error_msg("Invalid dimension = " << elem->dim());
1626 }
1627
1628 return;
1629}

References libMesh::Elem::dim(), libMesh::FEType::order, and shape_derivs().

◆ shape_function() [1/2]

FEInterface::shape_ptr libMesh::FEInterface::shape_function ( const FEType &  fe_t,
const Elem *  elem 
)
static
Returns
A function which evaluates shape for the requested FE type and element.

Definition at line 1368 of file fe_interface.C.

1370{
1371 // dim is needed by the fe_switch macros below
1372 auto dim = elem->dim();
1373
1374#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1375 if (is_InfFE_elem(elem->type()))
1376 inf_fe_switch(shape);
1377#endif
1378 fe_switch(shape);
1379}

References dim, libMesh::Elem::dim(), is_InfFE_elem(), shape(), and libMesh::Elem::type().

◆ shape_function() [2/2]

static shape_ptr libMesh::FEInterface::shape_function ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t 
)
static
Deprecated:
Call the version of this function taking an Elem* instead.

Referenced by libMesh::FEMap::init_face_shape_functions(), and libMesh::FEMap::map().

◆ shape_second_deriv() [1/4]

Real libMesh::FEInterface::shape_second_deriv ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static
Returns
The second \( j^{th} \) derivative of the \( i^{th} \) shape function at the point p.
Note
Cross-derivatives are indexed according to: j = 0 ==> d^2 phi / dxi^2 j = 1 ==> d^2 phi / dxi deta j = 2 ==> d^2 phi / deta^2 j = 3 ==> d^2 phi / dxi dzeta j = 4 ==> d^2 phi / deta dzeta j = 5 ==> d^2 phi / dzeta^2
On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 1741 of file fe_interface.C.

1746{
1747 auto dim = elem->dim();
1748
1749 libmesh_assert_greater_equal (dim*(dim-1),j);
1750#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1751 if (is_InfFE_elem(elem->type()))
1752 libmesh_not_implemented();
1753#endif
1754
1755 // We are calling FE::shape_second_deriv() with the final argument
1756 // == true so that the Elem::p_level() is accounted for
1757 // automatically internally.
1758 switch(dim)
1759 {
1760 case 0:
1761 fe_family_switch (0, shape_second_deriv(elem, fe_t.order, i, j, p, true), return , ;);
1762 case 1:
1763 fe_family_switch (1, shape_second_deriv(elem, fe_t.order, i, j, p, true), return , ;);
1764 case 2:
1765 fe_family_switch (2, shape_second_deriv(elem, fe_t.order, i, j, p, true), return , ;);
1766 case 3:
1767 fe_family_switch (3, shape_second_deriv(elem, fe_t.order, i, j, p, true), return , ;);
1768 default:
1769 libmesh_error_msg("Invalid dimension = " << dim);
1770 }
1771
1772 // We'll never get here
1773 return 0;
1774}
static Real shape_second_deriv(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const unsigned int j, const Point &p)

References dim, libMesh::Elem::dim(), is_InfFE_elem(), libMesh::FEType::order, shape_second_deriv(), and libMesh::Elem::type().

◆ shape_second_deriv() [2/4]

Real libMesh::FEInterface::shape_second_deriv ( const FEType &  fe_t,
int  extra_order,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static

Non-deprecated version of function above taking an extra_order parameter.

Definition at line 1778 of file fe_interface.C.

1784{
1785 auto dim = elem->dim();
1786
1787 libmesh_assert_greater_equal (dim*(dim-1),j);
1788
1789 if (elem->infinite())
1790 libmesh_not_implemented();
1791
1792 // Ignore Elem::p_level() when computing total order, use
1793 // extra_order instead.
1794 auto total_order = fe_t.order + extra_order;
1795
1796 // We are calling FE::shape_second_deriv() with the final argument
1797 // == false so that the Elem::p_level() is ignored and the
1798 // total_order we compute is used instead.
1799 switch(dim)
1800 {
1801 case 0:
1802 fe_family_switch (0, shape_second_deriv(elem, total_order, i, j, p, false), return , ;);
1803 case 1:
1804 fe_family_switch (1, shape_second_deriv(elem, total_order, i, j, p, false), return , ;);
1805 case 2:
1806 fe_family_switch (2, shape_second_deriv(elem, total_order, i, j, p, false), return , ;);
1807 case 3:
1808 fe_family_switch (3, shape_second_deriv(elem, total_order, i, j, p, false), return , ;);
1809 default:
1810 libmesh_error_msg("Invalid dimension = " << dim);
1811 }
1812
1813 // We'll never get here
1814 return 0;
1815}

References dim, libMesh::Elem::dim(), libMesh::Elem::infinite(), libMesh::FEType::order, and shape_second_deriv().

◆ shape_second_deriv() [3/4]

Real libMesh::FEInterface::shape_second_deriv ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static
Deprecated:
Call version of this function which does not require dim and takes an Elem * instead.

Definition at line 1706 of file fe_interface.C.

1712{
1713 libmesh_deprecated();
1714
1715 libmesh_assert_greater_equal (dim*(dim-1),j);
1716
1717 if (elem->infinite())
1718 libmesh_not_implemented();
1719
1720 const Order o = fe_t.order;
1721
1722 switch(dim)
1723 {
1724 case 0:
1725 fe_family_switch (0, shape_second_deriv(elem, o, i, j, p), return , ;);
1726 case 1:
1727 fe_family_switch (1, shape_second_deriv(elem, o, i, j, p), return , ;);
1728 case 2:
1729 fe_family_switch (2, shape_second_deriv(elem, o, i, j, p), return , ;);
1730 case 3:
1731 fe_family_switch (3, shape_second_deriv(elem, o, i, j, p), return , ;);
1732 default:
1733 libmesh_error_msg("Invalid dimension = " << dim);
1734 }
1735 return 0;
1736}

References dim, libMesh::Elem::infinite(), libMesh::FEType::order, and shape_second_deriv().

◆ shape_second_deriv() [4/4]

Real libMesh::FEInterface::shape_second_deriv ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static
Returns
The second \( j^{th} \) derivative of the \( i^{th} \) shape function at the point p.
Note
Cross-derivatives are indexed according to: j = 0 ==> d^2 phi / dxi^2 j = 1 ==> d^2 phi / dxi deta j = 2 ==> d^2 phi / deta^2 j = 3 ==> d^2 phi / dxi dzeta j = 4 ==> d^2 phi / deta dzeta j = 5 ==> d^2 phi / dzeta^2

This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate scalar finite element class member.

Note
On a p-refined element, fe_t.order should be the total order of the element.
Deprecated:
Call version of this function which does not require dim and takes an Elem * instead.

Definition at line 1672 of file fe_interface.C.

1678{
1679 libmesh_deprecated();
1680
1681 libmesh_assert_greater_equal (dim*(dim-1),j);
1682#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1683 if (is_InfFE_elem(t))
1684 libmesh_not_implemented();
1685#endif
1686
1687 const Order o = fe_t.order;
1688
1689 switch(dim)
1690 {
1691 case 0:
1692 fe_family_switch (0, shape_second_deriv(t, o, i, j, p), return , ;);
1693 case 1:
1694 fe_family_switch (1, shape_second_deriv(t, o, i, j, p), return , ;);
1695 case 2:
1696 fe_family_switch (2, shape_second_deriv(t, o, i, j, p), return , ;);
1697 case 3:
1698 fe_family_switch (3, shape_second_deriv(t, o, i, j, p), return , ;);
1699 default:
1700 libmesh_error_msg("Invalid dimension = " << dim);
1701 }
1702 return 0;
1703}

References dim, is_InfFE_elem(), libMesh::FEType::order, and shape_second_deriv().

Referenced by libMesh::rational_fe_shape_second_deriv(), shape_second_deriv(), shape_second_deriv(), shape_second_deriv(), shape_second_deriv(), and shape_second_deriv_function().

◆ shape_second_deriv_function() [1/2]

FEInterface::shape_second_deriv_ptr libMesh::FEInterface::shape_second_deriv_function ( const FEType &  fe_t,
const Elem *  elem 
)
static
Returns
A function which evaluates shape for the requested FE type and dimension.

Definition at line 1838 of file fe_interface.C.

1840{
1841 auto dim = elem->dim();
1842
1843#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1844 if (is_InfFE_elem(elem->type()))
1845 libmesh_not_implemented();
1846#endif
1847 fe_switch(shape_second_deriv);
1848}

References dim, libMesh::Elem::dim(), is_InfFE_elem(), shape_second_deriv(), and libMesh::Elem::type().

◆ shape_second_deriv_function() [2/2]

static shape_second_deriv_ptr libMesh::FEInterface::shape_second_deriv_function ( const unsigned int  dim,
const FEType &  fe_t,
const ElemType  t 
)
static
Deprecated:
Call the version of this function that takes an Elem * instead.

Referenced by libMesh::FEMap::init_face_shape_functions(), and libMesh::FEMap::init_reference_to_physical_map().

◆ shapes() [1/3]

template<typename OutputType >
static void libMesh::FEInterface::shapes ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const std::vector< Point > &  p,
std::vector< OutputType > &  phi,
const bool  add_p_level = true 
)
static

Fills phi with the values of the \( i^{th} \) shape function at point p.

This method allows you to specify the dimension, element type, and order directly.

Note
Pass true for add_p_level if you want the Elem::p_level() to be accounted for internally, pass false if you want fe_t.order to be used instead.
Todo:
To be consistent with the other non-deprecated FEInterface routines, the shapes() and all_shapes() APIs should be updated so that they do not take dim as a parameter. This is a relatively large changeset with little benefit if we go the deprecation route, so it would probably be cleaner to just break backwards compatibility... these functions seem to mainly be used internally by the library and changing them is unlikely to break application codes.

Referenced by libMesh::rational_fe_weighted_shapes(), shapes(), and shapes().

◆ shapes() [2/3]

template<>
void libMesh::FEInterface::shapes ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const std::vector< Point > &  p,
std::vector< Real > &  phi,
const bool  add_p_level 
)
static

Definition at line 1051 of file fe_interface.C.

1058{
1059#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1060
1061 if (elem && is_InfFE_elem(elem->type()))
1062 {
1063 FEType elevated = fe_t;
1064 elevated.order = fe_t.order + add_p_level * elem->p_level();
1065 for (auto qpi : index_range(p))
1066 phi[qpi] = ifem_shape(elevated, elem, i, p[qpi]);
1067 return;
1068 }
1069#endif
1070
1071 const Order o = fe_t.order;
1072
1073 switch(dim)
1074 {
1075 case 0:
1076 fe_scalar_vec_error_switch(0, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1077 break;
1078 case 1:
1079 fe_scalar_vec_error_switch(1, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1080 break;
1081 case 2:
1082 fe_scalar_vec_error_switch(2, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1083 break;
1084 case 3:
1085 fe_scalar_vec_error_switch(3, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1086 break;
1087 default:
1088 libmesh_error_msg("Invalid dimension = " << dim);
1089 }
1090
1091 return;
1092}

References dim, ifem_shape(), libMesh::index_range(), is_InfFE_elem(), libMesh::FEType::order, libMesh::Elem::p_level(), shapes(), and libMesh::Elem::type().

◆ shapes() [3/3]

template<>
void libMesh::FEInterface::shapes ( const unsigned int  dim,
const FEType &  fe_t,
const Elem *  elem,
const unsigned int  i,
const std::vector< Point > &  p,
std::vector< RealGradient > &  phi,
const bool  add_p_level 
)
static

Definition at line 1274 of file fe_interface.C.

1281{
1282 // This is actually an issue for infinite elements: They require type 'Gradient'!
1283 if (elem->infinite())
1284 libmesh_not_implemented();
1285
1286 const Order o = fe_t.order;
1287
1288 switch(dim)
1289 {
1290 case 0:
1291 fe_vector_scalar_error_switch(0, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1292 break;
1293 case 1:
1294 fe_vector_scalar_error_switch(1, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1295 break;
1296 case 2:
1297 fe_vector_scalar_error_switch(2, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1298 break;
1299 case 3:
1300 fe_vector_scalar_error_switch(3, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1301 break;
1302 default:
1303 libmesh_error_msg("Invalid dimension = " << dim);
1304 }
1305
1306 return;
1307}

References dim, libMesh::Elem::infinite(), libMesh::FEType::order, and shapes().

◆ side_nodal_soln()

void libMesh::FEInterface::side_nodal_soln ( const FEType &  fe_t,
const Elem *  elem,
const unsigned int  side,
const std::vector< Number > &  elem_soln,
std::vector< Number > &  nodal_soln,
const bool  add_p_level = true,
const unsigned int  vdim = 1 
)
static

Build the nodal soln on one side from the (full) element soln.

This is the solution that will be plotted on side-elements.

Note
On a p-refined element, fe_t.order should be the base order of the element. The Elem::p_level(), if any, is accounted for internally by this routine.

Definition at line 654 of file fe_interface.C.

661{
662#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
663
664 if (is_InfFE_elem(elem->type()))
665 {
666 libmesh_not_implemented();
667 return;
668 }
669
670#endif
671
672 const Order order = fe_t.order;
673 const unsigned int dim = elem->dim();
674
675 void_fe_with_vec_switch(side_nodal_soln(elem, order, side, elem_soln, nodal_soln, add_p_level, vdim));
676}
static void side_nodal_soln(const FEType &fe_t, const Elem *elem, const unsigned int side, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln, const bool add_p_level=true, const unsigned int vdim=1)
Build the nodal soln on one side from the (full) element soln.

References dim, libMesh::Elem::dim(), is_InfFE_elem(), nodal_soln(), libMesh::FEType::order, side_nodal_soln(), and libMesh::Elem::type().

Referenced by libMesh::EquationSystems::build_parallel_solution_vector(), and side_nodal_soln().


The documentation for this class was generated from the following files: