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 42 of file fe_interface.C.

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

◆ ~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 1553 of file fe_interface.C.

1559{
1560#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1561
1562 if (elem && is_InfFE_elem(elem->type()))
1563 {
1564 for (auto j : make_range(dim))
1565 for (auto i : index_range(*comps[j]))
1566 FEInterface::shape_derivs<Real>(fe_t, elem, i, j, p, (*comps[j])[i], add_p_level);
1567 return;
1568 }
1569#endif
1570
1571 const Order o = fe_t.order;
1572
1573 switch(dim)
1574 {
1575 case 0:
1576 fe_scalar_vec_error_switch(0, all_shape_derivs(elem,o,p,comps,add_p_level), , ; return;);
1577 break;
1578 case 1:
1579 fe_scalar_vec_error_switch(1, all_shape_derivs(elem,o,p,comps,add_p_level), , ; return;);
1580 break;
1581 case 2:
1582 fe_scalar_vec_error_switch(2, all_shape_derivs(elem,o,p,comps,add_p_level), , ; return;);
1583 break;
1584 case 3:
1585 fe_scalar_vec_error_switch(3, all_shape_derivs(elem,o,p,comps,add_p_level), , ; return;);
1586 break;
1587 default:
1588 libmesh_error_msg("Invalid dimension = " << dim);
1589 }
1590
1591 return;
1592}
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 1093 of file fe_interface.C.

1099{
1100#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1101
1102 if (elem && is_InfFE_elem(elem->type()))
1103 {
1104 for (auto i : index_range(phi))
1105 FEInterface::shapes<Real>(dim, fe_t, elem, i, p, phi[i], add_p_level);
1106 return;
1107 }
1108#endif
1109
1110 const Order o = fe_t.order;
1111
1112 switch(dim)
1113 {
1114 case 0:
1115 fe_scalar_vec_error_switch(0, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1116 break;
1117 case 1:
1118 fe_scalar_vec_error_switch(1, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1119 break;
1120 case 2:
1121 fe_scalar_vec_error_switch(2, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1122 break;
1123 case 3:
1124 fe_scalar_vec_error_switch(3, all_shapes(elem,o,p,phi,add_p_level), , ; return;);
1125 break;
1126 default:
1127 libmesh_error_msg("Invalid dimension = " << dim);
1128 }
1129
1130 return;
1131}
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 1309 of file fe_interface.C.

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

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 1964 of file fe_interface.C.

1968{
1969 libmesh_assert(elem);
1970
1971 const FEType & fe_t = dof_map.variable_type(variable_number);
1972
1973 switch (elem->dim())
1974 {
1975 case 0:
1976 case 1:
1977 {
1978 // No constraints in 0D/1D.
1979 return;
1980 }
1981
1982
1983 case 2:
1984 {
1985 switch (fe_t.family)
1986 {
1987 case CLOUGH:
1989 dof_map,
1990 variable_number,
1991 elem); return;
1992
1993 case HERMITE:
1995 dof_map,
1996 variable_number,
1997 elem); return;
1998
1999 case LAGRANGE:
2001 dof_map,
2002 variable_number,
2003 elem); return;
2004
2005 case HIERARCHIC:
2007 dof_map,
2008 variable_number,
2009 elem); return;
2010
2011 case HIERARCHIC_VEC:
2013 dof_map,
2014 variable_number,
2015 elem); return;
2016
2017 case SIDE_HIERARCHIC:
2019 dof_map,
2020 variable_number,
2021 elem); return;
2022
2023 case LAGRANGE_VEC:
2025 dof_map,
2026 variable_number,
2027 elem); return;
2028
2029 fe_family_horder_case_func(2, compute_constraints (constraints,
2030 dof_map,
2031 variable_number,
2032 elem), , ; return;)
2033 default:
2034 return;
2035 }
2036 }
2037
2038
2039 case 3:
2040 {
2041 switch (fe_t.family)
2042 {
2043 case HERMITE:
2045 dof_map,
2046 variable_number,
2047 elem); return;
2048
2049 case LAGRANGE:
2051 dof_map,
2052 variable_number,
2053 elem); return;
2054
2055 case HIERARCHIC:
2057 dof_map,
2058 variable_number,
2059 elem); return;
2060
2061 case SIDE_HIERARCHIC:
2063 dof_map,
2064 variable_number,
2065 elem); return;
2066
2067 case LAGRANGE_VEC:
2069 dof_map,
2070 variable_number,
2071 elem); return;
2072
2073 case HIERARCHIC_VEC:
2075 dof_map,
2076 variable_number,
2077 elem); return;
2078
2079 fe_family_horder_case_func(3, compute_constraints (constraints,
2080 dof_map,
2081 variable_number,
2082 elem), , ; return;)
2083 default:
2084 return;
2085 }
2086 }
2087
2088
2089 default:
2090 libmesh_error_msg("Invalid dimension = " << elem->dim());
2091 }
2092}
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 1890 of file fe_interface.C.

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

