LifeV
|
refFEScalar - Short description of the class More...
#include <ReferenceFEScalar.hpp>
Private Attributes | |
const ValuesToValuesFunction_Type | M_nodalToFEValues |
Public Types | |
typedef ReferenceFE::function_Type | function_Type |
typedef std::vector< Real >(* | ValuesToValuesFunction_Type) (const std::vector< Real > &) |
Constructor & Destructor | |
ReferenceFEScalar (std::string name, FE_TYPE type, ReferenceShapes shape, Int nbDofPerVertex, Int nbDofPerEdge, Int nbDofPerFace, Int nbDofPerVolume, Int nbDof, Int nbLocalCoor, const function_Type *phi, const function_Type *dPhi, const function_Type *d2Phi, const Real *refCoor, DofPatternType patternType, const ReferenceFE *bdRefFE, const ValuesToValuesFunction_Type nodalToFE) | |
Constructor of a reference Lagrangian finite element. More... | |
~ReferenceFEScalar () | |
Methods | |
std::vector< Real > | nodalToFEValues (const std::vector< Real > &nodalValues) const |
Method for transforming nodal values into FE values. More... | |
Additional Inherited Members | |
Public Types inherited from ReferenceFE | |
typedef ReferenceElement::function_Type | function_Type |
Public Types inherited from ReferenceElement | |
typedef Real(* | function_Type) (const GeoVector &) |
Public Member Functions inherited from ReferenceFE | |
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... | |
bool | hasBoundaryFE () const |
Check if the reference element has boundary elements. More... | |
const ReferenceFE & | boundaryFE () const |
Getter for the boundary finite element. More... | |
const FE_TYPE & | type () const |
Getter for the type of the finite element. More... | |
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< GeoVector > | refCoor () 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... | |
const std::string & | name () const |
Return the name of the reference element. More... | |
const UInt & | nbDof () 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 UInt & | nbLocalCoor () const |
Return the number of local coordinates. More... | |
const UInt & | feDim () const |
Return the dimension of the FE (scalar vs vectorial FE) More... | |
const ReferenceShapes & | shape () 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 UInt & | patternFirst (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 UInt & | patternSecond (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 UInt & | nbPattern () const |
Number of non-zero terms in the element matrix. More... | |
const UInt & | nbDiag () const |
Number of diagonal terms in the element matrix. More... | |
const UInt & | nbUpper () const |
Number of upper terms in the element matrix. More... | |
const UInt & | nbLocalDof () const |
Return the number of local degrees of freedom. More... | |
const UInt & | nbDofPerVertex () const |
Return the number of degrees of freedom located on the vertices (0D structures) More... | |
const UInt & | nbDofPerEdge () 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 UInt & | nbDofPerElement () const |
Return the number of degrees of freedom located on the element. (volume in 3D) More... | |
const UInt & | nbDofPerFace () const |
Return the number of degrees of freedom located on the faces (2D structures). More... | |
const UInt & | nbDofPerVolume () const |
Return the number of degrees of freedom located in the volume (3D structures). More... | |
const UInt & | nbDofPerDimStrut (const UInt &structDim) const |
Return the number of degrees of freedom located per structDim object. More... | |
const UInt & | nbDofPerCodimStrut (const UInt &structCodim) const |
Return the number of degrees of freedom located per structCodim object. More... | |
refFEScalar - Short description of the class
Definition at line 52 of file ReferenceFEScalar.hpp.
Definition at line 60 of file ReferenceFEScalar.hpp.
Definition at line 61 of file ReferenceFEScalar.hpp.
ReferenceFEScalar | ( | std::string | name, |
FE_TYPE | type, | ||
ReferenceShapes | shape, | ||
Int | nbDofPerVertex, | ||
Int | nbDofPerEdge, | ||
Int | nbDofPerFace, | ||
Int | nbDofPerVolume, | ||
Int | nbDof, | ||
Int | nbLocalCoor, | ||
const function_Type * | phi, | ||
const function_Type * | dPhi, | ||
const function_Type * | d2Phi, | ||
const Real * | refCoor, | ||
DofPatternType | patternType, | ||
const ReferenceFE * | bdRefFE, | ||
const ValuesToValuesFunction_Type | nodalToFE | ||
) |
Constructor of a reference Lagrangian finite element.
Constructor of a reference finite element. The arguments are:
name | the name of the f.e. |
type | the type of the f.e. (FE_P1_2D,... see the #define at the begining of refFE.h) |
shape | the geometry belongs to enum ReferenceShapes {NONE, POINT, LINE, TRIANGLE, QUAD, HEXA, PRISM, TETRA}; (see ElementShapes.h) |
nbDofPerVertex | the number of degrees of freedom per vertex |
nbDofPerEdge | the number of degrees of freedom per edge |
nbDofPerFace | the number of degrees of freedom per face |
nbDofPerVolume | the number of degrees of freedom per volume |
nbDof | the total number of d.o.f ( = nbDofPerVertex * nb vertex + nbDofPerEdge * nb edges + etc...) |
nbLocalCoor | number of local coordinates |
phi | the static array containing the basis functions (defined in refEle.h) |
dPhi | the static array containing the derivatives of the basis functions (defined in refEle.h) |
d2Phi | the static array containing the second derivatives of the basis functions (defined in refEle.h) |
refCoor | the static array containing the coordinates of the nodes on the reference element (defined in refEle.h) |
patternType | in 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) |
bdRefFE | a pointer on the associated reference finite element on the boundary |
Definition at line 47 of file ReferenceFEScalar.cpp.
|
inline |
Definition at line 114 of file ReferenceFEScalar.hpp.
Method for transforming nodal values into FE values.
This method can be used to retrieve the FE coefficients corresponding to the values given in the nodes (important for the interpolation procedures). For lagrangian elements (like P1 or P2), this method is just giving back the same values. However, for nodal but non-lagrangian finite elements (like P1Bubble), the values returned are different from the output.
For example, using P1Bubble finite element, if one gives as input values that are all 1 (the finite element function is constant), this function will return 1 for the P1 nodes but 0 for the bubble. Indeed, by suming the P1 function, we already get the constant function over the whole element and there is no need for the bubble.
Of course, this method is accessible only for nodal finite elements. If one tries to use this method with a non nodal finite element, an error will be displayed and the program will stop running.
Reimplemented from ReferenceElement.
Definition at line 122 of file ReferenceFEScalar.hpp.
|
private |
Definition at line 132 of file ReferenceFEScalar.hpp.