37 #ifndef EVALUTATION_SCALARTOVECTOR_HPP 38 #define EVALUTATION_SCALARTOVECTOR_HPP 41 #include <lifev/core/LifeV.hpp> 43 #include <lifev/core/array/VectorSmall.hpp> 45 #include <lifev/eta/expression/ExpressionScalarToVector.hpp> 47 #include <lifev/core/fem/QuadratureRule.hpp> 52 namespace ExpressionAssembly
61 template <
typename EvaluationType,
UInt FieldDim>
62 class EvaluationScalarToVector
99 EvaluationScalarToVector (
const EvaluationScalarToVector& eval)
100 : M_evaluation1 (eval.M_evaluation1),
101 M_evaluation2 (eval.M_evaluation2),
102 M_evaluation3 (eval.M_evaluation3),
107 template<
typename Expression>
108 explicit EvaluationScalarToVector (
const ExpressionScalarToVector<Expression, FieldDim>& expression)
109 : M_evaluation1 (expression.exprEx1() ),
110 M_evaluation2 (expression.exprEx2() ),
111 M_evaluation3 (expression.exprEx3() ),
116 ~EvaluationScalarToVector()
126 void update (
const UInt& iElement)
128 M_evaluation1.update (iElement);
129 M_evaluation2.update (iElement);
130 M_evaluation3.update (iElement);
134 static void display (std::ostream& out = std::cout)
136 out <<
" vector from scalar expression ";
137 EvaluationType::display (out);
147 template<
typename CFEType >
148 void setGlobalCFE (
const CFEType* globalCFE)
150 M_evaluation1.setGlobalCFE (globalCFE);
151 M_evaluation2.setGlobalCFE (globalCFE);
152 M_evaluation3.setGlobalCFE (globalCFE);
156 template<
typename CFEType >
157 void setTestCFE (
const CFEType* testCFE)
159 M_evaluation1.setTestCFE (testCFE);
160 M_evaluation2.setTestCFE (testCFE);
161 M_evaluation3.setTestCFE (testCFE);
165 template<
typename CFEType >
166 void setSolutionCFE (
const CFEType* solutionCFE)
168 M_evaluation1.setSolutionCFE (solutionCFE);
169 M_evaluation2.setSolutionCFE (solutionCFE);
170 M_evaluation3.setSolutionCFE (solutionCFE);
176 M_evaluation1.setQuadrature (qr);
177 M_evaluation2.setQuadrature (qr);
178 M_evaluation3.setQuadrature (qr);
188 return_Type value_q (
const UInt& q)
const 190 M_outputVector[0] = M_evaluation1.value_q( q ) ;
191 M_outputVector[1] = M_evaluation2.value_q( q ) ;
192 M_outputVector[2] = M_evaluation3.value_q( q ) ;
193 return M_outputVector;
197 return_Type value_qi (
const UInt& q,
const UInt& i)
const 200 M_outputVector[0] = M_evaluation1.value_q( q ,i) ;
201 M_outputVector[1] = M_evaluation2.value_q( q ,i) ;
202 M_outputVector[2] = M_evaluation3.value_q( q ,i) ;
203 return M_outputVector;
207 return_Type value_qij (
const UInt& q,
const UInt& i,
const UInt& j)
const 209 M_outputVector[0] = M_evaluation1.value_q( q,i,j ) ;
210 M_outputVector[1] = M_evaluation2.value_q( q,i,j ) ;
211 M_outputVector[2] = M_evaluation3.value_q( q,i,j ) ;
212 return M_outputVector;
223 EvaluationScalarToVector();
228 EvaluationType M_evaluation1;
229 EvaluationType M_evaluation2;
230 EvaluationType M_evaluation3;
236 template<
typename EvaluationType,
UInt FieldDim >
237 const flag_Type EvaluationScalarToVector<EvaluationType, FieldDim>::S_globalUpdateFlag
238 = EvaluationType::S_globalUpdateFlag;
240 template<
typename EvaluationType,
UInt FieldDim >
241 const flag_Type EvaluationScalarToVector<EvaluationType, FieldDim>::S_testUpdateFlag
242 = EvaluationType::S_testUpdateFlag;
244 template<
typename EvaluationType,
UInt FieldDim >
245 const flag_Type EvaluationScalarToVector<EvaluationType, FieldDim>::S_solutionUpdateFlag
246 = EvaluationType::S_solutionUpdateFlag;
uint32_type flag_Type
bit-flag with up to 32 different flags
void updateInverseJacobian(const UInt &iQuadPt)
QuadratureRule - The basis class for storing and accessing quadrature rules.
uint32_type UInt
generic unsigned integer (used mainly for addressing)