Go to the documentation of this file.
24 #include "libmesh/fe_base.h"
25 #include "libmesh/libmesh.h"
37 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
39 template <
unsigned int friend_Dim, FEFamily friend_T_radial, InfMapType friend_T_map>
94 template <
unsigned int Dim, FEFamily T>
119 const unsigned int i,
134 const unsigned int i,
136 const bool add_p_level =
true);
147 const unsigned int i,
148 const unsigned int j,
161 const unsigned int i,
162 const unsigned int j,
164 const bool add_p_level =
true);
166 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
189 const unsigned int i,
190 const unsigned int j,
217 const unsigned int i,
218 const unsigned int j,
220 const bool add_p_level =
true);
222 #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
230 const std::vector<Number> & elem_soln,
266 const unsigned int n);
297 std::vector<unsigned int> & di);
307 std::vector<unsigned int> & di);
312 const bool secure =
true) {
318 const std::vector<Point> & physical_points,
319 std::vector<Point> & reference_points,
321 const bool secure =
true) {
338 const std::vector<Point> *
const pts =
nullptr,
339 const std::vector<Real> *
const weights =
nullptr)
override;
351 const unsigned int side,
353 const std::vector<Point> *
const pts =
nullptr,
354 const std::vector<Real> *
const weights =
nullptr)
override;
366 const unsigned int edge,
368 const std::vector<Point> *
const pts =
nullptr,
369 const std::vector<Real> *
const weights =
nullptr)
override;
377 const unsigned int s,
378 const std::vector<Point> & reference_side_points,
379 std::vector<Point> & reference_points)
override;
395 #ifdef LIBMESH_ENABLE_AMR
404 const unsigned int variable_number,
406 #endif // #ifdef LIBMESH_ENABLE_AMR
417 const Point & reference_point) {
419 return FEMap::map(Dim, elem, reference_point);
423 const Point & reference_point) {
429 const Point & reference_point) {
435 const Point & reference_point) {
440 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
445 template <
unsigned int friend_Dim, FEFamily friend_T_radial, InfMapType friend_T_map>
461 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
468 const Elem * e)
override;
495 template <
unsigned int Dim>
519 template <
unsigned int Dim>
533 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
557 const unsigned int i,
559 const bool add_p_level);
564 const unsigned int i,
565 const unsigned int j,
567 const bool add_p_level);
569 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
573 const unsigned int i,
574 const unsigned int j,
576 const bool add_p_level);
602 const std::vector<Point> *
const pts =
nullptr,
603 const std::vector<Real> *
const weights =
nullptr)
override;
612 const std::vector<Point> *
const =
nullptr,
613 const std::vector<Real> *
const =
nullptr)
override
614 { libmesh_not_implemented(); }
631 const Elem * elem)
override;
650 const unsigned int j,
654 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
662 const unsigned int j,
667 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVE
678 const unsigned int valence);
686 unsigned int valence);
698 template <
unsigned int Dim>
722 template <
unsigned int Dim>
746 template <
unsigned int Dim>
765 template <
unsigned int Dim>
788 template <
unsigned int Dim>
807 template <
unsigned int Dim>
833 template <
unsigned int Dim>
853 const std::vector<Point> *
const pts =
nullptr,
854 const std::vector<Real> *
const weights =
nullptr)
override
862 const unsigned int side,
864 const std::vector<Point> *
const pts =
nullptr,
865 const std::vector<Real> *
const weights =
nullptr)
override;
878 const Elem * e)
override;
897 const std::vector<Real> & weights);
909 template <
unsigned int Dim>
933 template <
unsigned int Dim>
954 template <
unsigned int Dim>
974 namespace FiniteElements
1080 #endif // LIBMESH_FE_H
FESubdivision(const FEType &fet)
Constructor.
The constraint matrix storage format.
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
The QBase class provides the basic functionality from which various quadrature rules can be derived.
FEClough(const FEType &fet)
Constructor.
FELagrange(const FEType &fet)
Constructor.
static void init_subdivision_matrix(DenseMatrix< Real > &A, unsigned int valence)
Builds the subdivision matrix A for the Loop scheme.
FEHermite(const FEType &fet)
Constructor.
FEGenericBase< typename FEOutputType< T >::type >::OutputShape OutputShape
static void dofs_on_side(const Elem *const elem, const Order o, unsigned int s, std::vector< unsigned int > &di)
Fills the vector di with the local degree of freedom indices associated with side s of element elem.
static Real regular_shape_second_deriv(const unsigned int i, const unsigned int j, const Real v, const Real w)
virtual unsigned int n_shape_functions() const override
FEOutputType< T >::type OutputShape
Convenient typedefs for gradients of output, hessians of output, and potentially-complex-valued versi...
FE< 2, HIERARCHIC > FEHierarchic2D
Convenient definition for a 2D Hierarchic finite element.
FE< 2, MONOMIAL > FEMonomial2D
Convenient definition for a 2D Monomial finite element.
virtual void init_shape_functions(const std::vector< Point > &qp, const Elem *elem) override
Update the various member data fields phi, dphidxi, dphideta, dphidzeta, etc.
static Point map_deriv(const unsigned int dim, const Elem *elem, const unsigned int j, const Point &reference_point)
static Point map_eta(const Elem *elem, const Point &reference_point)
FEL2Lagrange(const FEType &fet)
Constructor.
FELagrangeVec(const FEType &fet)
Constructor.
A specific instantiation of the FEBase class.
FENedelecOne(const FEType &fet)
Constructor.
virtual void compute_shape_functions(const Elem *elem, const std::vector< Point > &qp) override
After having updated the jacobian and the transformation from local to global coordinates in FEAbstra...
static Point map_xi(const Elem *elem, const Point &reference_point)
The libMesh namespace provides an interface to certain functionality in the library.
This class forms the foundation from which generic finite elements may be derived.
FEMonomial(const FEType &fet)
Constructor.
FE< 3, LAGRANGE > FELagrange3D
Convenient definition for a 3D Lagrange finite element.
static const Real TOLERANCE
static Real hermite_raw_shape_second_deriv(const unsigned int basis_num, const Real xi)
1D hermite functions on unit interval
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
This is at the core of this class.
FE< 3, L2_LAGRANGE > FEL2Lagrange3D
Convenient definition for a 3D Discontinuous Lagrange finite element.
static Point map(const unsigned int dim, const Elem *elem, const Point &reference_point)
static Point map(const Elem *elem, const Point &reference_point)
FENedelecOne objects are used for working with vector-valued Nedelec finite elements of the first kin...
FEScalar(const FEType &fet)
Constructor.
FE< 2, LAGRANGE > FELagrange2D
Convenient definition for a 2D Lagrange finite element.
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
Explicitly call base class method.
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
static Real hermite_raw_shape(const unsigned int basis_num, const Real xi)
virtual void reinit(const Elem *, const unsigned int, const Real=TOLERANCE, const std::vector< Point > *const =nullptr, const std::vector< Real > *const =nullptr) override
This prevents some compilers being confused by partially overriding this virtual function.
FE< 1, LAGRANGE > FELagrange1D
Convenient definition for a 1D Lagrange finite element.
FEClough< 2 > FEClough2D
Convenient definition for a 2D Clough-Tocher finite element.
FE< 2, L2_HIERARCHIC > FEL2Hierarchic2D
Convenient definition for a 2D Discontinuous Hierarchic finite element.
static void inverse_map(const Elem *elem, const std::vector< Point > &physical_points, std::vector< Point > &reference_points, const Real tolerance=TOLERANCE, const bool secure=true)
virtual void init_base_shape_functions(const std::vector< Point > &qp, const Elem *e) override
Initialize the data fields for the base of an an infinite element.
A specific instantiation of the FEBase class.
virtual void attach_quadrature_rule(QBase *q) override
Provides the class with the quadrature rule, which provides the locations (on a reference element) wh...
virtual void edge_reinit(const Elem *elem, const unsigned int edge, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
Reinitializes all the physical element-dependent data based on the edge.
static void loop_subdivision_mask(std::vector< Real > &weights, const unsigned int valence)
Fills the vector weights with the weight coefficients of the Loop subdivision mask for evaluating the...
FELagrangeVec objects are used for working with vector-valued finite elements.
A Point defines a location in LIBMESH_DIM dimensional Real space.
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...
FE(const FEType &fet)
Constructor.
FE< 3, L2_HIERARCHIC > FEL2Hierarchic3D
Convenient definition for a 3D Discontinuous Hierarchic finite element.
virtual void init_shape_functions(const std::vector< Point > &qp, const Elem *e)
Update the various member data fields phi, dphidxi, dphideta, dphidzeta, etc.
Clough-Tocher finite elements.
static Real regular_shape_deriv(const unsigned int i, const unsigned int j, const Real v, const Real w)
static PetscErrorCode Mat * A
FEMonomialVec(const FEType &fet)
Constructor.
ElemType last_side
The last side and last edge we did a reinit on.
FE< 3, MONOMIAL > FEMonomial3D
Convenient definition for a 3D Monomial finite element.
void compute_face_values(const Elem *elem, const Elem *side, const std::vector< Real > &weights)
Compute the map & shape functions for this face.
virtual bool shapes_need_reinit() const override
FE< 1, L2_LAGRANGE > FEL2Lagrange1D
Convenient definition for a 1D Discontinuous Lagrange finite element.
Hierarchic finite elements.
FE< 1, HIERARCHIC > FEHierarchic1D
Convenient definition for a 1D Hierarchic finite element.
static Point map_zeta(const Elem *elem, const Point &reference_point)
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Discontinuous Hierarchic finite elements.
static unsigned int n_dofs_at_node(const ElemType t, const Order o, const unsigned int n)
static void nodal_soln(const Elem *elem, const Order o, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Build the nodal soln from the element soln.
virtual FEContinuity get_continuity() const override
This class handles the numbering of degrees of freedom on a mesh.
FE< 3, HIERARCHIC > FEHierarchic3D
Convenient definition for a 3D Hierarchic finite element.
static unsigned int n_dofs_per_elem(const ElemType t, const Order o)
FE< 2, L2_LAGRANGE > FEL2Lagrange2D
Convenient definition for a 2D Discontinuous Lagrange finite element.
virtual bool is_hierarchic() const override
FEHierarchic(const FEType &fet)
Constructor.
Lagrange finite elements.
This is the base class from which all geometric element types are derived.
FE< 1, MONOMIAL > FEMonomial1D
Convenient definition for a 1D Monomial finite element.
Most finite element types in libMesh are scalar-valued.
virtual void attach_quadrature_rule(QBase *q) override
Provides the class with the quadrature rule, which provides the locations (on a reference element) wh...
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
This is at the core of this class.
static unsigned int n_dofs(const ElemType t, const Order o)
virtual void init_shape_functions(const std::vector< Point > &qp, const Elem *e) override
Update the various member data fields phi, dphidxi, dphideta, dphidzeta, etc.
FEXYZ(const FEType &fet)
Constructor.
FE< 1, L2_HIERARCHIC > FEL2Hierarchic1D
Convenient definition for a 1D Discontinuous Hierarchic finite element.
FEL2Hierarchic(const FEType &fet)
Constructor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static void dofs_on_edge(const Elem *const elem, const Order o, unsigned int e, std::vector< unsigned int > &di)
Fills the vector di with the local degree of freedom indices associated with edge e of element elem.
FEMonomialVec objects are used for working with vector-valued discontinuous finite elements.
static Point inverse_map(const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
static unsigned int n_shape_functions(const ElemType t, const Order o)
static Real regular_shape(const unsigned int i, const Real v, const Real w)
virtual void side_map(const Elem *elem, const Elem *side, const unsigned int s, const std::vector< Point > &reference_side_points, std::vector< Point > &reference_points) override
Computes the reference space quadrature points on the side of an element based on the side quadrature...
virtual unsigned int n_quadrature_points() const override
The FEScalar class is used for working with SCALAR variables.
Discontinuous Lagrange finite elements.
static Real hermite_raw_shape_deriv(const unsigned int basis_num, const Real xi)
ElemType
Defines an enum for geometric element types.
std::vector< Point > cached_nodes
An array of the node locations on the last element we computed on.
Monomial finite elements.