MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::FiniteElement Class Referenceabstract

Abstract class for all finite elements. More...

#include <fe_base.hpp>

Inheritance diagram for mfem::FiniteElement:
[legend]
Collaboration diagram for mfem::FiniteElement:
[legend]

Public Types

enum  RangeType { UNKNOWN_RANGE_TYPE = -1 , SCALAR , VECTOR }
 Enumeration for range_type and deriv_range_type. More...
 
enum  MapType {
  UNKNOWN_MAP_TYPE = -1 , VALUE , INTEGRAL , H_DIV ,
  H_CURL
}
 Enumeration for MapType: defines how reference functions are mapped to physical space. More...
 
enum  DerivType { NONE , GRAD , DIV , CURL }
 Enumeration for DerivType: defines which derivative method is implemented. More...
 

Public Member Functions

 FiniteElement (int D, Geometry::Type G, int Do, int O, int F=FunctionSpace::Pk)
 Construct FiniteElement with given.
 
int GetDim () const
 Returns the reference space dimension for the finite element.
 
int GetRangeDim () const
 Returns the vector dimension for vector-valued finite elements, which is also the dimension of the interpolation operation.
 
int GetCurlDim () const
 Returns the dimension of the curl for vector-valued finite elements.
 
Geometry::Type GetGeomType () const
 Returns the Geometry::Type of the reference element.
 
int GetDof () const
 Returns the number of degrees of freedom in the finite element.
 
int GetOrder () const
 Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order.
 
bool HasAnisotropicOrders () const
 Returns true if the FiniteElement basis may be using different orders/degrees in different spatial directions.
 
const int * GetAnisotropicOrders () const
 Returns an array containing the anisotropic orders/degrees.
 
int Space () const
 Returns the type of FunctionSpace on the element.
 
int GetRangeType () const
 Returns the FiniteElement::RangeType of the element, one of {SCALAR, VECTOR}.
 
int GetDerivRangeType () const
 Returns the FiniteElement::RangeType of the element derivative, either SCALAR or VECTOR.
 
int GetMapType () const
 Returns the FiniteElement::MapType of the element describing how reference functions are mapped to physical space, one of {VALUE, INTEGRAL H_DIV, H_CURL}.
 
int GetDerivType () const
 Returns the FiniteElement::DerivType of the element describing the spatial derivative method implemented, one of {NONE, GRAD, DIV, CURL}.
 
int GetDerivMapType () const
 Returns the FiniteElement::DerivType of the element describing how reference function derivatives are mapped to physical space, one of {VALUE, INTEGRAL, H_DIV, H_CURL}.
 
virtual void CalcShape (const IntegrationPoint &ip, Vector &shape) const =0
 Evaluate the values of all shape functions of a scalar finite element in reference space at the given point ip.
 
void CalcPhysShape (ElementTransformation &Trans, Vector &shape) const
 Evaluate the values of all shape functions of a scalar finite element in physical space at the point described by Trans.
 
virtual void CalcDShape (const IntegrationPoint &ip, DenseMatrix &dshape) const =0
 Evaluate the gradients of all shape functions of a scalar finite element in reference space at the given point ip.
 
void CalcPhysDShape (ElementTransformation &Trans, DenseMatrix &dshape) const
 Evaluate the gradients of all shape functions of a scalar finite element in physical space at the point described by Trans.
 
const IntegrationRuleGetNodes () const
 Get a const reference to the nodes of the element.
 
virtual void CalcVShape (const IntegrationPoint &ip, DenseMatrix &shape) const
 Evaluate the values of all shape functions of a vector finite element in reference space at the given point ip.
 
virtual void CalcVShape (ElementTransformation &Trans, DenseMatrix &shape) const
 Evaluate the values of all shape functions of a vector finite element in physical space at the point described by Trans.
 
void CalcPhysVShape (ElementTransformation &Trans, DenseMatrix &shape) const
 Equivalent to the CalcVShape() method with the same arguments.
 
virtual void CalcDivShape (const IntegrationPoint &ip, Vector &divshape) const
 Evaluate the divergence of all shape functions of a vector finite element in reference space at the given point ip.
 
void CalcPhysDivShape (ElementTransformation &Trans, Vector &divshape) const
 Evaluate the divergence of all shape functions of a vector finite element in physical space at the point described by Trans.
 
virtual void CalcCurlShape (const IntegrationPoint &ip, DenseMatrix &curl_shape) const
 Evaluate the curl of all shape functions of a vector finite element in reference space at the given point ip.
 
virtual void CalcPhysCurlShape (ElementTransformation &Trans, DenseMatrix &curl_shape) const
 Evaluate the curl of all shape functions of a vector finite element in physical space at the point described by Trans.
 
virtual void GetFaceDofs (int face, int **dofs, int *ndofs) const
 Get the dofs associated with the given face. *dofs is set to an internal array of the local dofc on the face, while *ndofs is set to the number of dofs on that face.
 
virtual void CalcHessian (const IntegrationPoint &ip, DenseMatrix &Hessian) const
 Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the given point ip.
 
