36 #ifndef INTEGRATE_VALUE_ELEMENT_HPP 37 #define INTEGRATE_VALUE_ELEMENT_HPP 39 #include <lifev/core/LifeV.hpp> 41 #include <lifev/core/fem/QuadratureRule.hpp> 42 #include <lifev/eta/fem/ETCurrentFE.hpp> 43 #include <lifev/eta/fem/MeshGeometricMap.hpp> 44 #include <lifev/eta/fem/QRAdapterBase.hpp> 46 #include <lifev/eta/expression/ExpressionToEvaluation.hpp> 48 #include <boost/shared_ptr.hpp> 55 namespace ExpressionAssembly
67 template <
typename MeshType,
typename ExpressionType,
typename QRAdapterType>
89 const QRAdapterType& qrAdapter,
90 const ExpressionType& expression);
117 void check (std::ostream& out = std::cout);
166 template <
typename MeshType,
typename ExpressionType,
typename QRAdapterType>
169 const QRAdapterType& qrAdapter,
170 const ExpressionType& expression)
176 switch (MeshType::geoShape_Type::BasRefSha::S_shape)
179 M_globalCFE_std =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feSegP0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
180 M_globalCFE_adapted =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feSegP0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
183 M_globalCFE_std =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feTriaP0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
184 M_globalCFE_adapted =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feTriaP0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
187 M_globalCFE_std =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feQuadQ0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
188 M_globalCFE_adapted =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feQuadQ0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
191 M_globalCFE_std =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feTetraP0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
192 M_globalCFE_adapted =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feTetraP0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
195 M_globalCFE_std =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feHexaQ0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
196 M_globalCFE_adapted =
new ETCurrentFE<MeshType::S_geoDimensions, 1> (
feHexaQ0, geometricMapFromMesh<MeshType>(), qrAdapter.standardQR() );
199 ERROR_MSG (
"Unrecognized element shape");
206 template <
typename MeshType,
typename ExpressionType,
typename QRAdapterType>
213 switch (MeshType::geoShape_Type::BasRefSha::S_shape)
236 ERROR_MSG (
"Unrecognized element shape");
244 template <
typename MeshType,
typename ExpressionType,
typename QRAdapterType>
257 template <
typename MeshType,
typename ExpressionType,
typename QRAdapterType>
262 out <<
" Checking the integration : " << std::endl;
267 template <
typename MeshType,
typename ExpressionType,
typename QRAdapterType>
272 UInt nbElements (M_mesh->numElements() );
278 bool isPreviousAdapted (
true);
280 for (
UInt iElement (0); iElement < nbElements; ++iElement)
299 M_globalCFE_adapted->update (M_mesh->element (iElement), evaluation_Type::S_globalUpdateFlag | ET_UPDATE_WDET);
305 for (
UInt iQuadPt (0); iQuadPt <
M_qrAdapter.adaptedQR().nbQuadPt(); ++iQuadPt)
312 isPreviousAdapted =
true;
317 if (isPreviousAdapted)
322 isPreviousAdapted =
false;
326 M_globalCFE_std->update (M_mesh->element (iElement), evaluation_Type::S_globalUpdateFlag | ET_UPDATE_WDET);
333 for (
UInt iQuadPt (0); iQuadPt < nbQuadPt_std; ++iQuadPt)
std::shared_ptr< MeshType > M_mesh
const ReferenceFEScalar feHexaQ0("Lagrange Q0 on a hexaedra", FE_Q0_3D, HEXA, 0, 0, 0, 1, 1, 3, fct_Q0_3D, derfct_Q0_3D, der2fct_Q0_3D, refcoor_Q0_3D, STANDARD_PATTERN, &feQuadQ0, &lagrangianTransform)
void check(std::ostream &out=std::cout)
Ouput method.
const ReferenceFEScalar feSegP0("Lagrange P0 on a segment", FE_P0_1D, LINE, 0, 1, 0, 0, 1, 1, fct_P0_1D, derfct_P0_1D, der2fct_P0_1D, refcoor_P0_1D, STANDARD_PATTERN, &fePointP0, &lagrangianTransform)
ExpressionToEvaluation< ExpressionType, 0, 0, MeshType::S_geoDimensions >::evaluation_Type evaluation_Type
Evaluation type.
void operator>>(Real &value)
Operator wrapping the addTo method.
void updateInverseJacobian(const UInt &iQuadPt)
const ReferenceFEScalar feTetraP0("Lagrange P0 on a tetraedra", FE_P0_3D, TETRA, 0, 0, 0, 1, 1, 3, fct_P0_3D, derfct_P0_3D, der2fct_P0_3D, refcoor_P0_3D, STANDARD_PATTERN, &feTriaP0, &lagrangianTransform)
evaluation_Type M_evaluation
const ReferenceFEScalar feTriaP0("Lagrange P0 on a triangle", FE_P0_2D, TRIANGLE, 0, 0, 1, 0, 1, 2, fct_P0_2D, derfct_P0_2D, der2fct_P0_2D, refcoor_P0_2D, STANDARD_PATTERN, &feSegP0, &lagrangianTransform)
IntegrateValueElement(const IntegrateValueElement< MeshType, ExpressionType, QRAdapterType > &integrator)
Copy constructor.
class ExpressionToEvaluation A class to pass from an Expression (Tree) to the corresponding Evaluatio...
double Real
Generic real data.
QRAdapterType M_qrAdapter
IntegrateValueElement()
No empty constructor.
ETCurrentFE< MeshType::S_geoDimensions, 1 > * M_globalCFE_std
const ReferenceFEScalar feQuadQ0("Lagrange Q0 on a quadrangle", FE_Q0_2D, QUAD, 0, 0, 1, 0, 1, 2, fct_Q0_2D, derfct_Q0_2D, der2fct_Q0_2D, refcoor_Q0_2D, STANDARD_PATTERN, &feSegP0, &lagrangianTransform)
ETCurrentFE< MeshType::S_geoDimensions, 1 > * M_globalCFE_adapted
IntegrateValueElement(const std::shared_ptr< MeshType > &mesh, const QRAdapterType &qrAdapter, const ExpressionType &expression)
Full data constructor.
The class to actually perform the loop over the elements to compute a value.
void addTo(Real &value)
Method that performs the assembly.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
~IntegrateValueElement()
Destructor.