LifeV
FEField< MeshType, MapType, ReturnType > Class Template Referenceabstract

FEField - This class gives an abstract implementation of a finite element field. More...

#include <FEField.hpp>

+ Collaboration diagram for FEField< MeshType, MapType, ReturnType >:

Protected Attributes

FESpacePtr_Type M_FESpace
 Reference of the finite element space. More...
 
vectorPtr_Type M_vector
 Pointer of a vector where the value are stored. More...
 

Public Types

typedef MeshType mesh_Type
 
typedef MapType map_Type
 
typedef ReturnType return_Type
 
typedef FESpace< mesh_Type, map_TypeFESpace_Type
 
typedef std::shared_ptr< FESpace_TypeFESpacePtr_Type
 
typedef VectorEpetra vector_Type
 
typedef std::shared_ptr< vector_TypevectorPtr_Type
 
typedef Vector3D point_Type
 

Constructors and destructor

 FEField ()
 Empty constructor for the class. More...
 
 FEField (const FESpacePtr_Type &fESpace, const vectorPtr_Type &vector)
 Full constructor for the class. More...
 
 FEField (const FESpacePtr_Type &fESpace, const MapEpetraType &mapType=Repeated)
 Constructor for the class without the vector. More...
 
 FEField (const FEField &field)
 Copy constructor. More...
 
virtual ~FEField ()
 Virtual destructor. More...
 

Operators

FEFieldoperator= (const FEField &field)
 

Methods

virtual return_Type eval (const UInt &iElem, const point_Type &point, const Real &time=0.) const =0
 Abstract virtual eval function. More...
 

Set Methods

void setFESpacePtr (const FESpacePtr_Type &fESpace, const bool createVector=false, const MapEpetraType &mapType=Repeated)
 Set the FESpace. More...
 
void setVectorPtr (const vectorPtr_Type &vector)
 Set the epetra vector. More...
 
void setVector (const vector_Type &vector)
 Set the epetra vector. More...
 
void setUp (const FESpacePtr_Type &fESpace, const vectorPtr_Type &vector)
 Set both FESpace and vector. More...
 
void cleanField ()
 Clean the field. More...
 

Get Methods

const FESpace_TypegetFESpace () const
 Return the finite element space. More...
 
const FESpacePtr_TypegetFESpacePtr () const
 Return the pointer to the finite element space. More...
 
FESpace_TypegetFESpace ()
 Return the finite element space. More...
 
const vectorPtr_TypegetVectorPtr () const
 Return the vector where the value are stored. More...
 
vector_TypegetVector ()
 Return the vector where the value are stored. More...
 
const vector_TypegetVector () const
 Return the vector where the value are stored. More...
 

Detailed Description

template<typename MeshType, typename MapType, typename ReturnType>
class LifeV::FEField< MeshType, MapType, ReturnType >

FEField - This class gives an abstract implementation of a finite element field.

Author
A. Fumagalli aless.nosp@m.io.f.nosp@m.umaga.nosp@m.lli@.nosp@m.mail..nosp@m.poli.nosp@m.mi.it
M. Kern miche.nosp@m.l.ke.nosp@m.rn@in.nosp@m.ria..nosp@m.fr

This class represents the concept of a field associated to a finite element space.
This class is implemented as a simple container which stores a reference to a finite element space and a pointer to a vector. The vector represents the value of the field at each degree of freedom. The type of the value, e.g. scalar, is a template parameter which is specialized in the derived classes for the case of scalar fields and vector fields.
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.

Todo:
Add a method without the element id, less efficient but more flexible.
Note
The attribute which represent a point is an array of three elements. Change in future with a standard container.
If you need an Raviart-Thomas field you need to create a scalar field and not a vector field, since the field contains the value of a Raviart-Thomas times the outward unit normal of the face element.

Definition at line 75 of file FEField.hpp.

Member Typedef Documentation

◆ mesh_Type

Definition at line 83 of file FEField.hpp.

◆ map_Type

typedef MapType map_Type

Definition at line 84 of file FEField.hpp.

◆ return_Type

typedef ReturnType return_Type

Definition at line 85 of file FEField.hpp.

◆ FESpace_Type

Definition at line 87 of file FEField.hpp.

◆ FESpacePtr_Type

typedef std::shared_ptr< FESpace_Type > FESpacePtr_Type

Definition at line 88 of file FEField.hpp.

◆ vector_Type

Definition at line 90 of file FEField.hpp.

◆ vectorPtr_Type

typedef std::shared_ptr< vector_Type > vectorPtr_Type

Definition at line 91 of file FEField.hpp.

◆ point_Type

Definition at line 93 of file FEField.hpp.

Constructor & Destructor Documentation

◆ FEField() [1/4]

FEField ( )
inline

Empty constructor for the class.

