MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::ElementTransformation Class Referenceabstract

#include <eltrans.hpp>

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

Public Types

enum  {
  ELEMENT = 1 , BDR_ELEMENT = 2 , EDGE = 3 , FACE = 4 ,
  BDR_FACE = 5
}
 

Public Member Functions

 ElementTransformation ()
 
void Reset ()
 Force the reevaluation of the Jacobian in the next call.
 
void SetIntPoint (const IntegrationPoint *ip)
 Set the integration point ip that weights and Jacobians will be evaluated at.
 
const IntegrationPoint & GetIntPoint ()
 Get a const reference to the currently set integration point. This will return NULL if no integration point is set.
 
virtual void Transform (const IntegrationPoint &, Vector &)=0
 Transform integration point from reference coordinates to physical coordinates and store them in the vector.
 
virtual void Transform (const IntegrationRule &, DenseMatrix &)=0
 Transform all the integration points from the integration rule from reference coordinates to physical coordinates and store them as column vectors in the matrix.
 
virtual void Transform (const DenseMatrix &matrix, DenseMatrix &result)=0
 Transform all the integration points from the column vectors of matrix from reference coordinates to physical coordinates and store them as column vectors in result.
 
const DenseMatrix & Jacobian ()
 Return the Jacobian matrix of the transformation at the currently set IntegrationPoint, using the method SetIntPoint().
 
const DenseMatrix & Hessian ()
 Return the Hessian matrix of the transformation at the currently set IntegrationPoint, using the method SetIntPoint().
 
real_t Weight ()
 Return the weight of the Jacobian matrix of the transformation at the currently set IntegrationPoint. The Weight evaluates to \( \sqrt{\lvert J^T J \rvert} \).
 
const DenseMatrix & AdjugateJacobian ()
 Return the adjugate of the Jacobian matrix of the transformation at the currently set IntegrationPoint.
 
const DenseMatrix & TransposeAdjugateJacobian ()
 Return the transpose of the adjugate of the Jacobian matrix of the transformation at the currently set IntegrationPoint.
 
const DenseMatrix & InverseJacobian ()
 Return the inverse of the Jacobian matrix of the transformation at the currently set IntegrationPoint.
 
virtual int Order () const =0
 Return the order of the current element we are using for the transformation.
 
virtual int OrderJ () const =0
 Return the order of the elements of the Jacobian of the transformation.
 
virtual int OrderW () const =0
 Return the order of the determinant of the Jacobian (weight) of the transformation.
 
virtual int OrderGrad (const FiniteElement *fe) const =0
 Return the order of \( adj(J)^T \nabla fi \).
 
Geometry::Type GetGeometryType () const
 Return the Geometry::Type of the reference element.
 
int GetDimension () const
 Return the topological dimension of the reference element.
 
virtual int GetSpaceDim () const =0
 Get the dimension of the target (physical) space.
 
virtual int TransformBack (const Vector &pt, IntegrationPoint &ip, const real_t phys_tol=tol_0)=0
 Transform a point pt from physical space to a point ip in reference space and optionally can set a solver tolerance using phys_tol.
 
virtual ~ElementTransformation ()
 

Public Attributes

int Attribute
 
int ElementNo
 
int ElementType
 
const Mesh * mesh
 The Mesh object containing the element.
 

Protected Types

enum  StateMasks {
  JACOBIAN_MASK = 1 , WEIGHT_MASK = 2 , ADJUGATE_MASK = 4 , INVERSE_MASK = 8 ,
  HESSIAN_MASK = 16 , TRANS_ADJUGATE_MASK = 32
}
 

Protected Member Functions

virtual const DenseMatrix & EvalJacobian ()=0
 Evaluate the Jacobian of the transformation at the IntPoint and store it in dFdx.
 
virtual const DenseMatrix & EvalHessian ()=0
 Evaluate the Hessian of the transformation at the IntPoint and store it in d2Fdx2.
 
real_t EvalWeight ()
 
const DenseMatrix & EvalAdjugateJ ()
 
const DenseMatrix & EvalTransAdjugateJ ()
 
const DenseMatrix & EvalInverseJ ()
 

Protected Attributes

const IntegrationPoint * IntPoint
 
DenseMatrix dFdx
 
DenseMatrix adjJ
 
DenseMatrix invJ
 
DenseMatrix d2Fdx2
 
DenseMatrix adjJT
 
real_t Wght
 
int EvalState
 
Geometry::Type geom
 

Static Protected Attributes

Tolerance used for point comparisons
static constexpr real_t tol_0 = 1e-15
 

Detailed Description

Definition at line 27 of file eltrans.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

This enumeration declares the values stored in ElementTransformation::ElementType and indicates which group of objects the index stored in ElementTransformation::ElementNo refers:

