libMesh
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. More...
 
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. More...
 
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. More...
 

Public Member Functions

virtual ~FEInterface ()=default
 Destructor. More...
 
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)
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static Point map (unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
 This is now deprecated; use FEMap::map instead. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static bool is_hierarchic (const FEType &fe_type)
 Returns whether or not the input FEType's higher-order shape functions are always hierarchic. More...
 

Private Member Functions

 FEInterface ()
 Empty constructor. More...
 

Static Private Member Functions

static bool is_InfFE_elem (const ElemType et)
 
static unsigned int ifem_n_shape_functions (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int ifem_n_shape_functions (const FEType &fe_t, const Elem *elem)
 
static unsigned int ifem_n_dofs (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
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 
)

Definition at line 1552 of file fe_interface.C.

References dim, libMesh::index_range(), and libMesh::make_range().

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

◆ 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 
)

Definition at line 1092 of file fe_interface.C.

References dim, and libMesh::index_range().

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

◆ 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 
)

Definition at line 1308 of file fe_interface.C.

References dim.

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

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

References libMesh::CLOUGH, libMesh::FE< Dim, T >::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().

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

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

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(), libMesh::MeshFunction::operator()(), libMesh::System::point_gradient(), and libMesh::System::point_value().

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

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

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

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

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

References libMesh::FEType::order.

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

