20#ifndef LIBMESH_FE_INTERFACE_H
21#define LIBMESH_FE_INTERFACE_H
24#include "libmesh/libmesh_common.h"
25#include "libmesh/vector_value.h"
50#ifdef LIBMESH_ENABLE_PERIODIC
51class PeriodicBoundaries;
52class PointLocatorBase;
81#ifdef LIBMESH_ENABLE_DEPRECATED
99 const bool add_p_level =
true);
106 const int extra_order,
109#ifdef LIBMESH_ENABLE_DEPRECATED
113 static unsigned int n_dofs(
const unsigned int dim,
126 static unsigned int n_dofs(
const unsigned int dim,
139 const bool add_p_level =
true);
155#ifdef LIBMESH_ENABLE_DEPRECATED
170 const unsigned int n);
197 const unsigned int n,
198 const bool add_p_level =
true);
206 const int extra_order,
208 const unsigned int n);
210#ifdef LIBMESH_ENABLE_DEPRECATED
228 const bool add_p_level =
true);
234 const int extra_order,
248 const unsigned int dim,
251 std::vector<unsigned int> & di,
252 const bool add_p_level =
true);
265 const unsigned int dim,
268 std::vector<unsigned int> & di,
269 const bool add_p_level =
true);
290 const std::vector<Number> & elem_soln,
292 const bool add_p_level =
true,
293 const unsigned int vdim = 1);
306 const unsigned int side,
307 const std::vector<Number> & elem_soln,
309 const bool add_p_level =
true,
310 const unsigned int vdim = 1);
312#ifdef LIBMESH_ENABLE_DEPRECATED
329 const bool secure =
true);
337 const std::vector<Point> & physical_points,
338 std::vector<Point> & reference_points,
340 const bool secure =
true);
375 const unsigned int i,
394 const unsigned int i,
407 const unsigned int i,
409 const bool add_p_level =
true);
421 const unsigned int i,
424#ifdef LIBMESH_ENABLE_DEPRECATED
438 template<
typename OutputType>
442 const unsigned int i,
459 template<
typename OutputType>
463 const unsigned int i,
477 template<
typename OutputType>
480 const unsigned int i,
493 template<
typename OutputType>
497 const unsigned int i,
519 template<
typename OutputType>
523 const unsigned int i,
524 const std::vector<Point> & p,
525 std::vector<OutputType> & phi,
526 const bool add_p_level =
true);
528 template<
typename OutputType>
532 const std::vector<Point> & p,
533 std::vector<std::vector<OutputType>> & phi,
534 const bool add_p_level =
true);
543 const unsigned int i,
545 const bool add_p_level);
547#ifdef LIBMESH_ENABLE_DEPRECATED
565#ifdef LIBMESH_ENABLE_DEPRECATED
581 const unsigned int i,
582 const unsigned int j,
591 const unsigned int i,
592 const unsigned int j,
608 const unsigned int i,
609 const unsigned int j,
618 const unsigned int i,
619 const unsigned int j,
626 template<
typename OutputType>
629 const unsigned int i,
630 const unsigned int j,
631 const std::vector<Point> & p,
632 std::vector<OutputType> & dphi,
633 const bool add_p_level =
true);
635 template<
typename OutputType>
639 const std::vector<Point> & p,
640 std::vector<std::vector<OutputType>> * comps[3],
641 const bool add_p_level =
true);
650 const unsigned int i,
651 const unsigned int j,
653 const bool add_p_level);
673#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
675#ifdef LIBMESH_ENABLE_DEPRECATED
701 const unsigned int i,
702 const unsigned int j,
712 const unsigned int i,
713 const unsigned int j,
734 const unsigned int i,
735 const unsigned int j,
744 const unsigned int i,
745 const unsigned int j,
755 const unsigned int i,
756 const unsigned int j,
758 const bool add_p_level);
760#ifdef LIBMESH_ENABLE_DEPRECATED
798#ifdef LIBMESH_ENABLE_AMR
806 const unsigned int variable_number,
810#ifdef LIBMESH_ENABLE_PERIODIC
821 const unsigned int variable_number,
885#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
899#ifdef LIBMESH_ENABLE_DEPRECATED
907 const unsigned int n);
912 const unsigned int n);
914#ifdef LIBMESH_ENABLE_DEPRECATED
930 const std::vector<Number> & elem_soln,
943 const bool secure =
true);
948 const std::vector<Point> & physical_points,
949 std::vector<Point> & reference_points,
951 const bool secure =
true);
953#ifdef LIBMESH_ENABLE_DEPRECATED
969 const unsigned int i,
979 const unsigned int i,
985 const unsigned int i,
988#ifdef LIBMESH_ENABLE_DEPRECATED
996 const unsigned int i,
997 const unsigned int j,
1007 const unsigned int i,
1008 const unsigned int j,
1014 const unsigned int i,
1015 const unsigned int j,
void ErrorVector unsigned int
The constraint matrix storage format.
This class handles the numbering of degrees of freedom on a mesh.
This is the base class from which all geometric element types are derived.
class FEComputeData hides arbitrary data to be passed to and from children of FEBase through the FEIn...
This class provides an encapsulated access to all static public member functions of finite element cl...
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
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...
static void shape(const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, OutputType &phi)
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 Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
static bool is_InfFE_elem(const ElemType et)
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 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)
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.
static bool is_hierarchic(const FEType &fe_type)
Returns whether or not the input FEType's higher-order shape functions are always hierarchic.
FEInterface()
Empty constructor.
static shape_deriv_ptr shape_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
static bool ifem_on_reference_element(const Point &p, const ElemType t, const Real eps)
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.
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 n_dofs_at_node_ptr n_dofs_at_node_function(const unsigned int dim, const FEType &fe_t)
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,...
static void ifem_compute_data(const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
static bool on_reference_element(const Point &p, const ElemType t, const Real eps=TOLERANCE)
static FEFieldType field_type(const FEType &fe_type)
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 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 shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p, OutputType &phi)
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.
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,...
unsigned int(* n_dofs_at_node_ptr)(const ElemType, const Order, const unsigned int)
static shape_second_deriv_ptr shape_second_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
static unsigned int ifem_n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
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 vari...
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 unsigned int ifem_n_dofs_per_elem(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)
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.
static Point ifem_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
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 Point inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
This is now deprecated; use FEMap::inverse_map instead.
static void nodal_soln(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln, const bool add_p_level=true, const unsigned int vdim=1)
Build the nodal soln from the element soln.
static unsigned int max_order(const FEType &fe_t, const ElemType &el_t)
static unsigned int ifem_n_dofs(const FEType &fe_t, const Elem *elem)
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
static shape_ptr shape_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
static void shape(const FEType &fe_t, int extra_order, const Elem *elem, const unsigned int i, const Point &p, OutputType &phi)
static bool orientation_dependent(const FEFamily &fe_family)
virtual ~FEInterface()=default
Destructor.
static bool extra_hanging_dofs(const FEType &fe_t)
static void side_nodal_soln(const FEType &fe_t, const Elem *elem, const unsigned int side, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln, const bool add_p_level=true, const unsigned int vdim=1)
Build the nodal soln on one side from the (full) element soln.
static 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...
static void compute_constraints(DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem)
Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to var...
static void shape(const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, OutputType &phi)
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
static Point map(unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
This is now deprecated; use FEMap::map instead.
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
This is the MeshBase class.
We're using a class instead of a typedef to allow forward declarations and future flexibility.
This is the base class for point locators.
A Point defines a location in LIBMESH_DIM dimensional Real space.
The libMesh namespace provides an interface to certain functionality in the library.
ElemType
Defines an enum for geometric element types.
static constexpr Real TOLERANCE
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real