LifeV
ExpressionToEvaluation.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory UNiversity
7 
8  This file is part of the LifeV library
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation; either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with this library; if not, see <http://www.gnu.org/licenses/>
22 
23 
24 *******************************************************************************
25 */
26 //@HEADER
27 
28 /*!
29  * @file
30  @brief This file contains the definition of the ExpressionToEvaluation class
31 
32  @date 06/2011
33  @author Samuel Quinodoz <samuel.quinodoz@epfl.ch>
34  */
35 
36 #ifndef EXPRESSION_TO_EVALUATION_HPP
37 #define EXPRESSION_TO_EVALUATION_HPP
38 
39 #include <lifev/eta/expression/ExpressionPhiI.hpp>
40 #include <lifev/eta/expression/ExpressionPhiJ.hpp>
41 #include <lifev/eta/expression/ExpressionDphiI.hpp>
42 #include <lifev/eta/expression/ExpressionDphiJ.hpp>
43 #include <lifev/eta/expression/ExpressionDivI.hpp>
44 #include <lifev/eta/expression/ExpressionDivJ.hpp>
45 #include <lifev/eta/expression/ExpressionMinusTransposed.hpp>
46 #include <lifev/eta/expression/ExpressionInverse.hpp>
47 #include <lifev/eta/expression/ExpressionDeterminant.hpp>
48 #include <lifev/eta/expression/ExpressionTrace.hpp>
49 #include <lifev/eta/expression/ExpressionLaplacianI.hpp>
50 #include <lifev/eta/expression/ExpressionLaplacianJ.hpp>
51 
52 #include <lifev/eta/expression/ExpressionAddition.hpp>
53 #include <lifev/eta/expression/ExpressionSubstraction.hpp>
54 #include <lifev/eta/expression/ExpressionProduct.hpp>
55 #include <lifev/eta/expression/ExpressionPower.hpp>
56 #include <lifev/eta/expression/ExpressionSquareRoot.hpp>
57 #include <lifev/eta/expression/ExpressionCubicRoot.hpp>
58 #include <lifev/eta/expression/ExpressionArcTan.hpp>
59 #include <lifev/eta/expression/ExpressionDerivativeArcTan.hpp>
60 #include <lifev/eta/expression/ExpressionLogarithm.hpp>
61 #include <lifev/eta/expression/ExpressionExponential.hpp>
62 #include <lifev/eta/expression/ExpressionDot.hpp>
63 #include <lifev/eta/expression/ExpressionDivision.hpp>
64 #include <lifev/eta/expression/ExpressionEmult.hpp>
65 #include <lifev/eta/expression/ExpressionExtract1.hpp>
66 #include <lifev/eta/expression/ExpressionExtract2.hpp>
67 #include <lifev/eta/expression/ExpressionTranspose.hpp>
68 #include <lifev/eta/expression/ExpressionNormalize.hpp>
69 #include <lifev/eta/expression/ExpressionSymmetricTensor.hpp>
70 #include <lifev/eta/expression/ExpressionOuterProduct.hpp>
71 
72 #include <lifev/eta/expression/ExpressionScalar.hpp>
73 #include <lifev/eta/expression/ExpressionVector.hpp>
74 #include <lifev/eta/expression/ExpressionMatrix.hpp>
75 
76 #include <lifev/eta/expression/ExpressionInterpolateValue.hpp>
77 #include <lifev/eta/expression/ExpressionInterpolateGradient.hpp>
78 #include <lifev/eta/expression/ExpressionInterpolateLaplacian.hpp>
79 #include <lifev/eta/expression/ExpressionReturnAtQuadraturePoints.hpp>
80 
81 #include <lifev/eta/expression/ExpressionFunctor.hpp>
82 
83 #include <lifev/eta/expression/ExpressionHK.hpp>
84 #include <lifev/eta/expression/ExpressionDetJacobian.hpp>
85 #include <lifev/eta/expression/ExpressionMetricTensor.hpp>
86 #include <lifev/eta/expression/ExpressionMetricVector.hpp>
87 #include <lifev/eta/expression/ExpressionMeas.hpp>
88 #include <lifev/eta/expression/ExpressionMeasBDCurrentFE.hpp>
89 #include <lifev/eta/expression/ExpressionPosition.hpp>
90 #include <lifev/eta/expression/ExpressionNormal.hpp>
91 
92 #include <lifev/eta/expression/ExpressionIfCrossed.hpp>
93 #include <lifev/eta/expression/ExpressionVectorFromNonConstantScalar.hpp>
94 #include <lifev/eta/expression/ExpressionVectorFromNonConstantMatrix.hpp>
95 #include <lifev/eta/expression/ExpressionPatchArea.hpp>
96 
97 #include <lifev/eta/expression/ExpressionScalarToVector.hpp>
98 
99 #include <lifev/eta/expression/EvaluationPhiI.hpp>
100 #include <lifev/eta/expression/EvaluationPhiJ.hpp>
101 #include <lifev/eta/expression/EvaluationDphiI.hpp>
102 #include <lifev/eta/expression/EvaluationDphiJ.hpp>
103 #include <lifev/eta/expression/EvaluationDivI.hpp>
104 #include <lifev/eta/expression/EvaluationDivJ.hpp>
105 #include <lifev/eta/expression/EvaluationMinusTransposed.hpp>
106 #include <lifev/eta/expression/EvaluationInverse.hpp>
107 #include <lifev/eta/expression/EvaluationDeterminant.hpp>
108 #include <lifev/eta/expression/EvaluationTrace.hpp>
109 #include <lifev/eta/expression/EvaluationLaplacianI.hpp>
110 #include <lifev/eta/expression/EvaluationLaplacianJ.hpp>
111 
112 #include <lifev/eta/expression/EvaluationAddition.hpp>
113 #include <lifev/eta/expression/EvaluationSubstraction.hpp>
114 #include <lifev/eta/expression/EvaluationProduct.hpp>
115 #include <lifev/eta/expression/EvaluationPower.hpp>
116 #include <lifev/eta/expression/EvaluationSquareRoot.hpp>
117 #include <lifev/eta/expression/EvaluationCubicRoot.hpp>
118 #include <lifev/eta/expression/EvaluationArcTan.hpp>
119 #include <lifev/eta/expression/EvaluationDerivativeArcTan.hpp>
120 #include <lifev/eta/expression/EvaluationLogarithm.hpp>
121 #include <lifev/eta/expression/EvaluationExponential.hpp>
122 #include <lifev/eta/expression/EvaluationDot.hpp>
123 #include <lifev/eta/expression/EvaluationDivision.hpp>
124 #include <lifev/eta/expression/EvaluationEmult.hpp>
125 #include <lifev/eta/expression/EvaluationExtract1.hpp>
126 #include <lifev/eta/expression/EvaluationExtract2.hpp>
127 #include <lifev/eta/expression/EvaluationTranspose.hpp>
128 #include <lifev/eta/expression/EvaluationNormalize.hpp>
129 #include <lifev/eta/expression/EvaluationSymmetricTensor.hpp>
130 #include <lifev/eta/expression/EvaluationOuterProduct.hpp>
131 
132 #include <lifev/eta/expression/EvaluationScalar.hpp>
133 #include <lifev/eta/expression/EvaluationVector.hpp>
134 #include <lifev/eta/expression/EvaluationMatrix.hpp>
135 
136 #include <lifev/eta/expression/EvaluationInterpolateValue.hpp>
137 #include <lifev/eta/expression/EvaluationInterpolateGradient.hpp>
138 #include <lifev/eta/expression/EvaluationInterpolateLaplacian.hpp>
139 #include <lifev/eta/expression/EvaluationReturnAtQuadraturePoints.hpp>
140 
141 #include <lifev/eta/expression/EvaluationFunctor.hpp>
142 
143 #include <lifev/eta/expression/EvaluationHK.hpp>
144 #include <lifev/eta/expression/EvaluationDetJacobian.hpp>
145 #include <lifev/eta/expression/EvaluationMetricTensor.hpp>
146 #include <lifev/eta/expression/EvaluationMetricVector.hpp>
147 #include <lifev/eta/expression/EvaluationMeas.hpp>
148 #include <lifev/eta/expression/EvaluationMeasBDCurrentFE.hpp>
149 #include <lifev/eta/expression/EvaluationPosition.hpp>
150 #include <lifev/eta/expression/EvaluationNormal.hpp>
151 
152 #include <lifev/eta/expression/EvaluationIfCrossed.hpp>
153 #include <lifev/eta/expression/EvaluationPatchArea.hpp>
154 #include <lifev/eta/expression/EvaluationVectorFromNonConstantScalar.hpp>
155 #include <lifev/eta/expression/EvaluationVectorFromNonConstantMatrix.hpp>
156 
157 #include <lifev/eta/expression/EvaluationScalarToVector.hpp>
158 
159 namespace LifeV
160 {
161 
162 namespace ExpressionAssembly
163 {
164 
165 //! class ExpressionToEvaluation A class to pass from an Expression (Tree) to the corresponding Evaluation (Tree)
166 /*!
167  @author Samuel Quinodoz <samuel.quinodoz@epfl.ch>
168 
169  This class cannot be instanciated, neither its generic definition nor its partial or total specializations.
170 
171  The only scope of this class is to provide, given an Expression (Tree), the type of the corresponding
172  Evaluation (Tree). This is achieved by a typedef "evaluation_Type" provided only in the partial specializations.
173 
174  The template parameters are the following (no requirements):
175 
176  <b> Expression </b> The type of the expression to be "converted" to an Evaluation
177  <b> testDim </b> The field dimension of the test finite element space
178  <b> solutionDim </b> The field dimension of the solution finite element space
179  <b> spaceDim </b> The dimension of the domain.
180 
181  Remark that the field dimension of the test finite element space and the field dimension of the solution finite element
182  space can differ. This is the case e.g. when assembling a pressure/velocity block for a Stokes problem.
183 
184 */
185 
186 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
188 {
189 public:
190  typedef typename Expression::evaluation_Type evaluation_Type;
191 private:
194 };
195 
196 // \cond
197 
198 // Specialized for Extract1
199 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
201  ExpressionExtract1<Expression>
202  , testDim
203  , solutionDim
204  , spaceDim >
205 {
206 public:
207  typedef EvaluationExtract1 <
208  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
209  > evaluation_Type;
210 private:
211  ExpressionToEvaluation();
212  ~ExpressionToEvaluation();
213 };
214 
215 
216 // Specialized for Extract2
217 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
219  ExpressionExtract2<Expression>
220  , testDim
221  , solutionDim
222  , spaceDim >
223 {
224 public:
225  typedef EvaluationExtract2 <
226  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
227  > evaluation_Type;
228 private:
229  ExpressionToEvaluation();
230  ~ExpressionToEvaluation();
231 };
232 
233 // Specialized for phi_i
234 template<UInt testDim, UInt solutionDim, UInt spaceDim>
235 class ExpressionToEvaluation<ExpressionPhiI, testDim, solutionDim, spaceDim>
236 {
237 public:
238  typedef EvaluationPhiI<testDim> evaluation_Type;
239 private:
240  ExpressionToEvaluation();
241  ~ExpressionToEvaluation();
242 };
243 
244 // Specialized for phi_j
245 template<UInt testDim, UInt solutionDim, UInt spaceDim>
246 class ExpressionToEvaluation<ExpressionPhiJ, testDim, solutionDim, spaceDim>
247 {
248 public:
249  typedef EvaluationPhiJ<solutionDim> evaluation_Type;
250 private:
251  ExpressionToEvaluation();
252  ~ExpressionToEvaluation();
253 };
254 
255 // Specialized for dphi_i
256 template<UInt testDim, UInt solutionDim, UInt spaceDim>
257 class ExpressionToEvaluation<ExpressionDphiI, testDim, solutionDim, spaceDim>
258 {
259 public:
260  typedef EvaluationDphiI<testDim, spaceDim> evaluation_Type;
261 private:
262  ExpressionToEvaluation();
263  ~ExpressionToEvaluation();
264 };
265 
266 // Specialized for laplacian(phi_i)
267 template<UInt testDim, UInt solutionDim, UInt spaceDim>
268 class ExpressionToEvaluation<ExpressionLaplacianI, testDim, solutionDim, spaceDim>
269 {
270 public:
271  typedef EvaluationLaplacianI<testDim, spaceDim> evaluation_Type;
272 private:
273  ExpressionToEvaluation();
274  ~ExpressionToEvaluation();
275 };
276 
277 // Specialized for laplacian(phi_j)
278 template<UInt testDim, UInt solutionDim, UInt spaceDim>
279 class ExpressionToEvaluation<ExpressionLaplacianJ, testDim, solutionDim, spaceDim>
280 {
281 public:
282  typedef EvaluationLaplacianJ<solutionDim, spaceDim> evaluation_Type;
283 private:
284  ExpressionToEvaluation();
285  ~ExpressionToEvaluation();
286 };
287 
288 // Specialized for dphi_j
289 template<UInt testDim, UInt solutionDim, UInt spaceDim>
290 class ExpressionToEvaluation<ExpressionDphiJ, testDim, solutionDim, spaceDim>
291 {
292 public:
293  typedef EvaluationDphiJ<solutionDim, spaceDim> evaluation_Type;
294 private:
295  ExpressionToEvaluation();
296  ~ExpressionToEvaluation();
297 };
298 
299 // Specialized for div_i
300 template<UInt testDim, UInt solutionDim, UInt spaceDim>
301 class ExpressionToEvaluation<ExpressionDivI, testDim, solutionDim, spaceDim>
302 {
303 public:
304  typedef EvaluationDivI<testDim, spaceDim> evaluation_Type;
305 private:
306  ExpressionToEvaluation();
307  ~ExpressionToEvaluation();
308 };
309 
310 // Specialized for div_j
311 template<UInt testDim, UInt solutionDim, UInt spaceDim>
312 class ExpressionToEvaluation<ExpressionDivJ, testDim, solutionDim, spaceDim>
313 {
314 public:
315  typedef EvaluationDivJ<solutionDim, spaceDim> evaluation_Type;
316 private:
317  ExpressionToEvaluation();
318  ~ExpressionToEvaluation();
319 };
320 
321 // Specialized for transpose
322 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
324  ExpressionTranspose<Expression>
325  , testDim
326  , solutionDim
327  , spaceDim >
328 {
329 public:
330  typedef EvaluationTranspose <
331  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
332  > evaluation_Type;
333 private:
334  ExpressionToEvaluation();
335  ~ExpressionToEvaluation();
336 };
337 
338 // Specialized for normalization
339 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
341  ExpressionNormalize<Expression>
342  , testDim
343  , solutionDim
344  , spaceDim >
345 {
346 public:
347  typedef EvaluationNormalize <
348  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
349  > evaluation_Type;
350 private:
351  ExpressionToEvaluation();
352  ~ExpressionToEvaluation();
353 };
354 
355 // Specialized for symmetric expression
356 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
358  ExpressionSymmetricTensor<Expression>
359  , testDim
360  , solutionDim
361  , spaceDim >
362 {
363 public:
364  typedef EvaluationSymmetricTensor <
365  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
366  > evaluation_Type;
367 private:
368  ExpressionToEvaluation();
369  ~ExpressionToEvaluation();
370 };
371 
372 
373 // Specialized for the minus transposed
374 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
376  ExpressionMinusTransposed<Expression>
377  , testDim
378  , solutionDim
379  , spaceDim >
380 {
381 public:
382  typedef EvaluationMinusTransposed <
383  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
384  > evaluation_Type;
385 private:
386  ExpressionToEvaluation();
387  ~ExpressionToEvaluation();
388 };
389 
390 //
391 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
393 ExpressionScalarToVector<Expression, spaceDim>
394 , testDim
395 , solutionDim
396 , spaceDim >
397 {
398 public:
399  typedef ExpressionScalarToVector <
400  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
401  , spaceDim > evaluation_Type;
402 private:
403  ExpressionToEvaluation();
404  ~ExpressionToEvaluation();
405 };
406 
407 // Specialized for the inverse
408 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
410  ExpressionInverse<Expression>
411  , testDim
412  , solutionDim
413  , spaceDim >
414 {
415 public:
416  typedef EvaluationInverse <
417  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
418  > evaluation_Type;
419 private:
420  ExpressionToEvaluation();
421  ~ExpressionToEvaluation();
422 };
423 
424 
425 // Specialized for determinant
426 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
428  ExpressionDeterminant<Expression>
429  , testDim
430  , solutionDim
431  , spaceDim >
432 {
433 public:
434  typedef EvaluationDeterminant <
435  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
436  > evaluation_Type;
437 private:
438  ExpressionToEvaluation();
439  ~ExpressionToEvaluation();
440 };
441 
442 
443 // Specialized for trace
444 template<typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
446  ExpressionTrace<Expression>
447  , testDim
448  , solutionDim
449  , spaceDim >
450 {
451 public:
452  typedef EvaluationTrace <
453  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
454  > evaluation_Type;
455 private:
456  ExpressionToEvaluation();
457  ~ExpressionToEvaluation();
458 };
459 
460 // Specialized for vector from non constant scalar fields
461 template<typename Expression, UInt FEFieldDim, UInt testDim, UInt solutionDim, UInt spaceDim>
463  ExpressionVectorFromNonConstantScalar<Expression, FEFieldDim>
464  , testDim
465  , solutionDim
466  , spaceDim >
467 {
468 public:
469  typedef EvaluationVectorFromNonConstantScalar <
470  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type,
471  FEFieldDim
472  > evaluation_Type;
473 private:
474  ExpressionToEvaluation();
475  ~ExpressionToEvaluation();
476 };
477 
478 
479 // Specialized for vector from non constant scalar fields
480 template<typename Expression, UInt FESpaceDim, UInt FEFieldDim, UInt testDim, UInt solutionDim, UInt spaceDim>
482  ExpressionVectorFromNonConstantMatrix<Expression, FESpaceDim, FEFieldDim>
483  , testDim
484  , solutionDim
485  , spaceDim >
486 {
487 public:
488  typedef EvaluationVectorFromNonConstantMatrix<
489  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type,
490  FESpaceDim,
491  FEFieldDim
492  > evaluation_Type;
493 private:
494  ExpressionToEvaluation();
495  ~ExpressionToEvaluation();
496 };
497 
498 // Specialized for scalar
499 template<UInt testDim, UInt solutionDim, UInt spaceDim>
500 class ExpressionToEvaluation<ExpressionScalar, testDim, solutionDim, spaceDim>
501 {
502 public:
503  typedef EvaluationScalar evaluation_Type;
504 private:
505  ExpressionToEvaluation();
506  ~ExpressionToEvaluation();
507 };
508 
509 // Specialized for scalar given by a functor
510 template<typename VectorType, UInt testDim, UInt solutionDim, UInt spaceDim>
511 class ExpressionToEvaluation<ExpressionExtractScalar<VectorType>, testDim, solutionDim, spaceDim>
512 {
513 public:
514  typedef EvaluationExtractScalar<VectorType> evaluation_Type;
515 private:
516  ExpressionToEvaluation();
517  ~ExpressionToEvaluation();
518 };
519 
520 
521 // Specialized for vector
522 template<UInt testDim, UInt solutionDim, UInt spaceDim, UInt VectorDim>
523 class ExpressionToEvaluation<ExpressionVector<VectorDim>, testDim, solutionDim, spaceDim>
524 {
525 public:
526  typedef EvaluationVector<VectorDim> evaluation_Type;
527 private:
528  ExpressionToEvaluation();
529  ~ExpressionToEvaluation();
530 };
531 
532 // Specialized for matrix
533 template<UInt testDim, UInt solutionDim, UInt spaceDim, UInt MatrixDim1, UInt MatrixDim2>
534 class ExpressionToEvaluation<ExpressionMatrix<MatrixDim1, MatrixDim2>, testDim, solutionDim, spaceDim>
535 {
536 public:
537  typedef EvaluationMatrix<MatrixDim1, MatrixDim2> evaluation_Type;
538 private:
539  ExpressionToEvaluation();
540  ~ExpressionToEvaluation();
541 };
542 
543 // Specialized for an interpolated value
544 template<typename MeshType, typename MapType, UInt FESpaceDim, UInt FEFieldDim, UInt testDim, UInt solutionDim, UInt spaceDim>
546  ExpressionInterpolateValue<MeshType, MapType, FESpaceDim, FEFieldDim>, testDim, solutionDim, spaceDim >
547 {
548 public:
549  typedef EvaluationInterpolateValue<MeshType, MapType, FESpaceDim, FEFieldDim> evaluation_Type;
550 private:
551  ExpressionToEvaluation();
552  ~ExpressionToEvaluation();
553 };
554 
555 // Specialized for a returned value
556 template<typename MeshType, typename MapType, UInt FESpaceDim, UInt FEFieldDim, UInt testDim, UInt solutionDim, UInt spaceDim>
558 ExpressionReturnAtQuadraturePoints<MeshType, MapType, FESpaceDim, FEFieldDim>, testDim, solutionDim, spaceDim >
559 {
560 public:
561  typedef EvaluationReturnAtQuadraturePoints<MeshType, MapType, FESpaceDim, FEFieldDim> evaluation_Type;
562 private:
563  ExpressionToEvaluation();
564  ~ExpressionToEvaluation();
565 };
566 
567 
568 // Specialized for a patch area expression
569 template<typename MeshType, typename MapType, UInt FESpaceDim, UInt FEFieldDim, UInt testDim, UInt solutionDim, UInt spaceDim>
571  ExpressionPatchArea<MeshType, MapType, FESpaceDim, FEFieldDim>, testDim, solutionDim, spaceDim >
572 {
573 public:
574  typedef EvaluationPatchArea<MeshType, MapType, FESpaceDim, FEFieldDim> evaluation_Type;
575 private:
576  ExpressionToEvaluation();
577  ~ExpressionToEvaluation();
578 };
579 
580 // Specialized for an interpolated gradient
581 template<typename MeshType, typename MapType, UInt FESpaceDim, UInt FEFieldDim, UInt testDim, UInt solutionDim, UInt spaceDim>
583  ExpressionInterpolateGradient<MeshType, MapType, FESpaceDim, FEFieldDim>, testDim, solutionDim, spaceDim >
584 {
585 public:
586  typedef EvaluationInterpolateGradient<MeshType, MapType, FESpaceDim, FEFieldDim> evaluation_Type;
587 private:
588  ExpressionToEvaluation();
589  ~ExpressionToEvaluation();
590 };
591 
592 // Specialized for an interpolated laplacian
593 template<typename MeshType, typename MapType, UInt FESpaceDim, UInt FEFieldDim, UInt testDim, UInt solutionDim, UInt spaceDim>
595  ExpressionInterpolateLaplacian<MeshType, MapType, FESpaceDim, FEFieldDim>, testDim, solutionDim, spaceDim >
596 {
597 public:
598  typedef EvaluationInterpolateLaplacian<MeshType, MapType, FESpaceDim, FEFieldDim> evaluation_Type;
599 private:
600  ExpressionToEvaluation();
601  ~ExpressionToEvaluation();
602 };
603 
604 // Specialized for a functor
605 template<typename Functor, typename Expression, UInt testDim, UInt solutionDim, UInt spaceDim>
607  ExpressionFunctor1<Functor, Expression>
608  , testDim
609  , solutionDim
610  , spaceDim >
611 {
612 public:
613  typedef EvaluationFunctor1 <
614  Functor,
615  typename ExpressionToEvaluation<Expression, testDim, solutionDim, spaceDim>::evaluation_Type
616  > evaluation_Type;
617 private:
618  ExpressionToEvaluation();
619  ~ExpressionToEvaluation();
620 };
621 
622 // Specialized for a functor 2 arguments
623 template<typename Functor, typename Expression1, typename Expression2, UInt testDim, UInt solutionDim, UInt spaceDim>
625  ExpressionFunctor2<Functor, Expression1, Expression2>
626  , testDim
627  , solutionDim
628  , spaceDim >
629 {
630 public:
631  typedef EvaluationFunctor2 <
632  Functor,
633  typename ExpressionToEvaluation<Expression1, testDim, solutionDim, spaceDim>::evaluation_Type,
634  typename ExpressionToEvaluation<Expression2, testDim, solutionDim, spaceDim>::evaluation_Type
635  > evaluation_Type;
636 private:
637  ExpressionToEvaluation();
638  ~ExpressionToEvaluation();
639 };
640 
641 
642 // Specialized for a sum
643 template<typename ExpressionL, typename ExpressionR, UInt testDim, UInt solutionDim, UInt spaceDim>
644 class ExpressionToEvaluation<ExpressionAddition<ExpressionL, ExpressionR>, testDim, solutionDim, spaceDim>
645 {
646 public:
647  typedef EvaluationAddition <
648  typename ExpressionToEvaluation<ExpressionL, testDim, solutionDim, spaceDim>::evaluation_Type
649  , typename ExpressionToEvaluation<ExpressionR, testDim, solutionDim, spaceDim>::evaluation_Type
650  > evaluation_Type;
651 private:
652  ExpressionToEvaluation();
653  ~ExpressionToEvaluation();
654 };
655 
656 // Specialized for a substraction
657 template<typename ExpressionL, typename ExpressionR, UInt testDim, UInt solutionDim, UInt spaceDim>
658 class ExpressionToEvaluation<ExpressionSubstraction<ExpressionL, ExpressionR>, testDim, solutionDim, spaceDim>
659 {
660 public:
661  typedef EvaluationSubstraction <
662  typename ExpressionToEvaluation<ExpressionL, testDim, solutionDim, spaceDim>::evaluation_Type
663  , typename ExpressionToEvaluation<ExpressionR, testDim, solutionDim, spaceDim>::evaluation_Type
664  > evaluation_Type;
665 private:
666  ExpressionToEvaluation();
667  ~ExpressionToEvaluation();
668 };
669 
670 // Specialized for a product
671 template<typename ExpressionL, typename ExpressionR, UInt testDim, UInt solutionDim, UInt spaceDim>
672 class ExpressionToEvaluation<ExpressionProduct<ExpressionL, ExpressionR>, testDim, solutionDim, spaceDim>
673 {
674 public:
675  typedef EvaluationProduct <
676  typename ExpressionToEvaluation<ExpressionL, testDim, solutionDim, spaceDim>::evaluation_Type
677  , typename ExpressionToEvaluation<ExpressionR, testDim, solutionDim, spaceDim>::evaluation_Type
678  > evaluation_Type;
679 private:
680  ExpressionToEvaluation();
681  ~ExpressionToEvaluation();
682 };
683 
684 
685 // Specialized for a power
686 template<typename ExpressionBase, UInt testDim, UInt solutionDim, UInt spaceDim>
687 class ExpressionToEvaluation<ExpressionPower<ExpressionBase>, testDim, solutionDim, spaceDim>
688 {
689 public:
690  typedef EvaluationPower <
691  typename ExpressionToEvaluation<ExpressionBase, testDim, solutionDim, spaceDim>::evaluation_Type
692  > evaluation_Type;
693 private:
694  ExpressionToEvaluation();
695  ~ExpressionToEvaluation();
696 };
697 
698 // Specialized for the square root
699 template<typename ExpressionBase, UInt testDim, UInt solutionDim, UInt spaceDim>
700 class ExpressionToEvaluation<ExpressionSquareRoot<ExpressionBase>, testDim, solutionDim, spaceDim>
701 {
702 public:
703  typedef EvaluationSquareRoot <
704  typename ExpressionToEvaluation<ExpressionBase, testDim, solutionDim, spaceDim>::evaluation_Type
705  > evaluation_Type;
706 private:
707  ExpressionToEvaluation();
708  ~ExpressionToEvaluation();
709 };
710 
711 // Specialized for the cubic root
712 template<typename ExpressionBase, UInt testDim, UInt solutionDim, UInt spaceDim>
713 class ExpressionToEvaluation<ExpressionCubicRoot<ExpressionBase>, testDim, solutionDim, spaceDim>
714 {
715 public:
716  typedef EvaluationCubicRoot <
717  typename ExpressionToEvaluation<ExpressionBase, testDim, solutionDim, spaceDim>::evaluation_Type
718  > evaluation_Type;
719 private:
720  ExpressionToEvaluation();
721  ~ExpressionToEvaluation();
722 };
723 
724 
725 // Specialized for the isochoric change of variable in the structure module
726 template<typename ExpressionBase, UInt testDim, UInt solutionDim, UInt spaceDim>
727 class ExpressionToEvaluation<ExpressionIsochoricChangeOfVariable<ExpressionBase>, testDim, solutionDim, spaceDim>
728 {
729 public:
730  typedef EvaluationIsochoricChangeOfVariable <
731  typename ExpressionToEvaluation<ExpressionBase, testDim, solutionDim, spaceDim>::evaluation_Type
732  > evaluation_Type;
733 private:
734  ExpressionToEvaluation();
735  ~ExpressionToEvaluation();
736 };
737 
738 
739 // Specialized for the atan
740 template<typename ExpressionBase, UInt testDim, UInt solutionDim, UInt spaceDim>
741 class ExpressionToEvaluation<ExpressionArcTan<ExpressionBase>, testDim, solutionDim, spaceDim>
742 {
743 public:
744  typedef EvaluationArcTan <
745  typename ExpressionToEvaluation<ExpressionBase, testDim, solutionDim, spaceDim>::evaluation_Type
746  > evaluation_Type;
747 private:
748  ExpressionToEvaluation();
749  ~ExpressionToEvaluation();
750 };
751 
752 
753 // Specialized for the atan
754 template<typename ExpressionBase, UInt testDim, UInt solutionDim, UInt spaceDim>
755 class ExpressionToEvaluation<ExpressionDerivativeArcTan<ExpressionBase>, testDim, solutionDim, spaceDim>
756 {
757 public:
758  typedef EvaluationDerivativeArcTan <
759  typename ExpressionToEvaluation<ExpressionBase, testDim, solutionDim, spaceDim>::evaluation_Type
760  > evaluation_Type;
761 private:
762  ExpressionToEvaluation();
763  ~ExpressionToEvaluation();
764 };
765 
766 
767 // Specialized for a logarithm
768 template<typename ExpressionBase, UInt testDim, UInt solutionDim, UInt spaceDim>
769 class ExpressionToEvaluation<ExpressionLogarithm<ExpressionBase>, testDim, solutionDim, spaceDim>
770 {
771 public:
772  typedef EvaluationLogarithm <
773  typename ExpressionToEvaluation<ExpressionBase, testDim, solutionDim, spaceDim>::evaluation_Type
774  > evaluation_Type;
775 private:
776  ExpressionToEvaluation();
777  ~ExpressionToEvaluation();
778 };
779 
780 // Specialized for a exponential
781 template<typename ExpressionBase, UInt testDim, UInt solutionDim, UInt spaceDim>
782 class ExpressionToEvaluation<ExpressionExponential<ExpressionBase>, testDim, solutionDim, spaceDim>
783 {
784 public:
785  typedef EvaluationExponential <
786  typename ExpressionToEvaluation<ExpressionBase, testDim, solutionDim, spaceDim>::evaluation_Type
787  > evaluation_Type;
788 private:
789  ExpressionToEvaluation();
790  ~ExpressionToEvaluation();
791 };
792 
793 // Specialized for a dot product
794 template<typename ExpressionL, typename ExpressionR, UInt testDim, UInt solutionDim, UInt spaceDim>
795 class ExpressionToEvaluation<ExpressionDot<ExpressionL, ExpressionR>, testDim, solutionDim, spaceDim>
796 {
797 public:
798  typedef EvaluationDot <
799  typename ExpressionToEvaluation<ExpressionL, testDim, solutionDim, spaceDim>::evaluation_Type
800  , typename ExpressionToEvaluation<ExpressionR, testDim, solutionDim, spaceDim>::evaluation_Type
801  > evaluation_Type;
802 private:
803  ExpressionToEvaluation();
804  ~ExpressionToEvaluation();
805 };
806 
807 // Specialized for a vector product multiplication
808 template<typename ExpressionL, typename ExpressionR, UInt testDim, UInt solutionDim, UInt spaceDim>
809 class ExpressionToEvaluation<ExpressionOuterProduct<ExpressionL, ExpressionR>, testDim, solutionDim, spaceDim>
810 {
811 public:
812  typedef EvaluationOuterProduct <
813  typename ExpressionToEvaluation<ExpressionL, testDim, solutionDim, spaceDim>::evaluation_Type
814  , typename ExpressionToEvaluation<ExpressionR, testDim, solutionDim, spaceDim>::evaluation_Type
815  > evaluation_Type;
816 private:
817  ExpressionToEvaluation();
818  ~ExpressionToEvaluation();
819 };
820 
821 // Specialized for a element-wise multiplication
822 template<typename ExpressionL, typename ExpressionR, UInt testDim, UInt solutionDim, UInt spaceDim>
823 class ExpressionToEvaluation<ExpressionEmult<ExpressionL, ExpressionR>, testDim, solutionDim, spaceDim>
824 {
825 public:
826  typedef EvaluationEmult <
827  typename ExpressionToEvaluation<ExpressionL, testDim, solutionDim, spaceDim>::evaluation_Type
828  , typename ExpressionToEvaluation<ExpressionR, testDim, solutionDim, spaceDim>::evaluation_Type
829  > evaluation_Type;
830 private:
831  ExpressionToEvaluation();
832  ~ExpressionToEvaluation();
833 };
834 
835 // Specialized for a division
836 template<typename ExpressionL, typename ExpressionR, UInt testDim, UInt solutionDim, UInt spaceDim>
837 class ExpressionToEvaluation<ExpressionDivision<ExpressionL, ExpressionR>, testDim, solutionDim, spaceDim>
838 {
839 public:
840  typedef EvaluationDivision <
841  typename ExpressionToEvaluation<ExpressionL, testDim, solutionDim, spaceDim>::evaluation_Type
842  , typename ExpressionToEvaluation<ExpressionR, testDim, solutionDim, spaceDim>::evaluation_Type
843  > evaluation_Type;
844 private:
845  ExpressionToEvaluation();
846  ~ExpressionToEvaluation();
847 };
848 
849 // Specialized for h_K
850 template<UInt testDim, UInt solutionDim, UInt spaceDim>
851 class ExpressionToEvaluation<ExpressionHK, testDim, solutionDim, spaceDim>
852 {
853 public:
854  typedef EvaluationHK<spaceDim> evaluation_Type;
855 private:
856  ExpressionToEvaluation();
857  ~ExpressionToEvaluation();
858 };
859 
860 // Specialized for detJ
861 template<UInt testDim, UInt solutionDim, UInt spaceDim>
862 class ExpressionToEvaluation<ExpressionDetJacobian, testDim, solutionDim, spaceDim>
863 {
864 public:
865  typedef EvaluationDetJacobian<spaceDim> evaluation_Type;
866 private:
867  ExpressionToEvaluation();
868  ~ExpressionToEvaluation();
869 };
870 
871 // Specialized for G
872 template<UInt testDim, UInt solutionDim, UInt spaceDim>
873 class ExpressionToEvaluation<ExpressionMetricTensor, testDim, solutionDim, spaceDim>
874 {
875 public:
876  typedef EvaluationMetricTensor<spaceDim> evaluation_Type;
877 private:
878  ExpressionToEvaluation();
879  ~ExpressionToEvaluation();
880 };
881 
882 // Specialized for g
883 template<UInt testDim, UInt solutionDim, UInt spaceDim>
884 class ExpressionToEvaluation<ExpressionMetricVector, testDim, solutionDim, spaceDim>
885 {
886 public:
887  typedef EvaluationMetricVector<spaceDim> evaluation_Type;
888 private:
889  ExpressionToEvaluation();
890  ~ExpressionToEvaluation();
891 };
892 
893 // Specialized for meas_K
894 template<UInt testDim, UInt solutionDim, UInt spaceDim>
895 class ExpressionToEvaluation<ExpressionMeas, testDim, solutionDim, spaceDim>
896 {
897 public:
898  typedef EvaluationMeas<spaceDim> evaluation_Type;
899 private:
900  ExpressionToEvaluation();
901  ~ExpressionToEvaluation();
902 };
903 
904 template<UInt testDim, UInt solutionDim, UInt spaceDim>
905 class ExpressionToEvaluation<ExpressionMeasBDCurrentFE, testDim, solutionDim, spaceDim>
906 {
907 public:
908  typedef EvaluationMeasBDCurrentFE<spaceDim> evaluation_Type;
909 private:
910  ExpressionToEvaluation();
911  ~ExpressionToEvaluation();
912 };
913 
914 // Specialized for the position
915 template<UInt testDim, UInt solutionDim, UInt spaceDim>
916 class ExpressionToEvaluation<ExpressionPosition, testDim, solutionDim, spaceDim>
917 {
918 public:
919  typedef EvaluationPosition<spaceDim> evaluation_Type;
920 private:
921  ExpressionToEvaluation();
922  ~ExpressionToEvaluation();
923 };
924 
925 // Specialized for the normal
926 template<UInt testDim, UInt solutionDim, UInt spaceDim>
927 class ExpressionToEvaluation<ExpressionNormal, testDim, solutionDim, spaceDim>
928 {
929 public:
930  typedef EvaluationNormal<spaceDim> evaluation_Type;
931 private:
932  ExpressionToEvaluation();
933  ~ExpressionToEvaluation();
934 };
935 
936 template<typename MeshType, typename MapType, UInt FESpaceDim, UInt testDim, UInt solutionDim, UInt spaceDim>
938  ExpressionIfCrossed<MeshType, MapType, FESpaceDim>, testDim, solutionDim, spaceDim >
939 {
940 public:
941  typedef EvaluationIfCrossed<MeshType, MapType, FESpaceDim> evaluation_Type;
942 private:
943  ExpressionToEvaluation();
944  ~ExpressionToEvaluation();
945 };
946 
947 // \endcond
948 
949 } // Namespace ExpressionAssembly
950 
951 } // Namespace LifeV
952 
953 #endif
friend class ExpressionAssembly::EvaluationHK
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationDetJacobian
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationLaplacianJ
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationPhiI
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationPosition
Friend to allow direct access to the raw data.
void updateInverseJacobian(const UInt &iQuadPt)
friend class ExpressionAssembly::EvaluationDphiI
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationMeas
Friend to allow direct access to the raw data.
class ExpressionToEvaluation A class to pass from an Expression (Tree) to the corresponding Evaluatio...
friend class ExpressionAssembly::EvaluationLaplacianI
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationDphiJ
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationMetricVector
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationPhiJ
Friend to allow direct access to the raw data.
friend class ExpressionAssembly::EvaluationMetricTensor
Friend to allow direct access to the raw data.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191