36 #ifndef EVALUATION_IF_CROSSED_HPP 37 #define EVALUATION_IF_CROSSED_HPP 39 #include <lifev/core/array/VectorEpetra.hpp> 40 #include <lifev/core/array/VectorSmall.hpp> 42 #include <lifev/core/LifeV.hpp> 44 #include <lifev/eta/fem/ETCurrentFE.hpp> 45 #include <lifev/eta/fem/ETCurrentFlag.hpp> 46 #include <lifev/eta/fem/ETFESpace.hpp> 47 #include <lifev/core/fem/QuadratureRule.hpp> 49 #include <lifev/eta/expression/ExpressionIfCrossed.hpp> 51 #include <boost/shared_ptr.hpp> 57 namespace ExpressionAssembly
64 template<
typename MeshType,
typename MapType,
UInt SpaceDim>
65 class EvaluationIfCrossed
76 typedef ETFESpace<MeshType, MapType, SpaceDim, 1> fespace_Type;
79 typedef std::shared_ptr<fespace_Type> fespacePtr_Type;
106 EvaluationIfCrossed (
const EvaluationIfCrossed<MeshType, MapType, SpaceDim>& evaluation)
108 M_fespace ( evaluation.M_fespace),
109 M_vector ( evaluation.M_vector, Repeated),
110 M_value ( evaluation.M_value)
114 explicit EvaluationIfCrossed (
const ExpressionIfCrossed<MeshType, MapType, SpaceDim>& expression)
116 M_fespace ( expression.fespace() ),
117 M_vector ( expression.vector(), Repeated ),
122 ~EvaluationIfCrossed()
132 void update (
const UInt& iElement)
134 bool existPositive (
false);
135 bool existNegative (
false);
137 for (
UInt i (0); i < 4; ++i)
139 UInt globalID (M_fespace->dof().localToGlobalMap (iElement, i) );
141 Real interpolatedValue = M_vector[globalID];
143 if (interpolatedValue >= 0)
145 existPositive =
true;
149 existNegative =
true;
153 if (existPositive && existNegative)
164 static void display (std::ostream& out = std::cout)
176 template<
typename CFEType >
177 void setGlobalCFE (
const CFEType* )
181 template<
typename CFEType >
182 void setTestCFE (
const CFEType* )
186 template<
typename CFEType >
187 void setSolutionCFE (
const CFEType* )
201 return_Type value_q (
const UInt& )
const 207 return_Type value_qi (
const UInt& ,
const UInt& )
const 226 EvaluationIfCrossed();
230 fespacePtr_Type M_fespace;
231 vector_Type M_vector;
236 template<
typename MeshType,
typename MapType,
UInt SpaceDim>
238 EvaluationIfCrossed<MeshType, MapType, SpaceDim>::
239 S_globalUpdateFlag = ET_UPDATE_NONE;
241 template<
typename MeshType,
typename MapType,
UInt SpaceDim>
243 EvaluationIfCrossed<MeshType, MapType, SpaceDim>::
244 S_testUpdateFlag = ET_UPDATE_NONE;
246 template<
typename MeshType,
typename MapType,
UInt SpaceDim>
248 EvaluationIfCrossed<MeshType, MapType, SpaceDim>::
249 S_solutionUpdateFlag = ET_UPDATE_NONE;
VectorEpetra - The Epetra Vector format Wrapper.
uint32_type flag_Type
bit-flag with up to 32 different flags
void updateInverseJacobian(const UInt &iQuadPt)
double Real
Generic real data.
QuadratureRule - The basis class for storing and accessing quadrature rules.
uint32_type UInt
generic unsigned integer (used mainly for addressing)