| ElementType | Range of ElementNo +----------—+----------------------— | ELEMENT | [0, Mesh::GetNE() ) | BDR_ELEMENT | [0, Mesh::GetNBE() ) | EDGE | [0, Mesh::GetNEdges() ) | FACE | [0, Mesh::GetNFaces() ) | BDR_FACE | [0, Mesh::GetNBE() )

Enumerator
ELEMENT 
BDR_ELEMENT 
EDGE 
FACE 
BDR_FACE 

Definition at line 82 of file eltrans.hpp.

◆ StateMasks

Enumerator
JACOBIAN_MASK 
WEIGHT_MASK 
ADJUGATE_MASK 
INVERSE_MASK 
HESSIAN_MASK 
TRANS_ADJUGATE_MASK 

Definition at line 35 of file eltrans.hpp.

Constructor & Destructor Documentation

◆ ElementTransformation()

mfem::ElementTransformation::ElementTransformation ( )

Definition at line 21 of file eltrans.cpp.

◆ ~ElementTransformation()

virtual mfem::ElementTransformation::~ElementTransformation ( )
inlinevirtual

Definition at line 194 of file eltrans.hpp.

Member Function Documentation

◆ AdjugateJacobian()

const DenseMatrix & mfem::ElementTransformation::AdjugateJacobian ( )
inline

Return the adjugate of the Jacobian matrix of the transformation at the currently set IntegrationPoint.

Definition at line 148 of file eltrans.hpp.

◆ EvalAdjugateJ()

const DenseMatrix & mfem::ElementTransformation::EvalAdjugateJ ( )
protected

Definition at line 38 of file eltrans.cpp.

◆ EvalHessian()

virtual const DenseMatrix & mfem::ElementTransformation::EvalHessian ( )
protectedpure virtual

Evaluate the Hessian of the transformation at the IntPoint and store it in d2Fdx2.

◆ EvalInverseJ()

const DenseMatrix & mfem::ElementTransformation::EvalInverseJ ( )
protected

Definition at line 59 of file eltrans.cpp.

◆ EvalJacobian()

virtual const DenseMatrix & mfem::ElementTransformation::EvalJacobian ( )
protectedpure virtual

Evaluate the Jacobian of the transformation at the IntPoint and store it in dFdx.

◆ EvalTransAdjugateJ()

const DenseMatrix & mfem::ElementTransformation::EvalTransAdjugateJ ( )
protected

Definition at line 48 of file eltrans.cpp.

◆ EvalWeight()

real_t mfem::ElementTransformation::EvalWeight ( )
protected

Definition at line 30 of file eltrans.cpp.

◆ GetDimension()

int mfem::ElementTransformation::GetDimension ( ) const
inline

Return the topological dimension of the reference element.

Definition at line 178 of file eltrans.hpp.

◆ GetGeometryType()

Geometry::Type mfem::ElementTransformation::GetGeometryType ( ) const
inline

Return the Geometry::Type of the reference element.

Definition at line 175 of file eltrans.hpp.

◆ GetIntPoint()

const IntegrationPoint & mfem::ElementTransformation::GetIntPoint ( )
inline

Get a const reference to the currently set integration point. This will return NULL if no integration point is set.

Definition at line 111 of file eltrans.hpp.

◆ GetSpaceDim()

virtual int mfem::ElementTransformation::GetSpaceDim ( ) const
pure virtual

Get the dimension of the target (physical) space.

We support 2D meshes embedded in 3D; in this case the function will return "3".

Implemented in mfem::IsoparametricTransformation.

◆ Hessian()

const DenseMatrix & mfem::ElementTransformation::Hessian ( )
inline

Return the Hessian matrix of the transformation at the currently set IntegrationPoint, using the method SetIntPoint().

Definition at line 138 of file eltrans.hpp.

◆ InverseJacobian()

const DenseMatrix & mfem::ElementTransformation::InverseJacobian ( )
inline

Return the inverse of the Jacobian matrix of the transformation at the currently set IntegrationPoint.

Definition at line 158 of file eltrans.hpp.

◆ Jacobian()

const DenseMatrix & mfem::ElementTransformation::Jacobian ( )
inline

Return the Jacobian matrix of the transformation at the currently set IntegrationPoint, using the method SetIntPoint().

The dimensions of the Jacobian matrix are physical-space-dim by reference-space-dim. The first column contains the x derivatives of the transformation, the second – the y derivatives, etc.

Definition at line 132 of file eltrans.hpp.

◆ Order()

virtual int mfem::ElementTransformation::Order ( ) const
pure virtual

Return the order of the current element we are using for the transformation.

Implemented in mfem::IsoparametricTransformation.

◆ OrderGrad()

virtual int mfem::ElementTransformation::OrderGrad ( const FiniteElement * fe) const
pure virtual

Return the order of \( adj(J)^T \nabla fi \).

Implemented in mfem::IsoparametricTransformation.

◆ OrderJ()

virtual int mfem::ElementTransformation::OrderJ ( ) const
pure virtual

Return the order of the elements of the Jacobian of the transformation.

Implemented in mfem::IsoparametricTransformation.