Definition at line 101 of file FEField.hpp.

◆ FEField() [2/4]

FEField ( const FESpacePtr_Type fESpace,
const vectorPtr_Type vector 
)
inline

Full constructor for the class.

Parameters
fESpaceFinite element space where the field is defined.
vectorvector witch represent the solution.

Definition at line 109 of file FEField.hpp.

◆ FEField() [3/4]

FEField ( const FESpacePtr_Type fESpace,
const MapEpetraType mapType = Repeated 
)
inline

Constructor for the class without the vector.

Create the field with the input finite element space and a new vector. The type of the map of the vector is Repeated (default value) or Unique.

Parameters
fESpaceFinite element space where the field is defined.
mapTypeSpecify wether the map is Unique or Repeated. Default value: Repeated.

Definition at line 121 of file FEField.hpp.

+ Here is the caller graph for this function:

◆ FEField() [4/4]

FEField ( const FEField< MeshType, MapType, ReturnType > &  field)
inline

Copy constructor.

Parameters
fieldFinite element field to be copied.

Definition at line 130 of file FEField.hpp.

◆ ~FEField()

virtual ~FEField ( )
inlinevirtual

Virtual destructor.

Definition at line 136 of file FEField.hpp.

Member Function Documentation

◆ operator=()

FEField& operator= ( const FEField< MeshType, MapType, ReturnType > &  field)
inline

Definition at line 143 of file FEField.hpp.

◆ eval()

virtual return_Type eval ( const UInt iElem,
const point_Type point,
const Real time = 0. 
) const
pure virtual

Abstract virtual eval function.

Evaluate the field on a given point in a given element.

Parameters
iElemElement id in the mesh.
pointPoint where the field is evaluated, vector format.
Returns
The template type of the value of the field.

Implemented in FEVectorField< MeshType, MapType >, and FEScalarField< MeshType, MapType >.

◆ setFESpacePtr()

void setFESpacePtr ( const FESpacePtr_Type fESpace,
const bool  createVector = false,
const MapEpetraType mapType = Repeated 
)
inline

Set the FESpace.

Parameters
fESpacePointer of a FESpace.
createVectorTrue if the vector is created, false otherwise. Default value: false.
mapTypeSpecify wether the map is Unique or Repeated. Default value: Repeated.

Definition at line 180 of file FEField.hpp.

◆ setVectorPtr()

void setVectorPtr ( const vectorPtr_Type vector)
inline

Set the epetra vector.

Parameters
vectorPointer of an epetra vector.

Definition at line 196 of file FEField.hpp.

◆ setVector()

void setVector ( const vector_Type vector)
inline

Set the epetra vector.

Parameters
vectorThe epetra vector.

Definition at line 205 of file FEField.hpp.

◆ setUp()

void setUp ( const FESpacePtr_Type fESpace,
const vectorPtr_Type vector 
)
inline

Set both FESpace and vector.

Parameters
fESpacePointer of a FESpace.
vectorPointer of a vector.

Definition at line 215 of file FEField.hpp.

◆ cleanField()

void cleanField ( )
inline

Clean the field.

Definition at line 222 of file FEField.hpp.

◆ getFESpace() [1/2]

const FESpace_Type& getFESpace ( ) const
inline

Return the finite element space.

Returns
Constant FESpace_Type reference of the finite element space.

Definition at line 236 of file FEField.hpp.

◆ getFESpacePtr()

const FESpacePtr_Type& getFESpacePtr ( ) const
inline

Return the pointer to the finite element space.

Returns
Constant FESpacePtr_Type reference of the finite element space.

Definition at line 245 of file FEField.hpp.

◆ getFESpace() [2/2]

FESpace_Type& getFESpace ( )
inline

Return the finite element space.

Returns
FESpace_Type reference of the finite element space.

Definition at line 254 of file FEField.hpp.

◆ getVectorPtr()

const vectorPtr_Type& getVectorPtr ( ) const
inline

Return the vector where the value are stored.

Returns
Constant vectorPtr_Type reference of the vector.

Definition at line 263 of file FEField.hpp.

◆ getVector() [1/2]

vector_Type& getVector ( )
inline

Return the vector where the value are stored.

Returns
vector_Type reference of the vector.

Definition at line 272 of file FEField.hpp.

◆ getVector() [2/2]

const vector_Type& getVector ( ) const
inline

Return the vector where the value are stored.

Returns
Constant vector_Type reference of the vector.

Definition at line 281 of file FEField.hpp.

Field Documentation

◆ M_FESpace

FESpacePtr_Type M_FESpace
protected

Reference of the finite element space.

Definition at line 291 of file FEField.hpp.

◆ M_vector

vectorPtr_Type M_vector
protected

Pointer of a vector where the value are stored.

Definition at line 294 of file FEField.hpp.


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