LifeV
|
ReferenceElement - The basis class for the geometric mapping and the reference finite elements. More...
#include <ReferenceElement.hpp>
Private Attributes | |
const function_Type * | M_phi |
pointer on the basis functions More... | |
const function_Type * | M_dPhi |
pointer on the derivatives of the basis functions More... | |
const function_Type * | M_d2Phi |
pointer on the second derivatives of the basis functions More... | |
const function_Type * | M_divPhi |
pointer on the divergence of the basis functions More... | |
const Real * | M_refCoor |
reference coordinates. Order: xistd::placeholders::_1,etA_1,zetA_1,xistd::placeholders::_2,etA_2,zetA_2,... More... | |
const std::string | M_name |
name of the reference element More... | |
const ReferenceShapes | M_shape |
geometrical shape of the element More... | |
const UInt | M_nbDof |
Total number of degrees of freedom. More... | |
const UInt | M_nbLocalCoor |
Number of local coordinates. More... | |
const UInt | M_feDim |
Number of dimension of the FE (1 for scalar FE, more for vectorial FE) More... | |
Public Types | |
typedef Real(* | function_Type) (const GeoVector &) |
Constructor & Destructor | |
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... | |
Methods | |
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... | |
virtual std::vector< Real > | nodalToFEValues (const std::vector< Real > &) const |
Method for transforming nodal values into FE values. More... | |
Get Methods | |
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... | |
Old Methods - Avoid using them! | |
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... | |
Private Methods | |
ReferenceElement () | |
No way to use the empty constructor. More... | |
ReferenceElement (const ReferenceElement &) | |
No way to use the copy constuctor. More... | |
ReferenceElement - The basis class for the geometric mapping and the reference finite elements.
Implemented orginially by J.-F. Gerbeau (04/2002) but totally modified by S.Quinodoz (samue , 04/2010) l.qu inodo z@ep fl.ch
This class contains all the basis functions, their derivatives and the reference coordinates. It is the basis class for the geometric map (LifeV::GeometricMap) and the reference finite element (LifeV::ReferenceFE).
Add Volume
Add the minimal dimension and checks
Incorporate vectorial FEs
Think dimensionless
change M_refCoor
Definition at line 66 of file ReferenceElement.hpp.
typedef Real( * function_Type) (const GeoVector &) |
Definition at line 75 of file ReferenceElement.hpp.
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.
name | Name of the reference element |
shape | Shape related to this reference element |
nbDof | Number of degrees of freedom |
nbLocalCoor | Number of local coordinates |
phi | Array of the basis functions |
dPhi | Array of the derivatives of the basis functions |
d2Phi | Array of the second derivatives of the basis functions |
refCoor | Array of the reference coordinates for this reference element |
Definition at line 47 of file ReferenceElement.cpp.
|
virtual |
Destructor.
Definition at line 64 of file ReferenceElement.cpp.
|
private |
No way to use the empty constructor.
|
private |
No way to use the copy constuctor.
return the first local coordinate of the i-th node of the reference element
Definition at line 108 of file ReferenceElement.hpp.
return the second local coordinate of the i-th node of the reference element
Definition at line 114 of file ReferenceElement.hpp.
return the third local coordinate of the i-th node of the reference element
Definition at line 120 of file ReferenceElement.hpp.
return the icoor-th local coordinate of the i-th node of the reference element
Definition at line 126 of file ReferenceElement.hpp.
std::vector< GeoVector > refCoor | ( | ) | const |
return the coordinates of the reference element
Definition at line 73 of file ReferenceElement.cpp.
Return the value of the i-th basis function in the point v.
Definition at line 135 of file ReferenceElement.hpp.
return the value of the component icoor-th of the i-th basis function on point v.
Definition at line 142 of file ReferenceElement.hpp.
return the value of the icoor-th derivative of the i-th basis function on point v
Definition at line 149 of file ReferenceElement.hpp.
return the value of the (icoor,jcoor)-th second derivative of the i-th basis function on point v
Definition at line 156 of file ReferenceElement.hpp.
return the value of the divergence of the i-th basis function on point v.
Definition at line 162 of file ReferenceElement.hpp.
|
inline |
Check if the refEle has phi functions.
Definition at line 170 of file ReferenceElement.hpp.
|
inline |
Check if the refEle has dPhi functions.
Definition at line 175 of file ReferenceElement.hpp.
|
inline |
Check if the refEle has d2Phi functions.
Definition at line 180 of file ReferenceElement.hpp.
|
inline |
Check if the refEle has divPhi functions.
Definition at line 185 of file ReferenceElement.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 in ReferenceFEScalar.
Definition at line 209 of file ReferenceElement.hpp.
|
inline |
Return the name of the reference element.
Definition at line 227 of file ReferenceElement.hpp.
|
inline |
Return the number of degrees of freedom for this reference element.
Definition at line 233 of file ReferenceElement.hpp.
|
inline |
OLD: Return the number of local coordinates.
Definition at line 239 of file ReferenceElement.hpp.
|
inline |
Return the number of local coordinates.
Definition at line 245 of file ReferenceElement.hpp.
|
inline |
Return the dimension of the FE (scalar vs vectorial FE)
Definition at line 251 of file ReferenceElement.hpp.
|
inline |
Return the shape of the element.
Definition at line 257 of file ReferenceElement.hpp.
return the value of the i-th basis function on point (x,y,z)
Definition at line 268 of file ReferenceElement.hpp.
return the value of the component icoor-th of the i-th basis function on point (x,y,z).
Definition at line 279 of file ReferenceElement.hpp.
return the value of the icoor-th derivative of the i-th basis function on point (x,y,z)
Definition at line 290 of file ReferenceElement.hpp.
|
inline |
return the value of the (icoor,jcoor)-th second derivative of the i-th basis function on point (x,y,z)
Definition at line 300 of file ReferenceElement.hpp.
return the value of the divergence of the i-th basis function on point (x,y,z).
Definition at line 310 of file ReferenceElement.hpp.
|
private |
pointer on the basis functions
Definition at line 337 of file ReferenceElement.hpp.
|
private |
pointer on the derivatives of the basis functions
Definition at line 340 of file ReferenceElement.hpp.
|
private |
pointer on the second derivatives of the basis functions
Definition at line 343 of file ReferenceElement.hpp.
|
private |
pointer on the divergence of the basis functions
Definition at line 346 of file ReferenceElement.hpp.
|
private |
reference coordinates. Order: xistd::placeholders::_1,etA_1,zetA_1,xistd::placeholders::_2,etA_2,zetA_2,...
Definition at line 349 of file ReferenceElement.hpp.
|
private |
name of the reference element
Definition at line 354 of file ReferenceElement.hpp.
|
private |
geometrical shape of the element
Definition at line 357 of file ReferenceElement.hpp.
|
private |
Total number of degrees of freedom.
Definition at line 360 of file ReferenceElement.hpp.
|
private |
Number of local coordinates.
Definition at line 363 of file ReferenceElement.hpp.
|
private |
Number of dimension of the FE (1 for scalar FE, more for vectorial FE)
Definition at line 366 of file ReferenceElement.hpp.