2107{
2108 const FEType & fe_t = dof_map.variable_type(variable_number);
2109 // No element-specific optimizations currently exist, although
2110 // we do have to select the right compute_periodic_constraints
2111 // for the OutputType of this FEType.
2112 switch (field_type(fe_t))
2113 {
2114 case TYPE_SCALAR:
2116 constraints, dof_map, boundaries, mesh, point_locator, variable_number, elem);
2117 break;
2118 case TYPE_VECTOR:
2120 constraints, dof_map, boundaries, mesh, point_locator, variable_number, elem);
2121 break;
2122 default:
2123 libmesh_error_msg(
2124 "compute_periodic_constraints only set up for vector or scalar FEFieldTypes");
2125 }
2126}
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:1842
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 612 of file fe_interface.C.

618{
619 const Order o = fe_t.order;
620
621 void_fe_with_vec_switch(dofs_on_edge(elem, o, e, di, add_p_level));
622}
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 598 of file fe_interface.C.

604{
605 const Order o = fe_t.order;
606
607 void_fe_with_vec_switch(dofs_on_side(elem, o, s, di, add_p_level));
608}
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 2614 of file fe_interface.C.

2615{
2616 switch (fe_t.family)
2617 {
2618 case LAGRANGE:
2619 case L2_LAGRANGE:
2620 case MONOMIAL:
2621 case MONOMIAL_VEC:
2622 case L2_HIERARCHIC:
2623 case SIDE_HIERARCHIC:
2624 case XYZ:
2625 case SUBDIVISION:
2626 case LAGRANGE_VEC:
2627 case L2_LAGRANGE_VEC:
2628 case NEDELEC_ONE:
2629 case RAVIART_THOMAS:
2630 case L2_RAVIART_THOMAS:
2631 return false;
2632 case CLOUGH:
2633 case HERMITE:
2634 case HIERARCHIC:
2635 case HIERARCHIC_VEC:
2636 case L2_HIERARCHIC_VEC:
2637 fe_family_horder_case()
2638 default:
2639 return true;
2640 }
2641}
@ 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_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 2648 of file fe_interface.C.

2649{
2650 switch (fe_family)
2651 {
2652 fe_family_vector_case()
2653 return TYPE_VECTOR;
2654 default:
2655 return TYPE_SCALAR;
2656 }
2657}

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 2726 of file fe_interface.C.