virtual void CalcPhysHessian (ElementTransformation &Trans, DenseMatrix &Hessian) const
 Evaluate the Hessian of all shape functions of a scalar finite element in reference space at the given point ip.
 
virtual void CalcPhysLaplacian (ElementTransformation &Trans, Vector &Laplacian) const
 Evaluate the Laplacian of all shape functions of a scalar finite element in reference space at the given point ip.
 
virtual void CalcPhysLinLaplacian (ElementTransformation &Trans, Vector &Laplacian) const
 
virtual void GetLocalInterpolation (ElementTransformation &Trans, DenseMatrix &I) const
 Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base geometry under the given transformation.
 
virtual void GetLocalRestriction (ElementTransformation &Trans, DenseMatrix &R) const
 Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.
 
virtual void GetTransferMatrix (const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
 Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this finite element.
 
virtual void Project (Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
 Given a coefficient and a transformation, compute its projection (approximation) in the local finite dimensional space in terms of the degrees of freedom.
 
virtual void Project (VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
 Given a vector coefficient and a transformation, compute its projection (approximation) in the local finite dimensional space in terms of the degrees of freedom. (VectorFiniteElements)
 
virtual void ProjectFromNodes (Vector &vc, ElementTransformation &Trans, Vector &dofs) const
 Given a vector of values at the finite element nodes and a transformation, compute its projection (approximation) in the local finite dimensional space in terms of the degrees of freedom. Valid for VectorFiniteElements.
 
virtual void ProjectMatrixCoefficient (MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
 Given a matrix coefficient and a transformation, compute an approximation ("projection") in the local finite dimensional space in terms of the degrees of freedom. For VectorFiniteElements, the rows of the coefficient are projected in the vector space.
 
virtual void ProjectDelta (int vertex, Vector &dofs) const
 Project a delta function centered on the given vertex in the local finite dimensional space represented by the dofs.
 
virtual void Project (const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
 Compute the embedding/projection matrix from the given FiniteElement onto 'this' FiniteElement. The ElementTransformation is included to support cases when the projection depends on it.
 
virtual void ProjectGrad (const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
 Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
 
virtual void ProjectCurl (const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
 Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
 
virtual void ProjectDiv (const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &div) const
 Compute the discrete divergence matrix from the given FiniteElement onto 'this' FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
 
virtual const DofToQuadGetDofToQuad (const IntegrationRule &ir, DofToQuad::Mode mode) const
 Return a DofToQuad structure corresponding to the given IntegrationRule using the given DofToQuad::Mode.
 
virtual void GetFaceMap (const int face_id, Array< int > &face_map) const
 Return the mapping from lexicographic face DOFs to lexicographic element DOFs for the given local face face_id.
 
virtual const StatelessDofTransformationGetDofTransformation () const
 Return a DoF transformation object for this particular type of basis.
 
virtual ~FiniteElement ()
 Deconstruct the FiniteElement.
 

Static Public Member Functions

static bool IsClosedType (int b_type)
 Return true if the BasisType of b_type is closed (has Quadrature1D points on the boundary).
 
static bool IsOpenType (int b_type)
 Return true if the BasisType of b_type is open (doesn't have Quadrature1D points on the boundary).
 
static int VerifyClosed (int b_type)
 Ensure that the BasisType of b_type is closed (has Quadrature1D points on the boundary).
 
static int VerifyOpen (int b_type)
 Ensure that the BasisType of b_type is open (doesn't have Quadrature1D points on the boundary).
 
static int VerifyNodal (int b_type)
 Ensure that the BasisType of b_type nodal (satisfies the interpolation property).
 

Protected Attributes

int dim
 Dimension of reference space.
 
int vdim
 Vector dimension of vector-valued basis functions.
 
int cdim
 Dimension of curl for vector-valued basis functions.
 
Geometry::Type geom_type
 Geometry::Type of the reference element.
 
int func_space
 
int range_type
 
int map_type
 
int deriv_type
 
int deriv_range_type
 
int deriv_map_type
 
int dof
 Number of degrees of freedom.
 
int order
 Order/degree of the shape functions.
 
int orders [Geometry::MaxDim]
 Anisotropic orders.
 
IntegrationRule Nodes
 
DenseMatrix vshape
 
Array< DofToQuad * > dof2quad_array
 Container for all DofToQuad objects created by the FiniteElement.
 

Detailed Description

Abstract class for all finite elements.

Definition at line 238 of file fe_base.hpp.

Member Enumeration Documentation

◆ DerivType

Enumeration for DerivType: defines which derivative method is implemented.

Each FiniteElement class implements up to one type of derivative. The value returned by GetDerivType() indicates which derivative method is implemented.

Enumerator
NONE 

No derivatives implemented.

GRAD 

Implements CalcDShape methods.

DIV 

Implements CalcDivShape methods.

CURL 

Implements CalcCurlShape methods.

Definition at line 297 of file fe_base.hpp.

◆ MapType

Enumeration for MapType: defines how reference functions are mapped to physical space.

A reference function \( \hat u(\hat x) \) can be mapped to a function \( u(x) \) on a general physical element in following ways:

  • \( x = T(\hat x) \) is the image of the reference point \( \hat x \)
  • \( J = J(\hat x) \) is the Jacobian matrix of the transformation T
  • \( w = w(\hat x) = det(J) \) is the transformation weight factor for square J
  • \( w = w(\hat x) = det(J^t J)^{1/2} \) is the transformation weight factor in general
Enumerator
UNKNOWN_MAP_TYPE 

Used to distinguish an unset MapType variable from the known values below.

VALUE 

For scalar fields; preserves point values \( u(x) = \hat u(\hat x) \)

INTEGRAL 

For scalar fields; preserves volume integrals \( u(x) = (1/w) \hat u(\hat x) \)

H_DIV 

For vector fields; preserves surface integrals of the normal component \( u(x) = (J/w) \hat u(\hat x) \)

H_CURL 

For vector fields; preserves line integrals of the tangential component \( u(x) = J^{-t} \hat u(\hat x) \) (square J), \( u(x) = J(J^t J)^{-1} \hat u(\hat x) \) (general J)

Definition at line 274 of file fe_base.hpp.

◆ RangeType

Enumeration for range_type and deriv_range_type.

Enumerator
UNKNOWN_RANGE_TYPE 
SCALAR 
VECTOR 

Definition at line 262 of file fe_base.hpp.

Constructor & Destructor Documentation

◆ FiniteElement()

mfem::FiniteElement::FiniteElement ( int D,
Geometry::Type G,
int Do,
int O,
int F = FunctionSpace::Pk )

Construct FiniteElement with given.

Parameters
DReference space dimension
GGeometry type (of type Geometry::Type)
DoNumber of degrees of freedom in the FiniteElement
OOrder/degree of the FiniteElement
FFunctionSpace type of the FiniteElement

Definition at line 23 of file fe_base.cpp.

◆ ~FiniteElement()

mfem::FiniteElement::~FiniteElement ( )
virtual

Deconstruct the FiniteElement.

Definition at line 513 of file fe_base.cpp.

Member Function Documentation

◆ CalcCurlShape()

void mfem::FiniteElement::CalcCurlShape ( const IntegrationPoint & ip,
DenseMatrix & curl_shape ) const
virtual

Evaluate the curl of all shape functions of a vector finite element in reference space at the given point ip.

Each row of the result DenseMatrix curl_shape contains the components of the curl of one vector shape function. The size (dof x CDim) of curl_shape must be set in advance, where CDim = 3 for dim = 3 and CDim = 1 for dim = 2.

Reimplemented in mfem::ND_HexahedronElement, mfem::ND_QuadrilateralElement, mfem::ND_R1D_SegmentElement, mfem::ND_R2D_QuadrilateralElement, mfem::ND_R2D_SegmentElement, mfem::ND_R2D_TriangleElement, mfem::ND_TetrahedronElement, mfem::ND_TriangleElement, mfem::ND_WedgeElement, mfem::Nedelec1HexFiniteElement, mfem::Nedelec1PyrFiniteElement, mfem::Nedelec1TetFiniteElement, and mfem::Nedelec1WdgFiniteElement.

Definition at line 65 of file fe_base.cpp.

◆ CalcDivShape()

◆ CalcDShape()

virtual void mfem::FiniteElement::CalcDShape ( const IntegrationPoint & ip,
DenseMatrix & dshape ) const
pure virtual

Evaluate the gradients of all shape functions of a scalar finite element in reference space at the given point ip.

Each row of the result DenseMatrix dshape contains the derivatives of one shape function. The size (dof x dim) of dshape must be set in advance.

Implemented in mfem::BiCubic2DFiniteElement, mfem::BiLinear2DFiniteElement, mfem::BiQuad2DFiniteElement, mfem::BiQuadPos2DFiniteElement, mfem::CrouzeixRaviartFiniteElement, mfem::CrouzeixRaviartQuadFiniteElement, mfem::Cubic1DFiniteElement, mfem::Cubic2DFiniteElement, mfem::Cubic3DFiniteElement, mfem::GaussBiLinear2DFiniteElement, mfem::GaussBiQuad2DFiniteElement, mfem::GaussLinear2DFiniteElement, mfem::GaussQuad2DFiniteElement, mfem::H1_HexahedronElement, mfem::H1_QuadrilateralElement, mfem::H1_SegmentElement, mfem::H1_TetrahedronElement, mfem::H1_TriangleElement, mfem::H1_WedgeElement, mfem::H1Pos_HexahedronElement, mfem::H1Pos_QuadrilateralElement, mfem::H1Pos_SegmentElement, mfem::H1Pos_TetrahedronElement, mfem::H1Pos_TriangleElement, mfem::H1Pos_WedgeElement, mfem::H1Ser_QuadrilateralElement, mfem::L2_HexahedronElement, mfem::L2_QuadrilateralElement, mfem::L2_SegmentElement, mfem::L2_TetrahedronElement, mfem::L2_TriangleElement, mfem::L2_WedgeElement, mfem::L2Pos_HexahedronElement, mfem::L2Pos_QuadrilateralElement, mfem::L2Pos_SegmentElement, mfem::L2Pos_TetrahedronElement, mfem::L2Pos_TriangleElement, mfem::L2Pos_WedgeElement, mfem::Lagrange1DFiniteElement, mfem::LagrangeHexFiniteElement, mfem::Linear1DFiniteElement, mfem::Linear2DFiniteElement, mfem::Linear3DFiniteElement, mfem::LinearPyramidFiniteElement, mfem::LinearWedgeFiniteElement, mfem::NURBS1DFiniteElement, mfem::NURBS2DFiniteElement, mfem::NURBS3DFiniteElement, mfem::P0HexFiniteElement, mfem::P0PyrFiniteElement, mfem::P0QuadFiniteElement, mfem::P0SegmentFiniteElement, mfem::P0TetFiniteElement, mfem::P0TriangleFiniteElement, mfem::P0WdgFiniteElement, mfem::P1OnQuadFiniteElement, mfem::P1SegmentFiniteElement, mfem::P1TetNonConfFiniteElement, mfem::P2SegmentFiniteElement, mfem::PointFiniteElement, mfem::Quad1DFiniteElement, mfem::Quad2DFiniteElement, mfem::QuadPos1DFiniteElement, mfem::Quadratic3DFiniteElement, mfem::RefinedBiLinear2DFiniteElement, mfem::RefinedLinear1DFiniteElement, mfem::RefinedLinear2DFiniteElement, mfem::RefinedLinear3DFiniteElement, mfem::RefinedTriLinear3DFiniteElement, mfem::RotTriLinearHexFiniteElement, and mfem::TriLinear3DFiniteElement.

◆ CalcHessian()

void mfem::FiniteElement::CalcHessian ( const IntegrationPoint & ip,
DenseMatrix & Hessian ) const
virtual

Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the given point ip.

Each row of the result DenseMatrix Hessian contains upper triangular part of the Hessian of one shape function. The order in 2D is {u_xx, u_xy, u_yy}. The size (dof x (dim (dim+1)/2) of Hessian must be set in advance.

Reimplemented in mfem::BiCubic2DFiniteElement, mfem::BiLinear2DFiniteElement, mfem::Cubic2DFiniteElement, mfem::H1_HexahedronElement, mfem::H1_QuadrilateralElement, mfem::H1_SegmentElement, mfem::H1_TetrahedronElement, mfem::H1_TriangleElement, mfem::NURBS1DFiniteElement, mfem::NURBS2DFiniteElement, mfem::NURBS3DFiniteElement, and mfem::Quad2DFiniteElement.

Definition at line 101 of file fe_base.cpp.

◆ CalcPhysCurlShape()

void mfem::FiniteElement::CalcPhysCurlShape ( ElementTransformation & Trans,
DenseMatrix & curl_shape ) const
virtual

Evaluate the curl of all shape functions of a vector finite element in physical space at the point described by Trans.

Each row of the result DenseMatrix curl_shape contains the components of the curl of one vector shape function. The size (dof x CDim) of curl_shape must be set in advance, where CDim = 3 for dim = 3 and CDim = 1 for dim = 2.

Reimplemented in mfem::ND_R1D_SegmentElement, mfem::ND_R2D_FiniteElement, mfem::ND_R2D_QuadrilateralElement, and mfem::ND_R2D_TriangleElement.

Definition at line 71 of file fe_base.cpp.

◆ CalcPhysDivShape()

void mfem::FiniteElement::CalcPhysDivShape ( ElementTransformation & Trans,
Vector & divshape ) const

Evaluate the divergence of all shape functions of a vector finite element in physical space at the point described by Trans.

The size (dof) of the result Vector divshape must be set in advance.

Definition at line 58 of file fe_base.cpp.

◆ CalcPhysDShape()

void mfem::FiniteElement::CalcPhysDShape ( ElementTransformation & Trans,
DenseMatrix & dshape ) const

Evaluate the gradients of all shape functions of a scalar finite element in physical space at the point described by Trans.

Each row of the result DenseMatrix dshape contains the derivatives of one shape function. The size (dof x SDim) of dshape must be set in advance, where SDim >= dim is the physical space dimension as described by Trans.

Definition at line 192 of file fe_base.cpp.

◆ CalcPhysHessian()

void mfem::FiniteElement::CalcPhysHessian ( ElementTransformation & Trans,
DenseMatrix & Hessian ) const
virtual

Evaluate the Hessian of all shape functions of a scalar finite element in reference space at the given point ip.

The size (dof, dim*(dim+1)/2) of Hessian must be set in advance.

Definition at line 288 of file fe_base.cpp.

◆ CalcPhysLaplacian()

void mfem::FiniteElement::CalcPhysLaplacian ( ElementTransformation & Trans,
Vector & Laplacian ) const
virtual

Evaluate the Laplacian of all shape functions of a scalar finite element in reference space at the given point ip.

The size (dof) of Laplacian must be set in advance.

Definition at line 203 of file fe_base.cpp.

◆ CalcPhysLinLaplacian()

void mfem::FiniteElement::CalcPhysLinLaplacian ( ElementTransformation & Trans,
Vector & Laplacian ) const
virtual

Definition at line 244 of file fe_base.cpp.

◆ CalcPhysShape()

void mfem::FiniteElement::CalcPhysShape ( ElementTransformation & Trans,
Vector & shape ) const

Evaluate the values of all shape functions of a scalar finite element in physical space at the point described by Trans.

The size (dof) of the result Vector shape must be set in advance.

Definition at line 182 of file fe_base.cpp.

◆ CalcPhysVShape()

void mfem::FiniteElement::CalcPhysVShape ( ElementTransformation & Trans,
DenseMatrix & shape ) const
inline

Equivalent to the CalcVShape() method with the same arguments.

Definition at line 417 of file fe_base.hpp.

◆ CalcShape()

virtual void mfem::FiniteElement::CalcShape ( const IntegrationPoint & ip,
Vector & shape ) const
pure virtual

Evaluate the values of all shape functions of a scalar finite element in reference space at the given point ip.

The size (dof) of the result Vector shape must be set in advance.

Implemented in mfem::BiCubic2DFiniteElement, mfem::BiLinear2DFiniteElement, mfem::BiQuad2DFiniteElement, mfem::BiQuadPos2DFiniteElement, mfem::CrouzeixRaviartFiniteElement, mfem::CrouzeixRaviartQuadFiniteElement, mfem::Cubic1DFiniteElement, mfem::Cubic2DFiniteElement, mfem::Cubic3DFiniteElement, mfem::GaussBiLinear2DFiniteElement, mfem::GaussBiQuad2DFiniteElement, mfem::GaussLinear2DFiniteElement, mfem::GaussQuad2DFiniteElement, mfem::H1_HexahedronElement, mfem::H1_QuadrilateralElement, mfem::H1_SegmentElement, mfem::H1_TetrahedronElement, mfem::H1_TriangleElement, mfem::H1_WedgeElement, mfem::H1Pos_HexahedronElement, mfem::H1Pos_QuadrilateralElement, mfem::H1Pos_SegmentElement, mfem::H1Pos_TetrahedronElement, mfem::H1Pos_TriangleElement, mfem::H1Pos_WedgeElement, mfem::H1Ser_QuadrilateralElement, mfem::L2_HexahedronElement, mfem::L2_QuadrilateralElement, mfem::L2_SegmentElement, mfem::L2_TetrahedronElement, mfem::L2_TriangleElement, mfem::L2_WedgeElement, mfem::L2Pos_HexahedronElement, mfem::L2Pos_QuadrilateralElement, mfem::L2Pos_SegmentElement, mfem::L2Pos_TetrahedronElement, mfem::L2Pos_TriangleElement, mfem::L2Pos_WedgeElement, mfem::Lagrange1DFiniteElement, mfem::LagrangeHexFiniteElement, mfem::Linear1DFiniteElement, mfem::Linear2DFiniteElement, mfem::Linear3DFiniteElement, mfem::LinearPyramidFiniteElement, mfem::LinearWedgeFiniteElement, mfem::ND_SegmentElement, mfem::NURBS1DFiniteElement, mfem::NURBS2DFiniteElement, mfem::NURBS3DFiniteElement, mfem::P0HexFiniteElement, mfem::P0PyrFiniteElement, mfem::P0QuadFiniteElement, mfem::P0SegmentFiniteElement, mfem::P0TetFiniteElement, mfem::P0TriangleFiniteElement, mfem::P0WdgFiniteElement, mfem::P1OnQuadFiniteElement, mfem::P1SegmentFiniteElement, mfem::P1TetNonConfFiniteElement, mfem::P2SegmentFiniteElement, mfem::PointFiniteElement, mfem::Quad1DFiniteElement, mfem::Quad2DFiniteElement, mfem::QuadPos1DFiniteElement, mfem::Quadratic3DFiniteElement, mfem::RefinedBiLinear2DFiniteElement, mfem::RefinedLinear1DFiniteElement, mfem::RefinedLinear2DFiniteElement, mfem::RefinedLinear3DFiniteElement, mfem::RefinedTriLinear3DFiniteElement, mfem::RotTriLinearHexFiniteElement, and mfem::TriLinear3DFiniteElement.

◆ CalcVShape() [1/2]

void mfem::FiniteElement::CalcVShape ( const IntegrationPoint & ip,
DenseMatrix & shape ) const
virtual

◆ CalcVShape() [2/2]

void mfem::FiniteElement::CalcVShape ( ElementTransformation & Trans,
DenseMatrix & shape ) const
virtual

◆ GetAnisotropicOrders()

const int * mfem::FiniteElement::GetAnisotropicOrders ( ) const
inline

Returns an array containing the anisotropic orders/degrees.

Definition at line 340 of file fe_base.hpp.

◆ GetCurlDim()

int mfem::FiniteElement::GetCurlDim ( ) const
inline

Returns the dimension of the curl for vector-valued finite elements.

Definition at line 323 of file fe_base.hpp.

◆ GetDerivMapType()

int mfem::FiniteElement::GetDerivMapType ( ) const
inline

Returns the FiniteElement::DerivType of the element describing how reference function derivatives are mapped to physical space, one of {VALUE, INTEGRAL, H_DIV, H_CURL}.

Definition at line 365 of file fe_base.hpp.

◆ GetDerivRangeType()

int mfem::FiniteElement::GetDerivRangeType ( ) const
inline

Returns the FiniteElement::RangeType of the element derivative, either SCALAR or VECTOR.

Definition at line 350 of file fe_base.hpp.

◆ GetDerivType()

int mfem::FiniteElement::GetDerivType ( ) const
inline

Returns the FiniteElement::DerivType of the element describing the spatial derivative method implemented, one of {NONE, GRAD, DIV, CURL}.

Definition at line 360 of file fe_base.hpp.

◆ GetDim()

int mfem::FiniteElement::GetDim ( ) const
inline

Returns the reference space dimension for the finite element.

Definition at line 316 of file fe_base.hpp.

◆ GetDof()

int mfem::FiniteElement::GetDof ( ) const
inline

Returns the number of degrees of freedom in the finite element.

Definition at line 329 of file fe_base.hpp.

◆ GetDofToQuad()

const DofToQuad & mfem::FiniteElement::GetDofToQuad ( const IntegrationRule & ir,
DofToQuad::Mode mode ) const
virtual

Return a DofToQuad structure corresponding to the given IntegrationRule using the given DofToQuad::Mode.

See the documentation for DofToQuad for more details.

Reimplemented in mfem::NodalFiniteElement, mfem::NodalTensorFiniteElement, mfem::PositiveTensorFiniteElement, and mfem::VectorTensorFiniteElement.

Definition at line 365 of file fe_base.cpp.

◆ GetDofTransformation()

virtual const StatelessDofTransformation * mfem::FiniteElement::GetDofTransformation ( ) const
inlinevirtual

Return a DoF transformation object for this particular type of basis.

Reimplemented in mfem::ND_TetrahedronElement, mfem::ND_TriangleElement, and mfem::ND_WedgeElement.

Definition at line 604 of file fe_base.hpp.

◆ GetFaceDofs()

void mfem::FiniteElement::GetFaceDofs ( int face,
int ** dofs,
int * ndofs ) const
virtual

Get the dofs associated with the given face. *dofs is set to an internal array of the local dofc on the face, while *ndofs is set to the number of dofs on that face.

Reimplemented in mfem::Linear3DFiniteElement, mfem::LinearPyramidFiniteElement, and mfem::LinearWedgeFiniteElement.

Definition at line 96 of file fe_base.cpp.

◆ GetFaceMap()

void mfem::FiniteElement::GetFaceMap ( const int face_id,
Array< int > & face_map ) const
virtual

Return the mapping from lexicographic face DOFs to lexicographic element DOFs for the given local face face_id.

Given the ith DOF (lexicographically ordered) on the face referenced by face_id, face_map[i] gives the corresponding index of the DOF in the element (also lexicographically ordered).

Note
For L2 spaces, this is only well-defined for "closed" bases such as the Gauss-Lobatto or Bernstein (positive) bases.
Warning
GetFaceMap() is currently only implemented for tensor-product (quadrilateral and hexahedral) elements. Its functionality may change when simplex elements are supported in the future.

Reimplemented in mfem::ND_HexahedronElement, mfem::ND_QuadrilateralElement, mfem::NodalTensorFiniteElement, mfem::PositiveTensorFiniteElement, mfem::RT_HexahedronElement, and mfem::RT_QuadrilateralElement.

Definition at line 507 of file fe_base.cpp.

◆ GetGeomType()

Geometry::Type mfem::FiniteElement::GetGeomType ( ) const
inline

Returns the Geometry::Type of the reference element.

Definition at line 326 of file fe_base.hpp.

◆ GetLocalInterpolation()

◆ GetLocalRestriction()

void mfem::FiniteElement::GetLocalRestriction ( ElementTransformation & Trans,
DenseMatrix & R ) const
virtual

Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.

The fine element is the image of the base geometry under the given transformation, Trans.

The assumption in this method is that a subset of the coarse dofs can be expressed only in terms of the dofs of the given fine element.

Rows in R corresponding to coarse dofs that cannot be expressed in terms of the fine dofs will be marked as invalid by setting the first entry (column 0) in the row to infinity().

This method assumes that the dimensions of R are set before it is called.

Reimplemented in mfem::L2_HexahedronElement, mfem::L2_QuadrilateralElement, mfem::L2_SegmentElement, mfem::L2_TetrahedronElement, mfem::L2_TriangleElement, mfem::ND_HexahedronElement, mfem::ND_QuadrilateralElement, mfem::ND_R1D_SegmentElement, mfem::ND_R2D_FiniteElement, mfem::ND_R2D_SegmentElement, mfem::ND_SegmentElement, mfem::ND_TetrahedronElement, mfem::ND_TriangleElement, mfem::ND_WedgeElement, mfem::NodalFiniteElement, mfem::PositiveFiniteElement, mfem::RT_HexahedronElement, mfem::RT_QuadrilateralElement, mfem::RT_R2D_FiniteElement, mfem::RT_R2D_SegmentElement, mfem::RT_TetrahedronElement, mfem::RT_TriangleElement, and mfem::RT_WedgeElement.

Definition at line 113 of file fe_base.cpp.

◆ GetMapType()

int mfem::FiniteElement::GetMapType ( ) const
inline

Returns the FiniteElement::MapType of the element describing how reference functions are mapped to physical space, one of {VALUE, INTEGRAL H_DIV, H_CURL}.

Definition at line 355 of file fe_base.hpp.

◆ GetNodes()

const IntegrationRule & mfem::FiniteElement::GetNodes ( ) const
inline

Get a const reference to the nodes of the element.

Definition at line 395 of file fe_base.hpp.

◆ GetOrder()

int mfem::FiniteElement::GetOrder ( ) const
inline

Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order.

Definition at line 333 of file fe_base.hpp.

◆ GetRangeDim()

int mfem::FiniteElement::GetRangeDim ( ) const
inline

Returns the vector dimension for vector-valued finite elements, which is also the dimension of the interpolation operation.

Definition at line 320 of file fe_base.hpp.

◆ GetRangeType()

int mfem::FiniteElement::GetRangeType ( ) const
inline

Returns the FiniteElement::RangeType of the element, one of {SCALAR, VECTOR}.

Definition at line 346 of file fe_base.hpp.

◆ GetTransferMatrix()

void mfem::FiniteElement::GetTransferMatrix ( const FiniteElement & fe,
ElementTransformation & Trans,
DenseMatrix & I ) const
virtual

Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this finite element.

Trans represents the mapping from the reference element of this element into a subset of the reference space of the element fe, thus allowing the "coarse" FiniteElement to be different from the "fine" FiniteElement as when h-refinement is combined with p-refinement or p-derefinement. It is assumed that both finite elements use the same FiniteElement::MapType.

Reimplemented in mfem::ND_HexahedronElement, mfem::ND_QuadrilateralElement, mfem::ND_R1D_SegmentElement, mfem::ND_R2D_FiniteElement, mfem::ND_R2D_SegmentElement, mfem::ND_SegmentElement, mfem::ND_TetrahedronElement, mfem::ND_TriangleElement, mfem::ND_WedgeElement, mfem::NodalFiniteElement, mfem::NodalTensorFiniteElement, mfem::PositiveFiniteElement, mfem::RT_HexahedronElement, mfem::RT_QuadrilateralElement, mfem::RT_R2D_FiniteElement, mfem::RT_R2D_SegmentElement, mfem::RT_TetrahedronElement, mfem::RT_TriangleElement, and mfem::RT_WedgeElement.

Definition at line 119 of file fe_base.cpp.

◆ HasAnisotropicOrders()

bool mfem::FiniteElement::HasAnisotropicOrders ( ) const
inline

Returns true if the FiniteElement basis may be using different orders/degrees in different spatial directions.

Definition at line 337 of file fe_base.hpp.

◆ IsClosedType()

static bool mfem::FiniteElement::IsClosedType ( int b_type)
inlinestatic

Return true if the BasisType of b_type is closed (has Quadrature1D points on the boundary).

Definition at line 612 of file fe_base.hpp.

◆ IsOpenType()

static bool mfem::FiniteElement::IsOpenType ( int b_type)
inlinestatic

Return true if the BasisType of b_type is open (doesn't have Quadrature1D points on the boundary).

Definition at line 621 of file fe_base.hpp.

◆ Project() [1/3]

void mfem::FiniteElement::Project ( Coefficient & coeff,
ElementTransformation & Trans,
Vector & dofs ) const
virtual

◆ Project() [2/3]

◆ Project() [3/3]

void mfem::FiniteElement::Project ( VectorCoefficient & vc,
ElementTransformation & Trans,
Vector & dofs ) const
virtual

◆ ProjectCurl()

◆ ProjectDelta()

◆ ProjectDiv()

void mfem::FiniteElement::ProjectDiv ( const FiniteElement & fe,
ElementTransformation & Trans,
DenseMatrix & div ) const
virtual

Compute the discrete divergence matrix from the given FiniteElement onto 'this' FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.

Reimplemented in mfem::L2_HexahedronElement, mfem::L2_QuadrilateralElement, and mfem::NodalFiniteElement.

Definition at line 175 of file fe_base.cpp.

◆ ProjectFromNodes()

void mfem::FiniteElement::ProjectFromNodes ( Vector & vc,
ElementTransformation & Trans,
Vector & dofs ) const
virtual

Given a vector of values at the finite element nodes and a transformation, compute its projection (approximation) in the local finite dimensional space in terms of the degrees of freedom. Valid for VectorFiniteElements.

Reimplemented in mfem::ND_HexahedronElement, mfem::ND_QuadrilateralElement, mfem::ND_R1D_SegmentElement, mfem::ND_TetrahedronElement, mfem::ND_TriangleElement, mfem::RT_HexahedronElement, mfem::RT_QuadrilateralElement, mfem::RT_TetrahedronElement, and mfem::RT_TriangleElement.

Definition at line 138 of file fe_base.cpp.

◆ ProjectGrad()

◆ ProjectMatrixCoefficient()

void mfem::FiniteElement::ProjectMatrixCoefficient ( MatrixCoefficient & mc,
ElementTransformation & T,
Vector & dofs ) const
virtual

Given a matrix coefficient and a transformation, compute an approximation ("projection") in the local finite dimensional space in terms of the degrees of freedom. For VectorFiniteElements, the rows of the coefficient are projected in the vector space.

Reimplemented in mfem::ND_HexahedronElement, mfem::ND_QuadrilateralElement, mfem::ND_R1D_SegmentElement, mfem::ND_SegmentElement, mfem::ND_TetrahedronElement, mfem::ND_TriangleElement, mfem::ND_WedgeElement, mfem::NodalFiniteElement, mfem::RT_HexahedronElement, mfem::RT_QuadrilateralElement, mfem::RT_TetrahedronElement, mfem::RT_TriangleElement, and mfem::RT_WedgeElement.

Definition at line 144 of file fe_base.cpp.

◆ Space()

int mfem::FiniteElement::Space ( ) const
inline

Returns the type of FunctionSpace on the element.

Definition at line 343 of file fe_base.hpp.

◆ VerifyClosed()

static int mfem::FiniteElement::VerifyClosed ( int b_type)
inlinestatic

Ensure that the BasisType of b_type is closed (has Quadrature1D points on the boundary).

Definition at line 630 of file fe_base.hpp.

◆ VerifyNodal()

static int mfem::FiniteElement::VerifyNodal ( int b_type)
inlinestatic

Ensure that the BasisType of b_type nodal (satisfies the interpolation property).

Definition at line 647 of file fe_base.hpp.

◆ VerifyOpen()

static int mfem::FiniteElement::VerifyOpen ( int b_type)
inlinestatic

Ensure that the BasisType of b_type is open (doesn't have Quadrature1D points on the boundary).

Definition at line 639 of file fe_base.hpp.

Member Data Documentation

◆ cdim

int mfem::FiniteElement::cdim
protected

Dimension of curl for vector-valued basis functions.

Definition at line 243 of file fe_base.hpp.

◆ deriv_map_type

int mfem::FiniteElement::deriv_map_type
protected

Definition at line 246 of file fe_base.hpp.

◆ deriv_range_type

int mfem::FiniteElement::deriv_range_type
protected

Definition at line 246 of file fe_base.hpp.

◆ deriv_type

int mfem::FiniteElement::deriv_type
protected

Definition at line 246 of file fe_base.hpp.

◆ dim

int mfem::FiniteElement::dim
protected

Dimension of reference space.

Definition at line 241 of file fe_base.hpp.

◆ dof

int mfem::FiniteElement::dof
mutableprotected

Number of degrees of freedom.

Definition at line 248 of file fe_base.hpp.

◆ dof2quad_array

Array<DofToQuad *> mfem::FiniteElement::dof2quad_array
mutableprotected

Container for all DofToQuad objects created by the FiniteElement.

Multiple DofToQuad objects may be needed when different quadrature rules or different DofToQuad::Mode are used.

Definition at line 258 of file fe_base.hpp.

◆ func_space

int mfem::FiniteElement::func_space
protected

Definition at line 245 of file fe_base.hpp.

◆ geom_type

Geometry::Type mfem::FiniteElement::geom_type
protected

Geometry::Type of the reference element.

Definition at line 244 of file fe_base.hpp.

◆ map_type

int mfem::FiniteElement::map_type
protected

Definition at line 245 of file fe_base.hpp.

◆ Nodes

IntegrationRule mfem::FiniteElement::Nodes
protected

Definition at line 251 of file fe_base.hpp.

◆ order

int mfem::FiniteElement::order
protected

Order/degree of the shape functions.

Definition at line 249 of file fe_base.hpp.

◆ orders

int mfem::FiniteElement::orders[Geometry::MaxDim]
mutableprotected

Anisotropic orders.

Definition at line 250 of file fe_base.hpp.

◆ range_type

int mfem::FiniteElement::range_type
protected

Definition at line 245 of file fe_base.hpp.

◆ vdim

int mfem::FiniteElement::vdim
protected

Vector dimension of vector-valued basis functions.

Definition at line 242 of file fe_base.hpp.

◆ vshape

DenseMatrix mfem::FiniteElement::vshape
mutableprotected

Definition at line 253 of file fe_base.hpp.


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