LifeV
ReferenceFE Class Reference

The class for a reference Lagrangian finite element. More...

#include <ReferenceFE.hpp>

+ Inheritance diagram for ReferenceFE:
+ Collaboration diagram for ReferenceFE:

Private Attributes

const ReferenceFEM_boundaryFE
 Reference to the boundary finite element. More...
 
const FE_TYPE M_type
 Type of finite element (FE_P1_2D, ..., see the #define at the beginning of refFE.h. More...
 

Public Types

typedef ReferenceElement::function_Type function_Type
 

Constructor & Destructor

 ReferenceFE (std::string name, FE_TYPE type, ReferenceShapes shape, Int nbDofPerVertex, Int nbDofPerEdge, Int nbDofPerFace, Int nbDofPerVolume, Int nbDof, Int nbLocalCoor, Int FEDim, const function_Type *phi, const function_Type *dPhi, const function_Type *d2Phi, const function_Type *divPhi, const Real *refCoor, DofPatternType patternType, const ReferenceFE *bdRefFE)
 Constructor of a reference Lagrangian finite element. More...
 
virtual ~ReferenceFE ()
 Destructor. More...
 

Get Methods

bool hasBoundaryFE () const
 Check if the reference element has boundary elements. More...
 
const ReferenceFEboundaryFE () const
 Getter for the boundary finite element. More...
 
const FE_TYPEtype () const
 Getter for the type of the finite element. More...
 

Private Methods

 ReferenceFE ()
 No empty constructor. More...
 
 ReferenceFE (const ReferenceFE &)
 No copy constructor. More...
 

Additional Inherited Members

- Public Types inherited from ReferenceElement
typedef Real(* function_Type) (const GeoVector &)
 
- Public Member Functions inherited from ReferenceElement
 ReferenceElement (std::string name, ReferenceShapes shape, UInt nbDof, UInt nbLocalCoor, UInt feDim, const function_Type *phi, const function_Type *dPhi, const function_Type *d2Phi, const function_Type *divPhi, const Real *refCoor)
 Full constructor. More...
 
virtual ~ReferenceElement ()
 Destructor. More...
 
Real xi (UInt i) const
 return the first local coordinate of the i-th node of the reference element More...
 
Real eta (UInt i) const
 return the second local coordinate of the i-th node of the reference element More...
 
Real zeta (UInt i) const
 return the third local coordinate of the i-th node of the reference element More...
 
Real refCoor (UInt i, UInt icoor) const
 return the icoor-th local coordinate of the i-th node of the reference element More...
 
std::vector< GeoVectorrefCoor () const
 return the coordinates of the reference element More...
 
Real phi (UInt i, const GeoVector &v) const
 Return the value of the i-th basis function in the point v. More...
 
Real phi (UInt i, UInt icoor, const GeoVector &v) const
 return the value of the component icoor-th of the i-th basis function on point v. More...
 
Real dPhi (UInt i, UInt icoor, const GeoVector &v) const
 return the value of the icoor-th derivative of the i-th basis function on point v More...
 
Real d2Phi (UInt i, UInt icoor, UInt jcoor, const GeoVector &v) const
 return the value of the (icoor,jcoor)-th second derivative of the i-th basis function on point v More...
 
Real divPhi (UInt i, const GeoVector &v) const
 return the value of the divergence of the i-th basis function on point v. More...
 
bool hasPhi () const
 Check if the refEle has phi functions. More...
 
bool hasDPhi () const
 Check if the refEle has dPhi functions. More...
 
bool hasD2Phi () const
 Check if the refEle has d2Phi functions. More...
 
bool hasDivPhi () const
 Check if the refEle has divPhi functions. More...
 
virtual std::vector< RealnodalToFEValues (const std::vector< Real > &) const
 Method for transforming nodal values into FE values. More...
 
const std::string & name () const
 Return the name of the reference element. More...
 
const UIntnbDof () const
 Return the number of degrees of freedom for this reference element. More...
 
const LIFEV_DEPRECATED (UInt &) nbCoor() const
 OLD: Return the number of local coordinates. More...
 
const UIntnbLocalCoor () const
 Return the number of local coordinates. More...
 
const UIntfeDim () const
 Return the dimension of the FE (scalar vs vectorial FE) More...
 
const ReferenceShapesshape () const
 Return the shape of the element. More...
 
Real phi (UInt i, const Real &x, const Real &y, const Real &z) const
 return the value of the i-th basis function on point (x,y,z) More...
 
Real phi (UInt i, UInt icoor, const Real &x, const Real &y, const Real &z) const
 return the value of the component icoor-th of the i-th basis function on point (x,y,z). More...
 
Real dPhi (UInt i, UInt icoor, const Real &x, const Real &y, const Real &z) const
 return the value of the icoor-th derivative of the i-th basis function on point (x,y,z) More...
 
Real d2Phi (UInt i, UInt icoor, UInt jcoor, const Real &x, const Real &y, const Real &z) const
 return the value of the (icoor,jcoor)-th second derivative of the i-th basis function on point (x,y,z) More...
 
Real divPhi (UInt i, const Real &x, const Real &y, const Real &z) const
 return the value of the divergence of the i-th basis function on point (x,y,z). More...
 
- Public Member Functions inherited from DOFLocalPattern
 DOFLocalPattern (const UInt &nbLocalDof, const UInt &nbDofPerVertex, const UInt &nbDofPerEdge, const UInt &nbDofPerFace, const UInt &nbDofPerVolume, const DofPatternType &patternType, UInt nbLocalCoor)
 Full constructor. More...
 
 DOFLocalPattern (const DOFLocalPattern &localDofPattern)
 Simple copy constructor. More...
 
virtual ~DOFLocalPattern ()
 Empty destructor. More...
 
const UIntpatternFirst (const UInt &i) const
 patternFirst(i): row index in the element matrix of the i-th term of the pattern (the index starts from 0, not from 1 !). More...
 
const UIntpatternSecond (const UInt &i) const
 patternSecond(i): column index in the element matrix of the i-th term of the pattern (the index starts from 0, not from 1 !). More...
 
void showMe (std::ostream &output=std::cout) const
 The showMe method for the pattern. More...
 
const UIntnbPattern () const
 Number of non-zero terms in the element matrix. More...
 
const UIntnbDiag () const
 Number of diagonal terms in the element matrix. More...
 
const UIntnbUpper () const
 Number of upper terms in the element matrix. More...
 
const UIntnbLocalDof () const
 Return the number of local degrees of freedom. More...
 
const UIntnbDofPerVertex () const
 Return the number of degrees of freedom located on the vertices (0D structures) More...
 
const UIntnbDofPerEdge () const
 Return the number of degrees of freedom located on the edges (1D structures) More...
 
UInt nbDofPerPeak () const
 Return the number of degrees of freedom located on the peak (vertex in 3D). More...
 
UInt nbDofPerRidge () const
 Return the number of degrees of freedom located on the ridge. (edge in 3D) More...
 
UInt nbDofPerFacet () const
 Return the number of degrees of freedom located on the facet. (face in 3D) More...
 
const UIntnbDofPerElement () const
 Return the number of degrees of freedom located on the element. (volume in 3D) More...
 
const UIntnbDofPerFace () const
 Return the number of degrees of freedom located on the faces (2D structures). More...
 
const UIntnbDofPerVolume () const
 Return the number of degrees of freedom located in the volume (3D structures). More...
 
const UIntnbDofPerDimStrut (const UInt &structDim) const
 Return the number of degrees of freedom located per structDim object. More...
 
const UIntnbDofPerCodimStrut (const UInt &structCodim) const
 Return the number of degrees of freedom located per structCodim object. More...
 

Detailed Description

The class for a reference Lagrangian finite element.

Author
J.-F. Gerbeau
Date
04/2002
How to add a new finite element ?

(1) in refEle.h : you declare the functions you need (fct1_Pipo_2D, derfct1_1_Pipo_2D, etc...), the static arrays containing these functions and the coordinates of the nodes on the reference element.

(2) in defQuadRuleFE.cc : you define these functions (fct1_Pipo_2D, etc...)
(3) in refFE.h, you declare your finite element:
extern const ReferenceFE fePipo;
(4) in defQuadRuleFE.cc: you define your new element with a command like:
const ReferenceFE feTriaPipo("Pipo element on a triangle",TRIANGLE,1,0,0,0,3,2,
fct_Pipo_2D,derfct_Pipo_2D,der2fct_Pipo_2D,refcoor_Pipo_2D,allQuadRuleTria,STANDARD_PATTERN,&feSegP1);
See documentation of ReferenceFE::ReferenceFE(...) for a precise description of all arguments

Definition at line 115 of file ReferenceFE.hpp.

Member Typedef Documentation

◆ function_Type

typedef ReferenceElement::function_Type function_Type

Definition at line 125 of file ReferenceFE.hpp.

Constructor & Destructor Documentation

◆ ReferenceFE() [1/3]

ReferenceFE ( std::string  name,
FE_TYPE  type,
ReferenceShapes  shape,
Int  nbDofPerVertex,
Int  nbDofPerEdge,
Int  nbDofPerFace,
Int  nbDofPerVolume,
Int  nbDof,
Int  nbLocalCoor,
Int  FEDim,
const function_Type phi,
const function_Type dPhi,
const function_Type d2Phi,
const function_Type divPhi,
const Real refCoor,
DofPatternType  patternType,
const ReferenceFE bdRefFE 
)

Constructor of a reference Lagrangian finite element.

Constructor of a reference finite element. The arguments are:

Parameters
namethe name of the f.e.
typethe type of the f.e. (FE_P1_2D,... see the #define at the begining of refFE.h)
shapethe geometry belongs to enum ReferenceShapes {NONE, POINT, LINE, TRIANGLE, QUAD, HEXA, PRISM, TETRA}; (see ElementShapes.h)
nbDofPerVertexthe number of degrees of freedom per vertex
nbDofPerEdgethe number of degrees of freedom per edge
nbDofPerFacethe number of degrees of freedom per face
nbDofPerVolumethe number of degrees of freedom per volume
nbDofthe total number of d.o.f ( = nbDofPerVertex * nb vertex + nbDofPerEdge * nb edges + etc...)
nbLocalCoornumber of local coordinates
phithe static array containing the basis functions (defined in refEle.h)
dPhithe static array containing the derivatives of the basis functions (defined in refEle.h)
d2Phithe static array containing the second derivatives of the basis functions (defined in refEle.h)
divPhithe static array containing the divergence of the basis function
refCoorthe static array containing the coordinates of the nodes on the reference element (defined in refEle.h)
patternTypein most of cases STANDARD_PATTERN, except for elements like P1isoP2 (to define a new pattern, add a new #define in refFE.h and code it in refFE.cc following the example of P1ISOP2_TRIA_PATTERN)
bdRefFEa pointer on the associated reference finite element on the boundary

Definition at line 47 of file ReferenceFE.cpp.

+ Here is the caller graph for this function:

◆ ~ReferenceFE()

~ReferenceFE ( )
virtual

Destructor.

Definition at line 58 of file ReferenceFE.cpp.

◆ ReferenceFE() [2/3]

ReferenceFE ( )
private

No empty constructor.

◆ ReferenceFE() [3/3]

ReferenceFE ( const ReferenceFE )
private

No copy constructor.

Member Function Documentation

◆ hasBoundaryFE()

bool hasBoundaryFE ( ) const
inline

Check if the reference element has boundary elements.

Definition at line 190 of file ReferenceFE.hpp.

+ Here is the caller graph for this function:

◆ boundaryFE()

const ReferenceFE& boundaryFE ( ) const
inline

Getter for the boundary finite element.

Definition at line 199 of file ReferenceFE.hpp.

+ Here is the caller graph for this function:

◆ type()

const FE_TYPE& type ( ) const
inline

Getter for the type of the finite element.

Definition at line 206 of file ReferenceFE.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_boundaryFE

const ReferenceFE* M_boundaryFE
private

Reference to the boundary finite element.

Definition at line 228 of file ReferenceFE.hpp.

◆ M_type

const FE_TYPE M_type
private

Type of finite element (FE_P1_2D, ..., see the #define at the beginning of refFE.h.

Definition at line 231 of file ReferenceFE.hpp.


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