2727{
2728 switch (fe_type.family)
2729 {
2730 // Discontinuous elements
2731 case MONOMIAL:
2732 case MONOMIAL_VEC:
2733 case L2_HIERARCHIC:
2734 case L2_LAGRANGE:
2735 case XYZ:
2736 case SCALAR:
2737 case L2_RAVIART_THOMAS:
2738 case L2_HIERARCHIC_VEC:
2739 case L2_LAGRANGE_VEC:
2740 return DISCONTINUOUS;
2741
2742 // C0 elements
2743 case LAGRANGE:
2744 case HIERARCHIC:
2745 case BERNSTEIN:
2746 case SZABAB:
2747 case RATIONAL_BERNSTEIN:
2748 case INFINITE_MAP:
2749 case JACOBI_20_00:
2750 case JACOBI_30_00:
2751 case LEGENDRE:
2752 case LAGRANGE_VEC:
2753 case HIERARCHIC_VEC:
2754 return C_ZERO;
2755
2756 // C1 elements
2757 case CLOUGH:
2758 case HERMITE:
2759 case SUBDIVISION:
2760 return C_ONE;
2761
2762 case NEDELEC_ONE:
2763 return H_CURL;
2764
2765 case RAVIART_THOMAS:
2766 return H_DIV;
2767
2768 // Side elements
2769 case SIDE_HIERARCHIC:
2770 return SIDE_DISCONTINUOUS;
2771
2772 default:
2773 libmesh_error_msg("Unknown FE Family " << Utility::enum_to_string(fe_type.family));
2774 }
2775}
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_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 693 of file fe_interface.C.

699{
700 libmesh_deprecated();
701#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
702
703 if (is_InfFE_elem(elem->type()))
704 return ifem_inverse_map(dim, fe_t, elem, p,tolerance, secure);
705
706#endif
707
708 fe_with_vec_switch(inverse_map(elem, p, tolerance, secure));
709}
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 713 of file fe_interface.C.

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

2690{
2691 switch (fe_type.family)
2692 {
2693 case HERMITE:
2694 case HIERARCHIC:
2695 case HIERARCHIC_VEC:
2696 case L2_HIERARCHIC:
2697 case L2_HIERARCHIC_VEC:
2698 case MONOMIAL:
2699 case MONOMIAL_VEC:
2700 case SIDE_HIERARCHIC:
2701 case SZABAB:
2702 case XYZ:
2703 return true;
2704
2705 case BERNSTEIN:
2706 case CLOUGH: // maybe some day?
2707 case LAGRANGE:
2708 case LAGRANGE_VEC:
2709 case L2_LAGRANGE:
2710 case L2_LAGRANGE_VEC:
2711 case NEDELEC_ONE:
2712 case RATIONAL_BERNSTEIN:
2713 case RAVIART_THOMAS:
2714 case L2_RAVIART_THOMAS:
2715 case SCALAR:
2716 case SUBDIVISION:
2717 return false;
2718
2719 default:
2720 libmesh_error_msg("Unknown FE Family " << Utility::enum_to_string(fe_type.family));
2721 }
2722}

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_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 678 of file fe_interface.C.

682{
683 libmesh_deprecated();
684#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
685 if (is_InfFE_elem(elem->type()))
686 return ifem_map(dim, fe_t, elem, p);
687#endif
688 fe_with_vec_switch(map(elem, p));
689}
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 2132 of file fe_interface.C.

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

References libMesh::BERNSTEIN, libMesh::C0POLYGON, libMesh::C0POLYHEDRON, libMesh::CLOUGH, libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::FEType::family, 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_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 391 of file fe_interface.C.

394{
395 // dim is required by the fe_with_vec_switch macro
396 auto dim = elem->dim();
397
398#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
399
400 // InfElems currently don't support p_level()
401 if (is_InfFE_elem(elem->type()))
402 return ifem_n_dofs(fe_t, elem);
403
404#endif
405
406 // Account for Elem::p_level() when computing total_order
407 fe_with_vec_switch(n_dofs(elem, fe_t.order + add_p_level*elem->p_level()));
408}
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 413 of file fe_interface.C.

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

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 378 of file fe_interface.C.

381{
382 libmesh_deprecated();
383
384 fe_with_vec_switch(n_dofs(elem, fe_t.order + elem->p_level()));
385}

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 353 of file fe_interface.C.

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

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(), and libMesh::HPCoarsenTest::select_refinement().

◆ 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 483 of file fe_interface.C.

