39 #include <boost/numeric/ublas/matrix.hpp> 42 #include <lifev/core/LifeV.hpp> 43 #include <lifev/core/fem/FESpace.hpp> 44 #include <lifev/core/array/VectorEpetra.hpp> 45 #include <lifev/core/array/VectorSmall.hpp> 50 typedef boost::numeric::ublas::vector<Real> Vector;
51 typedef boost::numeric::ublas::matrix<Real> Matrix;
74 template <
typename MeshType,
typename MapType,
typename ReturnType >
145 if (
this != & field )
167 const Real& time = 0.)
const = 0;
181 const bool createVector =
false,
188 M_vector.reset (
new vector_Type ( M_FESpace->map(), mapType ) );
207 M_vector.reset (
new vector_Type ( vector ) );
217 this->setFESpacePtr ( fESpace,
false );
218 this->setVectorPtr ( vector );
224 this->getVector().zero();
306 template <
typename MeshType,
typename MapType >
380 const Real& time = 0. )
const;
386 template <
typename MeshType,
typename MapType >
392 return this->M_FESpace->feInterpolateValue ( iElem, * (
this->M_vector), P );
404 template <
typename MeshType,
typename MapType >
406 public FEField < MeshType, MapType, Vector >
479 const Real& time = 0. )
const;
483 template <
typename MeshType,
typename MapType >
488 Vector value ( P.size() );
491 for (
UInt i = 0; i < P.size(); ++i )
493 value (i) =
this->M_FESpace->feInterpolateValue ( iElem, * (
this->M_vector), P, i );
vector_Type & getVector()
Return the vector where the value are stored.
FEField & operator=(const FEField &field)
FEVectorField(const FESpacePtr_Type &fESpace, const MapEpetraType &mapType=Repeated)
Constructor for the class without the vector.
FEScalarField< RegionMesh< LinearTetra >, MapEpetra > FEScalarFieldTetra
FEField - This class gives an abstract implementation of a finite element field.
FEVectorField(const FEVectorField &field)
Copy constructor.
FESpace - Short description here please!
FEField_Type::point_Type point_Type
FEVectorField< RegionMesh< LinearTetra >, MapEpetra > FEVectorFieldTetra
FEScalarField(const FEScalarField &field)
Copy constructor.
const FESpace_Type & getFESpace() const
Return the finite element space.
void cleanField()
Clean the field.
virtual return_Type eval(const UInt &iElem, const point_Type &point, const Real &time=0.) const =0
Abstract virtual eval function.
FEField_Type::vectorPtr_Type vectorPtr_Type
FEVectorField()
Empty constructor for the class.
FEField< mesh_Type, map_Type, return_Type > FEField_Type
FEField(const FEField &field)
Copy constructor.
FEVectorField(const FESpacePtr_Type &fESpace, const vectorPtr_Type &vector)
Full constructor for the class.
virtual return_Type eval(const UInt &iElem, const point_Type &P, const Real &time=0.) const
Eval function.
FEScalarField - This class gives an abstract implementation of a finite element scalar field...
vectorPtr_Type M_vector
Pointer of a vector where the value are stored.
void setUp(const FESpacePtr_Type &fESpace, const vectorPtr_Type &vector)
Set both FESpace and vector.
const vector_Type & getVector() const
Return the vector where the value are stored.
virtual ~FEVectorField()
Virtual destructor.
FEField< mesh_Type, map_Type, return_Type > FEField_Type
FEField_Type::point_Type point_Type
FEField()
Empty constructor for the class.
FEField(const FESpacePtr_Type &fESpace, const vectorPtr_Type &vector)
Full constructor for the class.
void setFESpacePtr(const FESpacePtr_Type &fESpace, const bool createVector=false, const MapEpetraType &mapType=Repeated)
Set the FESpace.
FEField_Type::FESpacePtr_Type FESpacePtr_Type
const FESpacePtr_Type & getFESpacePtr() const
Return the pointer to the finite element space.
void setVector(const vector_Type &vector)
Set the epetra vector.
FEField_Type::FESpacePtr_Type FESpacePtr_Type
virtual ~FEScalarField()
Virtual destructor.
double Real
Generic real data.
FEScalarField(const FESpacePtr_Type &fESpace, const MapEpetraType &mapType=Repeated)
Constructor for the class without the vector.
FESpace< mesh_Type, map_Type > FESpace_Type
FEVectorField - This class gives an abstract implementation of a finite element vector field...
FEField_Type::vectorPtr_Type vectorPtr_Type
void setVectorPtr(const vectorPtr_Type &vector)
Set the epetra vector.
VectorSmall< 3 > Vector3D
std::shared_ptr< vector_Type > vectorPtr_Type
FESpacePtr_Type M_FESpace
Reference of the finite element space.
FEScalarField()
Empty constructor for the class.
virtual return_Type eval(const UInt &iElem, const point_Type &P, const Real &time=0.) const
Eval function.
const vectorPtr_Type & getVectorPtr() const
Return the vector where the value are stored.
FEField(const FESpacePtr_Type &fESpace, const MapEpetraType &mapType=Repeated)
Constructor for the class without the vector.
std::shared_ptr< FESpace_Type > FESpacePtr_Type
uint32_type UInt
generic unsigned integer (used mainly for addressing)
FEScalarField(const FESpacePtr_Type &fESpace, const vectorPtr_Type &vector)
Full constructor for the class.
FESpace_Type & getFESpace()
Return the finite element space.
virtual ~FEField()
Virtual destructor.