617 {
618  const Order o = fe_t.order;
619 
620  void_fe_with_vec_switch(dofs_on_edge(elem, o, e, di, add_p_level));
621 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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...
Definition: fe_interface.C:611

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

References libMesh::FEType::order.

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

603 {
604  const Order o = fe_t.order;
605 
606  void_fe_with_vec_switch(dofs_on_side(elem, o, s, di, add_p_level));
607 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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...
Definition: fe_interface.C:597

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

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

2614 {
2615  switch (fe_t.family)
2616  {
2617  case LAGRANGE:
2618  case L2_LAGRANGE:
2619  case MONOMIAL:
2620  case MONOMIAL_VEC:
2621  case L2_HIERARCHIC:
2622  case SIDE_HIERARCHIC:
2623  case XYZ:
2624  case SUBDIVISION:
2625  case LAGRANGE_VEC:
2626  case L2_LAGRANGE_VEC:
2627  case NEDELEC_ONE:
2628  case RAVIART_THOMAS:
2629  case L2_RAVIART_THOMAS:
2630  return false;
2631  case CLOUGH:
2632  case HERMITE:
2633  case HIERARCHIC:
2634  case HIERARCHIC_VEC:
2635  case L2_HIERARCHIC_VEC:
2636  fe_family_horder_case()
2637  default:
2638  return true;
2639  }
2640 }

◆ field_type() [1/2]

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

◆ field_type() [2/2]

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

Definition at line 2647 of file fe_interface.C.

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

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

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

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::EquationSystems::build_discontinuous_solution_vector(), FETest< order, family, elem_type >::testFEInterface(), and libMesh::DofMap::use_coupled_neighbor_dofs().

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

◆ 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 825 of file fe_interface_inf_fe.C.

References compute_data(), and dim.

Referenced by compute_data().

829 {
830  switch (dim)
831  {
832  case 1:
833  {
834  inf_fe_family_mapping_switch(1, compute_data(fe_t, elem,data), , ;break;);
835  break;
836  }
837  case 2:
838  {
839  inf_fe_family_mapping_switch(2, compute_data(fe_t, elem,data), , ;break;);
840  break;
841  }
842  case 3:
843  {
844  inf_fe_family_mapping_switch(3, compute_data(fe_t, elem,data), , ;break;);
845  break;
846  }
847 
848 
849  default:
850  libmesh_error_msg("Invalid dim = " << dim);
851  break;
852  }
853 }
unsigned int dim
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...

◆ 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 578 of file fe_interface_inf_fe.C.

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().

584 {
585  switch (dim)
586  {
587  // 1D
588  case 1:
589  {
590  switch (fe_t.inf_map)
591  {
592  case CARTESIAN:
593  return InfFE<1,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
594 
595  case SPHERICAL:
596  case ELLIPSOIDAL:
597  libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
598 
599  /*
600  case SPHERICAL:
601  return InfFE<1,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
602 
603  case ELLIPSOIDAL:
604  return InfFE<1,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
605  */
606 
607  default:
608  libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
609  }
610  }
611 
612 
613  // 2D
614  case 2:
615  {
616  switch (fe_t.inf_map)
617  {
618  case CARTESIAN:
619  return InfFE<2,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
620 
621  case SPHERICAL:
622  case ELLIPSOIDAL:
623  libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
624 
625  /*
626  case SPHERICAL:
627  return InfFE<2,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
628 
629  case ELLIPSOIDAL:
630  return InfFE<2,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
631  */
632 
633  default:
634  libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
635  }
636  }
637 
638 
639  // 3D
640  case 3:
641  {
642  switch (fe_t.inf_map)
643  {
644  case CARTESIAN:
645  return InfFE<3,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
646 
647  case SPHERICAL:
648  case ELLIPSOIDAL:
649  libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
650 
651  /*
652  case SPHERICAL:
653  return InfFE<3,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
654 
655  case ELLIPSOIDAL:
656  return InfFE<3,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
657  */
658 
659  default:
660  libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
661  }
662  }
663 
664  default:
665  libmesh_error_msg("Invalid dim = " << dim);
666  }
667 }
unsigned int dim
std::string enum_to_string(const T e)
static Point inverse_map(const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: inf_fe.h:482

◆ 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 671 of file fe_interface_inf_fe.C.

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

678 {
679  switch (dim)
680  {
681  // 1D
682  case 1:
683  {
684  switch (fe_t.inf_map)
685  {
686  case CARTESIAN:
687  InfFE<1,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
688  return;
689 
690  default:
691  libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
692  }
693  }
694 
695 
696  // 2D
697  case 2:
698  {
699  switch (fe_t.inf_map)
700  {
701  case CARTESIAN:
702  InfFE<2,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
703  return;
704 
705  default:
706  libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
707  }
708  }
709 
710 
711  // 3D
712  case 3:
713  {
714  switch (fe_t.inf_map)
715  {
716  case CARTESIAN:
717  InfFE<3,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
718  return;
719 
720  default:
721  libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
722  }
723  }
724 
725  default:
726  libmesh_error_msg("Invalid dim = " << dim);
727  }
728 }
unsigned int dim
std::string enum_to_string(const T e)
static Point inverse_map(const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: inf_fe.h:482

◆ 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 547 of file fe_interface_inf_fe.C.

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().

551 {
552  switch (fe_t.inf_map)
553  {
554  case CARTESIAN:
555  {
556  switch (dim)
557  {
558  case 1:
559  return InfFE<1,JACOBI_20_00,CARTESIAN>::map(elem, p);
560  case 2:
561  return InfFE<2,JACOBI_20_00,CARTESIAN>::map(elem, p);
562  case 3:
563  return InfFE<3,JACOBI_20_00,CARTESIAN>::map(elem, p);
564  default:
565  libmesh_error_msg("Invalid dim = " << dim);
566  }
567  }
568  case SPHERICAL:
569  case ELLIPSOIDAL:
570  libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
571  default:
572  libmesh_error_msg("Invalid map = " << Utility::enum_to_string(fe_t.inf_map));
573  }
574 }
static Point map(const Elem *inf_elem, const Point &reference_point)
Definition: inf_fe.h:474
unsigned int dim
std::string enum_to_string(const T e)

◆ ifem_n_dofs() [1/2]

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

Definition at line 103 of file fe_interface_inf_fe.C.

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

Referenced by n_dofs().

106 {
107  libmesh_deprecated();
108 
109  switch (dim)
110  {
111  // 1D
112  case 1:
113  /*
114  * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
115  * is actually independent of T_radial and T_map, we can use
116  * just any T_radial and T_map
117  */
119 
120  // 2D
121  case 2:
123 
124  // 3D
125  case 3:
127 
128  default:
129  libmesh_error_msg("Unsupported dim = " << dim);
130  }
131 }
unsigned int dim
static unsigned int n_dofs(const FEType &fet, const ElemType inf_elem_type)
Definition: inf_fe_static.C:67

◆ ifem_n_dofs() [2/2]

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

Definition at line 137 of file fe_interface_inf_fe.C.

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

139 {
140  switch (elem->dim())
141  {
142  // 1D
143  case 1:
144  /*
145  * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
146  * is actually independent of T_radial and T_map, we can use
147  * just any T_radial and T_map
148  */
149  return InfFE<1,JACOBI_20_00,CARTESIAN>::n_dofs(fe_t, elem);
150 
151  // 2D
152  case 2:
153  return InfFE<2,JACOBI_20_00,CARTESIAN>::n_dofs(fe_t, elem);
154 
155  // 3D
156  case 3:
157  return InfFE<3,JACOBI_20_00,CARTESIAN>::n_dofs(fe_t, elem);
158 
159  default:
160  libmesh_error_msg("Unsupported dim = " << elem->dim());
161  }
162 }
static unsigned int n_dofs(const FEType &fet, const ElemType inf_elem_type)
Definition: inf_fe_static.C:67

◆ ifem_n_dofs_at_node() [1/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 167 of file fe_interface_inf_fe.C.

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

Referenced by n_dofs_at_node().

171 {
172  libmesh_deprecated();
173 
174  switch (dim)
175  {
176  // 1D
177  case 1:
178  /*
179  * Since InfFE<Dim,T_radial,T_map>::n_dofs_at_node(...)
180  * is actually independent of T_radial and T_map, we can use
181  * just any T_radial and T_map
182  */
184 
185  // 2D
186  case 2:
188 
189  // 3D
190  case 3:
192 
193  default:
194  libmesh_error_msg("Unsupported dim = " << dim);
195  }
196 }
static unsigned int n_dofs_at_node(const FEType &fet, const ElemType inf_elem_type, const unsigned int n)
unsigned int dim

◆ ifem_n_dofs_at_node() [2/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 201 of file fe_interface_inf_fe.C.

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

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

◆ ifem_n_dofs_per_elem() [1/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 234 of file fe_interface_inf_fe.C.

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

Referenced by n_dofs_per_elem().

237 {
238  libmesh_deprecated();
239 
240  switch (dim)
241  {
242  // 1D
243  case 1:
244  /*
245  * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
246  * is actually independent of T_radial and T_map, we can use
247  * just any T_radial and T_map
248  */
250 
251  // 2D
252  case 2:
254 
255  // 3D
256  case 3:
258 
259  default:
260  libmesh_error_msg("Unsupported dim = " << dim);
261  }
262 }
static unsigned int n_dofs_per_elem(const FEType &fet, const ElemType inf_elem_type)
unsigned int dim

◆ ifem_n_dofs_per_elem() [2/2]

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

Definition at line 267 of file fe_interface_inf_fe.C.

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

269 {
270  switch (elem->dim())
271  {
272  // 1D
273  case 1:
274  /*
275  * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
276  * is actually independent of T_radial and T_map, we can use
277  * just any T_radial and T_map
278  */
280 
281  // 2D
282  case 2:
284 
285  // 3D
286  case 3:
288 
289  default:
290  libmesh_error_msg("Unsupported dim = " << elem->dim());
291  }
292 }
static unsigned int n_dofs_per_elem(const FEType &fet, const ElemType inf_elem_type)

◆ ifem_n_shape_functions() [1/2]

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

Definition at line 40 of file fe_interface_inf_fe.C.

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

Referenced by n_shape_functions().

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

◆ ifem_n_shape_functions() [2/2]

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

Definition at line 73 of file fe_interface_inf_fe.C.

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

75 {
76  switch (elem->dim())
77  {
78  // 1D
79  case 1:
80  /*
81  * Since InfFE<Dim,T_radial,T_map>::n_shape_functions(...)
82  * is actually independent of T_radial and T_map, we can use
83  * just any T_radial and T_map
84  */
86 
87  // 2D
88  case 2:
90 
91  // 3D
92  case 3:
94 
95  default:
96  libmesh_error_msg("Unsupported dim = " << elem->dim());
97  }
98 }
virtual unsigned int n_shape_functions() const override
Definition: inf_fe.h:569

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

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, nodal_soln(), libMesh::InfFE< Dim, T_radial, T_map >::nodal_soln(), and libMesh::FEType::radial_family.

Referenced by nodal_soln().

302 {
303  switch (dim)
304  {
305 
306  // 1D
307  case 1:
308  {
309  switch (fe_t.radial_family)
310  {
311  case INFINITE_MAP:
312  libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
313 
314  case JACOBI_20_00:
315  {
316  switch (fe_t.inf_map)
317  {
318  case CARTESIAN:
319  {
321  break;
322  }
323  default:
324  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
325  }
326  break;
327  }
328 
329  case JACOBI_30_00:
330  {
331  switch (fe_t.inf_map)
332  {
333  case CARTESIAN:
334  {
336  break;
337  }
338  default:
339  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
340  }
341  break;
342  }
343 
344  case LEGENDRE:
345  {
346  switch (fe_t.inf_map)
347  {
348  case CARTESIAN:
349  {
350  InfFE<1,LEGENDRE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
351  break;
352  }
353  default:
354  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
355  }
356  break;
357  }
358 
359  case LAGRANGE:
360  {
361  switch (fe_t.inf_map)
362  {
363  case CARTESIAN:
364  {
365  InfFE<1,LAGRANGE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
366  break;
367  }
368  default:
369  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
370  }
371  break;
372  }
373 
374  default:
375  libmesh_error_msg("ERROR: Bad FEType.radial_family == " << Utility::enum_to_string(fe_t.radial_family));
376  }
377 
378  break;
379  }
380 
381 
382 
383 
384  // 2D
385  case 2:
386  {
387  switch (fe_t.radial_family)
388  {
389  case INFINITE_MAP:
390  libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
391 
392  case JACOBI_20_00:
393  {
394  switch (fe_t.inf_map)
395  {
396  case CARTESIAN:
397  {
399  break;
400  }
401  default:
402  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
403  }
404  break;
405  }
406 
407  case JACOBI_30_00:
408  {
409  switch (fe_t.inf_map)
410  {
411  case CARTESIAN:
412  {
414  break;
415  }
416  default:
417  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
418  }
419  break;
420  }
421 
422  case LEGENDRE:
423  {
424  switch (fe_t.inf_map)
425  {
426  case CARTESIAN:
427  {
428  InfFE<2,LEGENDRE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
429  break;
430  }
431  default:
432  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
433  }
434  break;
435  }
436 
437  case LAGRANGE:
438  {
439  switch (fe_t.inf_map)
440  {
441  case CARTESIAN:
442  {
443  InfFE<2,LAGRANGE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
444  break;
445  }
446  default:
447  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
448  }
449  break;
450  }
451 
452  default:
453  libmesh_error_msg("ERROR: Bad FEType.radial_family == " << Utility::enum_to_string(fe_t.radial_family));
454  }
455 
456  break;
457  }
458 
459 
460 
461 
462  // 3D
463  case 3:
464  {
465  switch (fe_t.radial_family)
466  {
467  case INFINITE_MAP:
468  libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
469 
470  case JACOBI_20_00:
471  {
472  switch (fe_t.inf_map)
473  {
474  case CARTESIAN:
475  {
477  break;
478  }
479  default:
480  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
481  }
482  break;
483  }
484 
485  case JACOBI_30_00:
486  {
487  switch (fe_t.inf_map)
488  {
489  case CARTESIAN:
490  {
492  break;
493  }
494  default:
495  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
496  }
497  break;
498  }
499 
500  case LEGENDRE:
501  {
502  switch (fe_t.inf_map)
503  {
504  case CARTESIAN:
505  {
506  InfFE<3,LEGENDRE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
507  break;
508  }
509  default:
510  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
511  }
512  break;
513  }
514 
515  case LAGRANGE:
516  {
517  switch (fe_t.inf_map)
518  {
519  case CARTESIAN:
520  {
521  InfFE<3,LAGRANGE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
522  break;
523  }
524  default:
525  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
526  }
527  break;
528  }
529 
530 
531 
532  default:
533  libmesh_error_msg("ERROR: Bad FEType.radial_family == " << Utility::enum_to_string(fe_t.radial_family));
534  }
535 
536  break;
537  }
538 
539  default:
540  libmesh_error_msg("Invalid dim = " << dim);
541  }
542 }
unsigned int dim
std::string enum_to_string(const T e)
static void nodal_soln(const FEType &fet, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Usually, this method would build the nodal soln from the element soln.
static 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.
Definition: fe_interface.C:625

◆ ifem_on_reference_element()

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

Definition at line 733 of file fe_interface_inf_fe.C.

References libMesh::FEAbstract::on_reference_element().

736 {
737  return FEBase::on_reference_element(p,t,eps);
738 }
static bool on_reference_element(const Point &p, const ElemType t, const Real eps=TOLERANCE)
Definition: fe_abstract.C:637

◆ ifem_shape() [1/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 742 of file fe_interface_inf_fe.C.

References shape().

Referenced by shape().

747 {
748  libmesh_deprecated();
749 
750  inf_fe_switch(shape(fe_t, t, i, p));
751 }
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760

◆ 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 755 of file fe_interface_inf_fe.C.

References shape().

760 {
761  libmesh_deprecated();
762 
763  inf_fe_switch( shape(fe_t, elem, i, p));
764 }
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760

◆ ifem_shape() [3/3]

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

Definition at line 769 of file fe_interface_inf_fe.C.

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

773 {
774  // The inf_fe_switch macro requires a "dim" parameter.
775  auto dim = elem->dim();
776 
777  inf_fe_switch( shape(fe_t, elem, i, p));
778 }
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760

◆ ifem_shape_deriv() [1/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 797 of file fe_interface_inf_fe.C.

References shape_deriv().

Referenced by shape_deriv().

803 {
804  libmesh_deprecated();
805 
806  inf_fe_switch(shape_deriv(fe_t, t, i, j, p));
807 }
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)

◆ 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 783 of file fe_interface_inf_fe.C.

References shape_deriv().

789 {
790  libmesh_deprecated();
791 
792  inf_fe_switch(shape_deriv(fe_t, elem, i, j, p));
793 }
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)

◆ ifem_shape_deriv() [3/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 812 of file fe_interface_inf_fe.C.

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

817 {
818  // The inf_fe_switch macro requires a "dim" parameter.
819  auto dim = elem->dim();
820 
821  inf_fe_switch(shape_deriv(fe_t, elem, i, j, p));
822 }
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)
unsigned int dim

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

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

Referenced by inverse_map().

698 {
699  libmesh_deprecated();
700 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
701 
702  if (is_InfFE_elem(elem->type()))
703  return ifem_inverse_map(dim, fe_t, elem, p,tolerance, secure);
704 
705 #endif
706 
707  fe_with_vec_switch(inverse_map(elem, p, tolerance, secure));
708 }
unsigned int dim
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.
Definition: fe_interface.C:692
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

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

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

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

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

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 >::testFEInterface().

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

◆ is_InfFE_elem()

bool libMesh::FEInterface::is_InfFE_elem ( const ElemType  et)
staticprivate
Returns
true if et is an element to be processed by class InfFE, false otherwise or when !LIBMESH_ENABLE_INFINITE_ELEMENTS.

Definition at line 52 of file fe_interface.C.

Referenced by compute_data(), inverse_map(), map(), n_dofs(), n_dofs_at_node(), n_dofs_per_elem(), n_shape_functions(), nodal_soln(), shape(), shape_deriv(), shape_deriv_function(), shape_function(), shape_second_deriv(), shape_second_deriv_function(), and side_nodal_soln().

53 {
54  return false;
55 }

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

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

681 {
682  libmesh_deprecated();
683 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
684  if (is_InfFE_elem(elem->type()))
685  return ifem_map(dim, fe_t, elem, p);
686 #endif
687  fe_with_vec_switch(map(elem, p));
688 }
static Point map(unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
This is now deprecated; use FEMap::map instead.
Definition: fe_interface.C:677
unsigned int dim
static Point ifem_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

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

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(), and libMesh::DofMap::reinit().

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

◆ n_dofs() [1/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 355 of file fe_interface.C.

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

Referenced by libMesh::DofMap::_dof_indices(), assemble_func(), assemble_SchroedingerEquation(), assemble_wave(), libMesh::FEGenericBase< FEOutputType< T >::type >::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(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs(), n_shape_functions(), and libMesh::HPCoarsenTest::select_refinement().

358 {
359  libmesh_deprecated();
360 
361 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
362 
363  if (is_InfFE_elem(t))
364  return ifem_n_dofs(dim, fe_t, t);
365 
366 #endif
367 
368  const Order o = fe_t.order;
369 
370  fe_with_vec_switch(n_dofs(t, o));
371 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:355
unsigned int dim
static unsigned int ifem_n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ n_dofs() [2/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 377 of file fe_interface.C.

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

380 {
381  libmesh_deprecated();
382 
383  fe_with_vec_switch(n_dofs(elem, fe_t.order + elem->p_level()));
384 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:355

◆ n_dofs() [3/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 390 of file fe_interface.C.

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

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

◆ n_dofs() [4/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 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 412 of file fe_interface.C.

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

415 {
416  // dim is required by the fe_with_vec_switch macro
417  auto dim = elem->dim();
418 
419 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
420 
421  // InfElems currently don't support p_level()
422  if (is_InfFE_elem(elem->type()))
423  return ifem_n_dofs(fe_t, elem);
424 
425 #endif
426 
427  // Elem::p_level() is ignored, extra_order is used instead.
428  auto total_order = fe_t.order + extra_order;
429 
430  fe_with_vec_switch(n_dofs(elem, total_order));
431 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:355
unsigned int dim
static unsigned int ifem_n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ n_dofs_at_node() [1/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 436 of file fe_interface.C.

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

Referenced by libMesh::DofMap::_dof_indices(), libMesh::DofMap::_node_dof_indices(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_indices(), libMesh::DofMap::constrain_p_dofs(), n_dofs_at_node(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node(), n_dofs_at_node_function(), libMesh::DofMap::old_dof_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()(), and libMesh::DofMap::reinit().

440 {
441  libmesh_deprecated();
442 
443 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
444 
445  if (is_InfFE_elem(t))
446  return ifem_n_dofs_at_node(dim, fe_t, t, n);
447 
448 #endif
449 
450  const Order o = fe_t.order;
451 
452  fe_with_vec_switch(n_dofs_at_node(t, o, n));
453 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int dim
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:436
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52
static unsigned int ifem_n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)

◆ n_dofs_at_node() [2/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 482 of file fe_interface.C.

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().

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

◆ n_dofs_at_node() [3/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 506 of file fe_interface.C.

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

510 {
511  // dim is required by the fe_with_vec_switch macro
512  auto dim = elem->dim();
513 
514 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
515 
516  if (is_InfFE_elem(elem->type()))
517  return ifem_n_dofs_at_node(fe_t, elem, n);
518 
519 #endif
520 
521  // Ignore Elem::p_level() and instead use extra_order to compute total_order.
522  auto total_order = fe_t.order + extra_order;
523 
524  fe_with_vec_switch(n_dofs_at_node(*elem, total_order, n));
525 }
unsigned int dim
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:436
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52
static unsigned int ifem_n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)

◆ n_dofs_at_node_function() [1/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 458 of file fe_interface.C.

References n_dofs_at_node().

Referenced by libMesh::DofMap::_dof_indices(), and libMesh::DofMap::old_dof_indices().

460 {
461  libmesh_deprecated();
462 
463  fe_with_vec_switch(n_dofs_at_node);
464 }
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:436

◆ n_dofs_at_node_function() [2/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 470 of file fe_interface.C.

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

472 {
473  // dim is required by the fe_with_vec_switch macro
474  auto dim = elem->dim();
475 
476  fe_with_vec_switch(n_dofs_at_node);
477 }
unsigned int dim
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:436

◆ n_dofs_per_elem() [1/3]

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

Definition at line 530 of file fe_interface.C.

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

Referenced by libMesh::DofMap::_dof_indices(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_indices(), libMesh::OldSolutionValue< Output, point_output >::eval_old_dofs(), n_dofs_per_elem(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_per_elem(), libMesh::DofMap::old_dof_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), and libMesh::DofMap::reinit().

533 {
534  libmesh_deprecated();
535 
536 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
537 
538  if (is_InfFE_elem(t))
539  return ifem_n_dofs_per_elem(dim, fe_t, t);
540 
541 #endif
542 
543  const Order o = fe_t.order;
544 
545  fe_with_vec_switch(n_dofs_per_elem(t, o));
546 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:530
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int dim
static unsigned int ifem_n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ n_dofs_per_elem() [2/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 552 of file fe_interface.C.

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().

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

◆ n_dofs_per_elem() [3/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 575 of file fe_interface.C.

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

578 {
579  // dim is required by the fe_with_vec_switch macro
580  auto dim = elem->dim();
581 
582 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
583 
584  if (is_InfFE_elem(elem->type()))
585  return ifem_n_dofs_per_elem(fe_t, elem);
586 
587 #endif
588 
589  // Ignore Elem::p_level() and instead use extra_order to compute total_order.
590  auto total_order = fe_t.order + extra_order;
591 
592  fe_with_vec_switch(n_dofs_per_elem(*elem, total_order));
593 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:530
unsigned int dim
static unsigned int ifem_n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ n_shape_functions() [1/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.

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

Referenced by libMesh::FEMap::compute_face_map(), libMesh::FEMap::init_edge_shape_functions(), libMesh::FEMap::init_face_shape_functions(), libMesh::FEMap::init_reference_to_physical_map(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::FEMap::map(), libMesh::FEMap::map_deriv(), and FETest< order, family, elem_type >::testFEInterface().

275 {
276  libmesh_deprecated();
277 
278 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
279  /*
280  * Since the FEType, stored in DofMap/(some System child), has to
281  * be the _same_ for InfFE and FE, we have to catch calls
282  * to infinite elements through the element type.
283  */
284 
285  if (is_InfFE_elem(t))
286  return ifem_n_shape_functions(dim, fe_t, t);
287 
288 #endif
289 
290  const Order o = fe_t.order;
291 
292  fe_with_vec_switch(n_shape_functions(t, o));
293 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static unsigned int ifem_n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
unsigned int dim
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:272
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ n_shape_functions() [2/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 299 of file fe_interface.C.

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().

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

◆ n_shape_functions() [3/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 327 of file fe_interface.C.

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

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

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

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

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::EquationSystems::build_variable_names(), and libMesh::Variable::n_components().

2679 {
2680  // We assume the number of vector components is the mesh spatial dimension.
2681  return field_type(fe_type.family) == TYPE_VECTOR ? mesh.spatial_dimension() : 1;
2682 }
MeshBase & mesh
static FEFieldType field_type(const FEType &fe_type)

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

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

Referenced by libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), ifem_nodal_soln(), side_nodal_soln(), libMesh::Nemesis_IO_Helper::write_nodal_solution(), libMesh::EnsightIO::write_scalar_ascii(), and libMesh::EnsightIO::write_vector_ascii().

632 {
633 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
634 
635  if (is_InfFE_elem(elem->type()))
636  {
637  ifem_nodal_soln(dim, fe_t, elem, elem_soln, nodal_soln);
638  return;
639  }
640 
641 #endif
642 
643  const Order order = fe_t.order;
644 
645  void_fe_with_vec_switch(nodal_soln(elem, order, elem_soln, nodal_soln, add_p_level, vdim));
646 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int dim
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 bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52
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.
Definition: fe_interface.C:625

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

References libMesh::FEAbstract::on_reference_element().

754 {
755  return FEBase::on_reference_element(p,t,eps);
756 }
static bool on_reference_element(const Point &p, const ElemType t, const Real eps=TOLERANCE)
Definition: fe_abstract.C:637

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

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.

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

◆ shape() [1/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 760 of file fe_interface.C.

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

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(), libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_constraints(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), main(), libMesh::HCurlFETransformation< OutputShape >::map_phi(), libMesh::HDivFETransformation< OutputShape >::map_phi(), libMesh::InfFE< Dim, T_radial, T_map >::shape(), shape(), libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv(), shape_function(), and NavierSystem::side_constraint().

765 {
766  libmesh_deprecated();
767 
768 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
769 
770  if (is_InfFE_elem(t))
771  return ifem_shape(dim, fe_t, t, i, p);
772 
773 #endif
774 
775  const Order o = fe_t.order;
776 
777  fe_switch(shape(t,o,i,p));
778 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ shape() [2/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 780 of file fe_interface.C.

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

785 {
786  libmesh_deprecated();
787 
788 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
789 
790  if (elem && is_InfFE_elem(elem->type()))
791  return ifem_shape(fe_t, elem, i, p);
792 
793 #endif
794 
795  const Order o = fe_t.order;
796 
797  fe_switch(shape(elem,o,i,p));
798 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real ifem_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 ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ shape() [3/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 804 of file fe_interface.C.

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

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

◆ shape() [4/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 831 of file fe_interface.C.

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

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

◆ shape() [5/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() [6/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() [7/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() [8/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() [9/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 
)

Definition at line 863 of file fe_interface.C.

References dim.

869 {
870  libmesh_deprecated();
871 
872 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
873 
874  if (is_InfFE_elem(t))
875  {
876  phi = ifem_shape(dim, fe_t, t, i, p);
877  return;
878  }
879 
880 #endif
881 
882  const Order o = fe_t.order;
883 
884  switch(dim)
885  {
886  case 0:
887  fe_scalar_vec_error_switch(0, shape(t,o,i,p), phi = , ; break;);
888  break;
889  case 1:
890  fe_scalar_vec_error_switch(1, shape(t,o,i,p), phi = , ; break;);
891  break;
892  case 2:
893  fe_scalar_vec_error_switch(2, shape(t,o,i,p), phi = , ; break;);
894  break;
895  case 3:
896  fe_scalar_vec_error_switch(3, shape(t,o,i,p), phi = , ; break;);
897  break;
898  default:
899  libmesh_error_msg("Invalid dimension = " << dim);
900  }
901 
902  return;
903 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ shape() [10/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 
)

Definition at line 908 of file fe_interface.C.

References dim.

914 {
915  libmesh_deprecated();
916 
917 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
918 
919  if (elem && is_InfFE_elem(elem->type()))
920  {
921  phi = ifem_shape(fe_t, elem, i, p);
922  return;
923  }
924 #endif
925 
926  const Order o = fe_t.order;
927 
928  switch(dim)
929  {
930  case 0:
931  fe_scalar_vec_error_switch(0, shape(elem,o,i,p), phi = , ; break;);
932  break;
933  case 1:
934  fe_scalar_vec_error_switch(1, shape(elem,o,i,p), phi = , ; break;);
935  break;
936  case 2:
937  fe_scalar_vec_error_switch(2, shape(elem,o,i,p), phi = , ; break;);
938  break;
939  case 3:
940  fe_scalar_vec_error_switch(3, shape(elem,o,i,p), phi = , ; break;);
941  break;
942  default:
943  libmesh_error_msg("Invalid dimension = " << dim);
944  }
945 
946  return;
947 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ shape() [11/16]

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

Definition at line 953 of file fe_interface.C.

References dim.

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

◆ shape() [12/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 
)

Definition at line 996 of file fe_interface.C.

References dim.

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

◆ shape() [13/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 
)

Definition at line 1136 of file fe_interface.C.

References dim.

1142 {
1143  libmesh_deprecated();
1144 
1145  // This API does not currently support infinite elements.
1146 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1147  if (is_InfFE_elem(t))
1148  {
1149  libmesh_not_implemented();
1150  }
1151 #endif
1152  const Order o = fe_t.order;
1153 
1154  switch(dim)
1155  {
1156  case 0:
1157  fe_vector_scalar_error_switch(0, shape(t,o,i,p), phi = , ; break;);
1158  break;
1159  case 1:
1160  fe_vector_scalar_error_switch(1, shape(t,o,i,p), phi = , ; break;);
1161  break;
1162  case 2:
1163  fe_vector_scalar_error_switch(2, shape(t,o,i,p), phi = , ; break;);
1164  break;
1165  case 3:
1166  fe_vector_scalar_error_switch(3, shape(t,o,i,p), phi = , ; break;);
1167  break;
1168  default:
1169  libmesh_error_msg("Invalid dimension = " << dim);
1170  }
1171 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ shape() [14/16]

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

Definition at line 1177 of file fe_interface.C.

References dim.

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

◆ shape() [15/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 
)

Definition at line 1222 of file fe_interface.C.

References dim.

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

◆ shape() [16/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 
)

Definition at line 1851 of file fe_interface.C.

References dim.

1857 {
1858  libmesh_deprecated();
1859 
1860  // This is actually an issue for infinite elements: They require type 'Gradient'!
1861  if (elem->infinite())
1862  libmesh_not_implemented();
1863 
1864  const Order o = fe_t.order;
1865 
1866  switch(dim)
1867  {
1868  case 0:
1869  fe_vector_scalar_error_switch(0, shape(elem,o,i,p), phi = , ; break;);
1870  break;
1871  case 1:
1872  fe_vector_scalar_error_switch(1, shape(elem,o,i,p), phi = , ; break;);
1873  break;
1874  case 2:
1875  fe_vector_scalar_error_switch(2, shape(elem,o,i,p), phi = , ; break;);
1876  break;
1877  case 3:
1878  fe_vector_scalar_error_switch(3, shape(elem,o,i,p), phi = , ; break;);
1879  break;
1880  default:
1881  libmesh_error_msg("Invalid dimension = " << dim);
1882  }
1883 
1884  return;
1885 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760

◆ shape_deriv() [1/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 1380 of file fe_interface.C.

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

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

1386 {
1387  libmesh_deprecated();
1388 
1389  libmesh_assert_greater (dim,j);
1390 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1391 
1392  if (is_InfFE_elem(t)){
1393  return ifem_shape_deriv(dim, fe_t, t, i, j, p);
1394  }
1395 
1396 #endif
1397 
1398  const Order o = fe_t.order;
1399  fe_switch(shape_deriv(t,o,i,j,p));
1400  return 0;
1401 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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)
unsigned int dim
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52
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)

◆ shape_deriv() [2/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 1404 of file fe_interface.C.

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

1410 {
1411  libmesh_deprecated();
1412 
1413  libmesh_assert_greater (dim,j);
1414 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1415 
1416  if (elem->infinite()){
1417  return ifem_shape_deriv(fe_t, elem, i, j, p);
1418  }
1419 
1420 #endif
1421 
1422  const Order o = fe_t.order;
1423 
1424  switch(dim)
1425  {
1426  case 0:
1427  fe_family_switch (0, shape_deriv(elem, o, i, j, p), return , ;);
1428  case 1:
1429  fe_family_switch (1, shape_deriv(elem, o, i, j, p), return , ;);
1430  case 2:
1431  fe_family_switch (2, shape_deriv(elem, o, i, j, p), return , ;);
1432  case 3:
1433  fe_family_switch (3, shape_deriv(elem, o, i, j, p), return , ;);
1434  default:
1435  libmesh_error_msg("Invalid dimension = " << dim);
1436  }
1437  return 0;
1438 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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)
unsigned int dim
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)

◆ shape_deriv() [3/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 1443 of file fe_interface.C.

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

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

◆ shape_deriv() [4/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 1471 of file fe_interface.C.

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

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

◆ shape_deriv_function() [1/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_edge_shape_functions(), libMesh::FEMap::init_face_shape_functions(), libMesh::FEMap::init_reference_to_physical_map(), and libMesh::FEMap::map_deriv().

◆ shape_deriv_function() [2/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 1650 of file fe_interface.C.

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

1652 {
1653  // dim is needed by the fe_switch macros below
1654  auto dim = elem->dim();
1655 
1656 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1657  if (is_InfFE_elem(elem->type()))
1658  {
1659  inf_fe_switch(shape_deriv);
1660  }
1661 #endif
1662  fe_switch(shape_deriv);
1663 }
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)
unsigned int dim
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ 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.

◆ 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 
)

Definition at line 1516 of file fe_interface.C.

1523 {
1524  const Order o = fe_t.order;
1525 
1526  switch(elem->dim())
1527  {
1528  case 0:
1529  fe_scalar_vec_error_switch(0, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1530  break;
1531  case 1:
1532  fe_scalar_vec_error_switch(1, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1533  break;
1534  case 2:
1535  fe_scalar_vec_error_switch(2, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1536  break;
1537  case 3:
1538  fe_scalar_vec_error_switch(3, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1539  break;
1540  default:
1541  libmesh_error_msg("Invalid dimension = " << elem->dim());
1542  }
1543 
1544  return;
1545 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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. ...

◆ 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 
)

Definition at line 1596 of file fe_interface.C.

1603 {
1604  const Order o = fe_t.order;
1605 
1606  switch(elem->dim())
1607  {
1608  case 0:
1609  fe_vector_scalar_error_switch(0, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1610  break;
1611  case 1:
1612  fe_vector_scalar_error_switch(1, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1613  break;
1614  case 2:
1615  fe_vector_scalar_error_switch(2, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1616  break;
1617  case 3:
1618  fe_vector_scalar_error_switch(3, shape_derivs(elem,o,i,j,p,dphi,add_p_level), , ; break;);
1619  break;
1620  default:
1621  libmesh_error_msg("Invalid dimension = " << elem->dim());
1622  }
1623 
1624  return;
1625 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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. ...

◆ shape_function() [1/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_edge_shape_functions(), libMesh::FEMap::init_face_shape_functions(), and libMesh::FEMap::map().

◆ shape_function() [2/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 1364 of file fe_interface.C.

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

1366 {
1367  // dim is needed by the fe_switch macros below
1368  auto dim = elem->dim();
1369 
1370 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1371  if (is_InfFE_elem(elem->type()))
1372  inf_fe_switch(shape);
1373 #endif
1374  fe_switch(shape);
1375 }
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:760
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ shape_second_deriv() [1/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 1668 of file fe_interface.C.

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

Referenced by shape_second_deriv(), and shape_second_deriv_function().

1674 {
1675  libmesh_deprecated();
1676 
1677  libmesh_assert_greater_equal (dim*(dim-1),j);
1678 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1679  if (is_InfFE_elem(t))
1680  libmesh_not_implemented();
1681 #endif
1682 
1683  const Order o = fe_t.order;
1684 
1685  switch(dim)
1686  {
1687  case 0:
1688  fe_family_switch (0, shape_second_deriv(t, o, i, j, p), return , ;);
1689  case 1:
1690  fe_family_switch (1, shape_second_deriv(t, o, i, j, p), return , ;);
1691  case 2:
1692  fe_family_switch (2, shape_second_deriv(t, o, i, j, p), return , ;);
1693  case 3:
1694  fe_family_switch (3, shape_second_deriv(t, o, i, j, p), return , ;);
1695  default:
1696  libmesh_error_msg("Invalid dimension = " << dim);
1697  }
1698  return 0;
1699 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int dim
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 bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ shape_second_deriv() [2/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 1702 of file fe_interface.C.

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

1708 {
1709  libmesh_deprecated();
1710 
1711  libmesh_assert_greater_equal (dim*(dim-1),j);
1712 
1713  if (elem->infinite())
1714  libmesh_not_implemented();
1715 
1716  const Order o = fe_t.order;
1717 
1718  switch(dim)
1719  {
1720  case 0:
1721  fe_family_switch (0, shape_second_deriv(elem, o, i, j, p), return , ;);
1722  case 1:
1723  fe_family_switch (1, shape_second_deriv(elem, o, i, j, p), return , ;);
1724  case 2:
1725  fe_family_switch (2, shape_second_deriv(elem, o, i, j, p), return , ;);
1726  case 3:
1727  fe_family_switch (3, shape_second_deriv(elem, o, i, j, p), return , ;);
1728  default:
1729  libmesh_error_msg("Invalid dimension = " << dim);
1730  }
1731  return 0;
1732 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int dim
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)

◆ shape_second_deriv() [3/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 1737 of file fe_interface.C.

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

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

◆ shape_second_deriv() [4/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 1774 of file fe_interface.C.

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

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

◆ shape_second_deriv_function() [1/2]

static shape_second_deriv_ptr libMesh::FEInterface::shape_second_deriv_function ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t 
)
static

◆ shape_second_deriv_function() [2/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 1834 of file fe_interface.C.

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

1836 {
1837  auto dim = elem->dim();
1838 
1839 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1840  if (is_InfFE_elem(elem->type()))
1841  libmesh_not_implemented();
1842 #endif
1843  fe_switch(shape_second_deriv);
1844 }
unsigned int dim
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 bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52

◆ 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.

◆ 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 
)

Definition at line 1047 of file fe_interface.C.

References dim, libMesh::index_range(), and libMesh::FEType::order.

1054 {
1055 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1056 
1057  if (elem && is_InfFE_elem(elem->type()))
1058  {
1059  FEType elevated = fe_t;
1060  elevated.order = fe_t.order + add_p_level * elem->p_level();
1061  for (auto qpi : index_range(p))
1062  phi[qpi] = ifem_shape(elevated, elem, i, p[qpi]);
1063  return;
1064  }
1065 #endif
1066 
1067  const Order o = fe_t.order;
1068 
1069  switch(dim)
1070  {
1071  case 0:
1072  fe_scalar_vec_error_switch(0, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1073  break;
1074  case 1:
1075  fe_scalar_vec_error_switch(1, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1076  break;
1077  case 2:
1078  fe_scalar_vec_error_switch(2, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1079  break;
1080  case 3:
1081  fe_scalar_vec_error_switch(3, shapes(elem,o,i,p,phi,add_p_level), , ; return;);
1082  break;
1083  default:
1084  libmesh_error_msg("Invalid dimension = " << dim);
1085  }
1086 
1087  return;
1088 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
unsigned int dim
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.
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52
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:117

◆ 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 
)

Definition at line 1270 of file fe_interface.C.

References dim.

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

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

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

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

657 {
658 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
659 
660  if (is_InfFE_elem(elem->type()))
661  {
662  libmesh_not_implemented();
663  return;
664  }
665 
666 #endif
667 
668  const Order order = fe_t.order;
669  const unsigned int dim = elem->dim();
670 
671  void_fe_with_vec_switch(side_nodal_soln(elem, order, side, elem_soln, nodal_soln, add_p_level, vdim));
672 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int dim
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.
Definition: fe_interface.C:650
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.C:52
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.
Definition: fe_interface.C:625

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