LifeV
|
FEFunction - This class gives an abstract implementation of a finite element function on finite elements fields. More...
#include <FESpace.hpp>
Private Attributes | |
FEScalarFieldPtrContainer_Type | M_scalarFields |
Vector of pointers of scalar fields. More... | |
FEVectorFieldPtrContainer_Type | M_vectorFields |
Vector of pointers of vector fields. More... | |
Public Types | |
typedef MeshType | mesh_Type |
typedef MapType | map_Type |
typedef ReturnType | return_Type |
typedef FEField< mesh_Type, map_Type, return_Type > | FEField_Type |
typedef FEScalarField< mesh_Type, map_Type > | FEScalarField_Type |
typedef FEVectorField< mesh_Type, map_Type > | FEVectorField_Type |
typedef std::shared_ptr< FEField_Type > | FEFieldPtr_Type |
typedef std::shared_ptr< FEScalarField_Type > | FEScalarFieldPtr_Type |
typedef std::shared_ptr< FEVectorField_Type > | FEVectorFieldPtr_Type |
typedef std::vector< FEScalarFieldPtr_Type > | FEScalarFieldPtrContainer_Type |
typedef std::vector< FEVectorFieldPtr_Type > | FEVectorFieldPtrContainer_Type |
typedef FEField_Type::point_Type | point_Type |
Constructors and destructor | |
FEFunction () | |
Empty constructor for the class. More... | |
virtual | ~FEFunction () |
Virtual destructor. More... | |
Methods | |
virtual return_Type | eval (const UInt &iElem, const point_Type &P, const Real &time=0.) const =0 |
Abstract virtual eval function. More... | |
void | interpolate (FEField_Type &interpolatedFct, const Real &time=0.) const |
Interpolate to a field. More... | |
void | addScalarField (const FEScalarFieldPtr_Type &fieldPtr) |
Add an external scalar field to the function. More... | |
void | addVectorField (const FEVectorFieldPtr_Type &fieldPtr) |
Add an external vector field to the function. More... | |
Get Methods | |
const FEScalarFieldPtr_Type & | scalarFieldPtr (const UInt &i) const |
Return the i-th scalar field. More... | |
const FEScalarField_Type & | scalarField (const UInt &i) const |
Return the i-th scalar field. More... | |
const FEVectorFieldPtr_Type & | vectorFieldPtr (const UInt &i) const |
Return the i-th vector field. More... | |
const FEVectorField_Type & | vectorField (const UInt &i) const |
Return the i-th vector field. More... | |
FEFunction - This class gives an abstract implementation of a finite element function on finite elements fields.
This class represents the concept of a function associated to a set of finite element fields.
This class is implemented as a simple container which stores pointers to finite element fields, both scalar and vector.
The method eval, which is abstract and virtual, is the manipulator of the fields.
For example the scalar function is a function of the scalar field and the vector field , that is . And, for example, the function is
then create a new class MyFun which inherit from FEFunction<MeshType, MapType, Real> where the eval method, using the methods scalarField and vectorField, can be written as
Partial specialization of the type returned by the access operator is scalar, vector and matrix, implemented in the derived classes. The implementation of user defined classes can be derived from one of the specialized classes.
The evaluation of the field in a given point is given in the access operator (). The implementation of this method requires also the id of the geometrical element in the mesh, which is less general but more efficient compared to the case where the id of the geometrical element is not given.
Definition at line 65 of file FESpace.hpp.
Definition at line 87 of file FEFunction.hpp.
typedef MapType map_Type |
Definition at line 88 of file FEFunction.hpp.
typedef ReturnType return_Type |
Definition at line 89 of file FEFunction.hpp.
typedef FEField< mesh_Type, map_Type, return_Type > FEField_Type |
Definition at line 91 of file FEFunction.hpp.
typedef FEScalarField< mesh_Type, map_Type > FEScalarField_Type |
Definition at line 92 of file FEFunction.hpp.
typedef FEVectorField< mesh_Type, map_Type > FEVectorField_Type |
Definition at line 93 of file FEFunction.hpp.
typedef std::shared_ptr< FEField_Type > FEFieldPtr_Type |
Definition at line 95 of file FEFunction.hpp.
typedef std::shared_ptr< FEScalarField_Type > FEScalarFieldPtr_Type |
Definition at line 96 of file FEFunction.hpp.
typedef std::shared_ptr< FEVectorField_Type > FEVectorFieldPtr_Type |
Definition at line 97 of file FEFunction.hpp.
typedef std::vector< FEScalarFieldPtr_Type > FEScalarFieldPtrContainer_Type |
Definition at line 99 of file FEFunction.hpp.
typedef std::vector< FEVectorFieldPtr_Type > FEVectorFieldPtrContainer_Type |
Definition at line 100 of file FEFunction.hpp.
typedef FEField_Type::point_Type point_Type |
Definition at line 102 of file FEFunction.hpp.
|
inline |
Empty constructor for the class.
Definition at line 110 of file FEFunction.hpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 114 of file FEFunction.hpp.
|
pure virtual |
Abstract virtual eval function.
In the case of derived and specialized classes it evaluates the function on a given point in a given element
iElem | Element id in the mesh. |
point | Point where the field is evaluated, vector format. |
time | Time in the evaluation. |
Implemented in massFunction, initialCondition, vectorSource, vectorSource, scalarSource, scalarSource, reactionTerm, reactionTerm, inversePermeability, inversePermeability, and MyFun.
|
inline |
Interpolate to a field.
Fill the input field with the value of the function. Useful for exporting pourpose.
interpolatedFct | Field where the function is interpolated. |
time | Time in the evaluation. |
Definition at line 140 of file FEFunction.hpp.
|
inline |
Add an external scalar field to the function.
fieldPtr | Pointer of a scalar field which as to be added. |
Definition at line 150 of file FEFunction.hpp.
|
inline |
Add an external vector field to the function.
fieldPtr | Pointer of a vector field which as to be added. |
Definition at line 159 of file FEFunction.hpp.
|
inline |
Return the i-th scalar field.
i | Index of the scalar field. |
Definition at line 174 of file FEFunction.hpp.
|
inline |
Return the i-th scalar field.
i | Index of the scalar field. |
Definition at line 185 of file FEFunction.hpp.
|
inline |
Return the i-th vector field.
i | Index of the vector field. |
Definition at line 196 of file FEFunction.hpp.
|
inline |
Return the i-th vector field.
i | Index of the vector field. |
Definition at line 207 of file FEFunction.hpp.
|
private |
Vector of pointers of scalar fields.
Definition at line 218 of file FEFunction.hpp.
|
private |
Vector of pointers of vector fields.
Definition at line 221 of file FEFunction.hpp.