◆ OrderW()

virtual int mfem::ElementTransformation::OrderW ( ) const
pure virtual

Return the order of the determinant of the Jacobian (weight) of the transformation.

Implemented in mfem::IsoparametricTransformation.

◆ Reset()

void mfem::ElementTransformation::Reset ( )
inline

Force the reevaluation of the Jacobian in the next call.

Definition at line 102 of file eltrans.hpp.

◆ SetIntPoint()

void mfem::ElementTransformation::SetIntPoint ( const IntegrationPoint * ip)
inline

Set the integration point ip that weights and Jacobians will be evaluated at.

Definition at line 106 of file eltrans.hpp.

◆ Transform() [1/3]

virtual void mfem::ElementTransformation::Transform ( const DenseMatrix & matrix,
DenseMatrix & result )
pure virtual

Transform all the integration points from the column vectors of matrix from reference coordinates to physical coordinates and store them as column vectors in result.

Implemented in mfem::FaceElementTransformations, and mfem::IsoparametricTransformation.

◆ Transform() [2/3]

virtual void mfem::ElementTransformation::Transform ( const IntegrationPoint & ,
Vector &  )
pure virtual

Transform integration point from reference coordinates to physical coordinates and store them in the vector.

Implemented in mfem::FaceElementTransformations, and mfem::IsoparametricTransformation.

◆ Transform() [3/3]

virtual void mfem::ElementTransformation::Transform ( const IntegrationRule & ,
DenseMatrix &  )
pure virtual

Transform all the integration points from the integration rule from reference coordinates to physical coordinates and store them as column vectors in the matrix.

Implemented in mfem::FaceElementTransformations, and mfem::IsoparametricTransformation.

◆ TransformBack()

virtual int mfem::ElementTransformation::TransformBack ( const Vector & pt,
IntegrationPoint & ip,
const real_t phys_tol = tol_0 )
pure virtual

Transform a point pt from physical space to a point ip in reference space and optionally can set a solver tolerance using phys_tol.

Attempt to find the IntegrationPoint that is transformed into the given point in physical space. If the inversion fails a non-zero value is returned. This method is not 100 percent reliable for non-linear transformations.

Implemented in mfem::IsoparametricTransformation.

◆ TransposeAdjugateJacobian()

const DenseMatrix & mfem::ElementTransformation::TransposeAdjugateJacobian ( )
inline

Return the transpose of the adjugate of the Jacobian matrix of the transformation at the currently set IntegrationPoint.

Definition at line 153 of file eltrans.hpp.

◆ Weight()

real_t mfem::ElementTransformation::Weight ( )
inline

Return the weight of the Jacobian matrix of the transformation at the currently set IntegrationPoint. The Weight evaluates to \( \sqrt{\lvert J^T J \rvert} \).

Definition at line 144 of file eltrans.hpp.

Member Data Documentation

◆ adjJ

DenseMatrix mfem::ElementTransformation::adjJ
protected

Definition at line 31 of file eltrans.hpp.

◆ adjJT

DenseMatrix mfem::ElementTransformation::adjJT
protected

Definition at line 32 of file eltrans.hpp.

◆ Attribute

int mfem::ElementTransformation::Attribute

Definition at line 91 of file eltrans.hpp.

◆ d2Fdx2

DenseMatrix mfem::ElementTransformation::d2Fdx2
protected

Definition at line 32 of file eltrans.hpp.

◆ dFdx

DenseMatrix mfem::ElementTransformation::dFdx
protected

Definition at line 31 of file eltrans.hpp.

◆ ElementNo

int mfem::ElementTransformation::ElementNo

Definition at line 91 of file eltrans.hpp.

◆ ElementType

int mfem::ElementTransformation::ElementType

Definition at line 91 of file eltrans.hpp.

◆ EvalState

int mfem::ElementTransformation::EvalState
protected

Definition at line 34 of file eltrans.hpp.

◆ geom

Geometry::Type mfem::ElementTransformation::geom
protected

Definition at line 44 of file eltrans.hpp.

◆ IntPoint

const IntegrationPoint* mfem::ElementTransformation::IntPoint
protected

Definition at line 30 of file eltrans.hpp.

◆ invJ

DenseMatrix mfem::ElementTransformation::invJ
protected

Definition at line 31 of file eltrans.hpp.

◆ mesh

const Mesh* mfem::ElementTransformation::mesh

The Mesh object containing the element.

If the element transformation belongs to a mesh, this will point to the containing Mesh object. ElementNo will be the number of the element in this Mesh. This will be NULL if the element does not belong to a mesh.

Definition at line 97 of file eltrans.hpp.

◆ tol_0

static constexpr real_t mfem::ElementTransformation::tol_0 = 1e-15
staticconstexprprotected

Definition at line 62 of file eltrans.hpp.

◆ Wght

real_t mfem::ElementTransformation::Wght
protected

Definition at line 33 of file eltrans.hpp.


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