487{
488 // dim is required by the fe_with_vec_switch macro
489 auto dim = elem->dim();
490
491#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
492
493 if (is_InfFE_elem(elem->type()))
494 return ifem_n_dofs_at_node(fe_t, elem, n);
495
496#endif
497
498 // Account for Elem::p_level() when computing total_order
499 auto total_order = fe_t.order + add_p_level*elem->p_level();
500
501 fe_with_vec_switch(n_dofs_at_node(*elem, total_order, n));
502}
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 507 of file fe_interface.C.

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

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 437 of file fe_interface.C.

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

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()(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()().

◆ 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 471 of file fe_interface.C.

473{
474 // dim is required by the fe_with_vec_switch macro
475 auto dim = elem->dim();
476
477 fe_with_vec_switch(n_dofs_at_node);
478}

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 459 of file fe_interface.C.

461{
462 libmesh_deprecated();
463
464 fe_with_vec_switch(n_dofs_at_node);
465}

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 553 of file fe_interface.C.

556{
557 // dim is required by the fe_with_vec_switch macro
558 auto dim = elem->dim();
559
560#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
561
562 if (is_InfFE_elem(elem->type()))
563 return ifem_n_dofs_per_elem(fe_t, elem);
564
565#endif
566
567 // Account for Elem::p_level() when computing total_order
568 auto total_order = fe_t.order + add_p_level*elem->p_level();
569
570 fe_with_vec_switch(n_dofs_per_elem(*elem, total_order));
571}
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 576 of file fe_interface.C.

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

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 297 of file fe_interface.C.

300{
301 // dim is required by the fe_with_vec_switch macro
302 auto dim = elem->dim();
303
304#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
305 /*
306 * Since the FEType, stored in DofMap/(some System child), has to
307 * be the _same_ for InfFE and FE, we have to catch calls
308 * to infinite elements through the element type.
309 */
310
311 if (is_InfFE_elem(elem->type()))
312 return ifem_n_shape_functions(fe_t, elem);
313
314#endif
315
316 // Account for Elem::p_level() when computing total_order
317 auto total_order = fe_t.order + add_p_level*elem->p_level();
318
319 fe_with_vec_switch(n_dofs(elem, total_order));
320}
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 325 of file fe_interface.C.

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

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 272 of file fe_interface.C.

275{
276 libmesh_deprecated();
277
278#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
279
280 // We no longer support calling this function with an infinite
281 // ElemType, you must call the FeInterface::n_shape_functions()
282 // taking an Elem* instead.
283 if (is_InfFE_elem(t))
284 libmesh_not_implemented();
285
286#endif
287
288 const Order o = fe_t.order;
289
290 fe_with_vec_switch(n_shape_functions(t, o));
291}
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::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(), 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 2678 of file fe_interface.C.

2680{
2681 // We assume the number of vector components is the mesh spatial dimension.
2682 return field_type(fe_type.family) == TYPE_VECTOR ? mesh.spatial_dimension() : 1;
2683}

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(), and libMesh::Nemesis_IO_Helper::write_element_values().

◆ 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 626 of file fe_interface.C.

633{
634#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
635
636 if (is_InfFE_elem(elem->type()))
637 {
638 ifem_nodal_soln(dim, fe_t, elem, elem_soln, nodal_soln);
639 return;
640 }
641
642#endif
643
644 const Order order = fe_t.order;
645
646 void_fe_with_vec_switch(nodal_soln(elem, order, elem_soln, nodal_soln, add_p_level, vdim));
647}
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(), 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 752 of file fe_interface.C.

755{
756 return FEBase::on_reference_element(p,t,eps);
757}

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 2659 of file fe_interface.C.

2660{
2661 switch (fe_family)
2662 {
2663 case HIERARCHIC:
2664 case L2_HIERARCHIC:
2665 case HIERARCHIC_VEC:
2666 case L2_HIERARCHIC_VEC:
2667 case BERNSTEIN:
2668 case RATIONAL_BERNSTEIN:
2669 case SZABAB:
2670 case NEDELEC_ONE:
2671 case RAVIART_THOMAS:
2672 return true;
2673 default:
2674 return false;
2675 }
2676}

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 805 of file fe_interface.C.

810{
811 // dim is required by the fe_switch macro
812 auto dim = elem->dim();
813
814#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
815
816 if (elem && is_InfFE_elem(elem->type()))
817 return ifem_shape(fe_t, elem, i, p);
818
819#endif
820
821 // We are calling
822 //
823 // FE<X,Y>::shape(Elem *, Order, unsigned, Point, true)
824 //
825 // See fe.h for more details.
826 fe_switch(shape(elem, fe_t.order, i, p, add_p_level));
827}
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 954 of file fe_interface.C.

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

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 1178 of file fe_interface.C.

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

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 832 of file fe_interface.C.

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

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 997 of file fe_interface.C.

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

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 1223 of file fe_interface.C.

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

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 781 of file fe_interface.C.

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

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 909 of file fe_interface.C.

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

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 1852 of file fe_interface.C.

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

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 761 of file fe_interface.C.

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

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::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), main(), 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(), and NavierSystem::side_constraint().

◆ 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 864 of file fe_interface.C.

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

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 1137 of file fe_interface.C.

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

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 1444 of file fe_interface.C.

1449{
1450 auto dim = elem->dim();
1451
1452 libmesh_assert_greater (dim, j);
1453#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1454
1455 if (is_InfFE_elem(elem->type())){
1456 return ifem_shape_deriv(fe_t, elem, i, j, p);
1457 }
1458
1459#endif
1460
1461 // Account for Elem::p_level() when computing total order. Note: we are calling
1462 // FE::shape_deriv() with the final argument == true so that the Elem::p_level()
1463 // is accounted for automatically internally.
1464 fe_switch(shape_deriv(elem, fe_t.order, i, j, p, true));
1465
1466 // We'll never get here
1467 return 0;
1468}
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 1472 of file fe_interface.C.

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

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 1405 of file fe_interface.C.

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

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 1381 of file fe_interface.C.

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

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 1651 of file fe_interface.C.

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

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 1517 of file fe_interface.C.

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

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 1597 of file fe_interface.C.

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

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 1365 of file fe_interface.C.

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

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 1738 of file fe_interface.C.

1743{
1744 auto dim = elem->dim();
1745
1746 libmesh_assert_greater_equal (dim*(dim-1),j);
1747#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1748 if (is_InfFE_elem(elem->type()))
1749 libmesh_not_implemented();
1750#endif
1751
1752 // We are calling FE::shape_second_deriv() with the final argument
1753 // == true so that the Elem::p_level() is accounted for
1754 // automatically internally.
1755 switch(dim)
1756 {
1757 case 0:
1758 fe_family_switch (0, shape_second_deriv(elem, fe_t.order, i, j, p, true), return , ;);
1759 case 1:
1760 fe_family_switch (1, shape_second_deriv(elem, fe_t.order, i, j, p, true), return , ;);
1761 case 2:
1762 fe_family_switch (2, shape_second_deriv(elem, fe_t.order, i, j, p, true), return , ;);
1763 case 3:
1764 fe_family_switch (3, shape_second_deriv(elem, fe_t.order, i, j, p, true), return , ;);
1765 default:
1766 libmesh_error_msg("Invalid dimension = " << dim);
1767 }
1768
1769 // We'll never get here
1770 return 0;
1771}
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 1775 of file fe_interface.C.

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

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 1703 of file fe_interface.C.

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

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 1669 of file fe_interface.C.

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

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 1835 of file fe_interface.C.

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

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 1048 of file fe_interface.C.

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

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 1271 of file fe_interface.C.

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

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 651 of file fe_interface.C.

658{
659#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
660
661 if (is_InfFE_elem(elem->type()))
662 {
663 libmesh_not_implemented();
664 return;
665 }
666
667#endif
668
669 const Order order = fe_t.order;
670 const unsigned int dim = elem->dim();
671
672 void_fe_with_vec_switch(side_nodal_soln(elem, order, side, elem_soln, nodal_soln, add_p_level, vdim));
673}
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: