39 #include <lifev/core/LifeV.hpp> 41 #include <lifev/core/util/OpenMPParameters.hpp> 43 #include <lifev/eta/expression/RequestLoopElement.hpp> 44 #include <lifev/eta/expression/RequestLoopVolumeID.hpp> 45 #include <lifev/eta/expression/RequestLoopFaceID.hpp> 47 #include <lifev/core/fem/QuadratureRule.hpp> 48 #include <lifev/eta/fem/QRAdapterBase.hpp> 49 #include <lifev/eta/fem/QRAdapterNeverAdapt.hpp> 51 #include <lifev/eta/expression/IntegrateMatrixElement.hpp> 52 #include <lifev/eta/expression/IntegrateVectorElement.hpp> 53 #include <lifev/eta/expression/IntegrateValueElement.hpp> 54 #include <lifev/eta/expression/EvaluateAtQuadraturePoint.hpp> 55 #include <lifev/eta/expression/ComputeFineScaleVelocity.hpp> 56 #include <lifev/eta/expression/ComputeFineScalePressure.hpp> 59 #include <lifev/eta/expression/IntegrateMatrixVolumeID.hpp> 60 #include <lifev/eta/expression/IntegrateVectorVolumeID.hpp> 61 #include <lifev/eta/expression/IntegrateVectorFaceID.hpp> 62 #include <lifev/eta/expression/IntegrateMatrixFaceID.hpp> 64 #include <lifev/eta/expression/IntegrateValueElementLSAdapted.hpp> 65 #include <lifev/eta/expression/IntegrateVectorElementLSAdapted.hpp> 66 #include <lifev/eta/expression/IntegrateMatrixElementLSAdapted.hpp> 68 #include <lifev/eta/expression/IntegrateMatrixFaceIDLSAdapted.hpp> 69 #include <lifev/eta/expression/IntegrateVectorFaceIDLSAdapted.hpp> 80 namespace ExpressionAssembly
96 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType,
typename QRAdapterType>
97 IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterType>
98 integrate (
const RequestLoopElement<MeshType>& request,
99 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
100 const std::shared_ptr<TestSpaceType>& testSpace,
101 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
102 const ExpressionType& expression,
103 const UInt offsetUp = 0,
104 const UInt offsetLeft = 0);
105 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType,
typename QRAdapterType>
106 IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterType>
107 integrate (
const RequestLoopElement<MeshType>& request,
108 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
109 const std::shared_ptr<TestSpaceType>& testSpace,
110 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
111 const ExpressionType& expression,
113 const UInt offsetLeft)
115 return IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterType>
116 ( request.mesh(), qrAdapterBase.implementation(), testSpace,
117 solutionSpace, expression, offsetUp, offsetLeft,
118 request.numVolumes(), request.regionFlag(), request.getElementsRegionFlag(),
119 request.getIfSubDomain() );
122 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType>
123 IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
124 integrate (
const RequestLoopElement<MeshType>& request,
125 const QuadratureRule& quadrature,
126 const std::shared_ptr<TestSpaceType>& testSpace,
127 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
128 const ExpressionType& expression,
129 const UInt offsetUp = 0,
130 const UInt offsetLeft = 0);
131 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType>
132 IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
133 integrate (
const RequestLoopElement<MeshType>& request,
134 const QuadratureRule& quadrature,
135 const std::shared_ptr<TestSpaceType>& testSpace,
136 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
137 const ExpressionType& expression,
139 const UInt offsetLeft)
141 return IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
142 ( request.mesh(), QRAdapterNeverAdapt (quadrature),
143 testSpace, solutionSpace, expression, offsetUp, offsetLeft, request.regionFlag(),
144 request.numVolumes(), request.getElementsRegionFlag(), request.getIfSubDomain() );
163 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType,
typename QRAdapterType>
164 IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterType>
165 integrate (
const RequestLoopElement<MeshType>& request,
166 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
167 const std::shared_ptr<TestSpaceType>& testSpace,
168 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
169 const ExpressionType& expression,
170 const OpenMPParameters& ompParams,
171 const UInt offsetUp = 0,
172 const UInt offsetLeft = 0);
173 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType,
typename QRAdapterType>
174 IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterType>
175 integrate (
const RequestLoopElement<MeshType>& request,
176 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
177 const std::shared_ptr<TestSpaceType>& testSpace,
178 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
179 const ExpressionType& expression,
180 const OpenMPParameters& ompParams,
182 const UInt offsetLeft)
184 return IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
185 (request.mesh(), qrAdapterBase.implementation(), testSpace, solutionSpace, expression,
186 ompParams, offsetUp, offsetLeft, request.regionFlag(), request.numVolumes(), request.getElementsRegionFlag(),
187 request.getIfSubDomain() );
189 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType>
190 IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
191 integrate (
const RequestLoopElement<MeshType>& request,
192 const QuadratureRule& quadrature,
193 const std::shared_ptr<TestSpaceType>& testSpace,
194 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
195 const ExpressionType& expression,
196 const OpenMPParameters& ompParams,
197 const UInt offsetUp = 0,
198 const UInt offsetLeft = 0);
199 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType>
200 IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
201 integrate (
const RequestLoopElement<MeshType>& request,
202 const QuadratureRule& quadrature,
203 const std::shared_ptr<TestSpaceType>& testSpace,
204 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
205 const ExpressionType& expression,
206 const OpenMPParameters& ompParams,
208 const UInt offsetLeft)
210 return IntegrateMatrixElement<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
211 (request.mesh(), QRAdapterNeverAdapt (quadrature), testSpace, solutionSpace, expression,
212 ompParams, offsetUp, offsetLeft, request.regionFlag(), request.numVolumes(), request.getElementsRegionFlag(),
213 request.getIfSubDomain() );
231 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
232 IntegrateVectorElement<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
233 integrate (
const RequestLoopElement<MeshType>& request,
234 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
235 const std::shared_ptr<TestSpaceType>& testSpace,
236 const ExpressionType& expression,
237 const UInt offset = 0);
238 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
239 IntegrateVectorElement<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
240 integrate (
const RequestLoopElement<MeshType>& request,
241 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
242 const std::shared_ptr<TestSpaceType>& testSpace,
243 const ExpressionType& expression,
246 return IntegrateVectorElement<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
247 (request.mesh(), qrAdapterBase.implementation(), testSpace, expression, offset);
250 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
251 IntegrateVectorElement<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
252 integrate (
const RequestLoopElement<MeshType>& request,
253 const QuadratureRule& quadrature,
254 const std::shared_ptr<TestSpaceType>& testSpace,
255 const ExpressionType& expression,
256 const UInt offset = 0);
257 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
258 IntegrateVectorElement<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
259 integrate (
const RequestLoopElement<MeshType>& request,
260 const QuadratureRule& quadrature,
261 const std::shared_ptr<TestSpaceType>& testSpace,
262 const ExpressionType& expression,
265 return IntegrateVectorElement<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
266 (request.mesh(), QRAdapterNeverAdapt (quadrature), testSpace, expression, offset);
282 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
283 ComputeFineScaleVelocity<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
284 ComputeFineScaleVel (
const RequestLoopElement<MeshType>& request,
285 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
286 const std::shared_ptr<TestSpaceType>& testSpace,
287 const ExpressionType& expression,
288 const UInt offset = 0);
289 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
290 ComputeFineScaleVelocity<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
291 ComputeFineScaleVel (
const RequestLoopElement<MeshType>& request,
292 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
293 const std::shared_ptr<TestSpaceType>& testSpace,
294 const ExpressionType& expression,
297 return ComputeFineScaleVelocity<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
298 (request.mesh(), qrAdapterBase.implementation(), testSpace, expression, offset );
301 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
302 ComputeFineScaleVelocity<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
303 ComputeFineScaleVel (
const RequestLoopElement<MeshType>& request,
304 const QuadratureRule& quadrature,
305 const std::shared_ptr<TestSpaceType>& testSpace,
306 const ExpressionType& expression,
307 const UInt offset = 0);
308 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
309 ComputeFineScaleVelocity<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
310 ComputeFineScaleVel (
const RequestLoopElement<MeshType>& request,
311 const QuadratureRule& quadrature,
312 const std::shared_ptr<TestSpaceType>& testSpace,
313 const ExpressionType& expression,
316 return ComputeFineScaleVelocity<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
317 (request.mesh(), QRAdapterNeverAdapt (quadrature), testSpace, expression, offset );
333 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
334 ComputeFineScalePressure<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
335 ComputeFineScalePres (
const RequestLoopElement<MeshType>& request,
336 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
337 const std::shared_ptr<TestSpaceType>& testSpace,
338 const ExpressionType& expression,
339 const UInt offset = 0);
340 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
341 ComputeFineScalePressure<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
342 ComputeFineScalePres (
const RequestLoopElement<MeshType>& request,
343 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
344 const std::shared_ptr<TestSpaceType>& testSpace,
345 const ExpressionType& expression,
348 return ComputeFineScalePressure<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
349 (request.mesh(), qrAdapterBase.implementation(), testSpace, expression, offset );
352 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
353 ComputeFineScalePressure<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
354 ComputeFineScalePres (
const RequestLoopElement<MeshType>& request,
355 const QuadratureRule& quadrature,
356 const std::shared_ptr<TestSpaceType>& testSpace,
357 const ExpressionType& expression,
358 const UInt offset = 0);
359 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
360 ComputeFineScalePressure<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
361 ComputeFineScalePres (
const RequestLoopElement<MeshType>& request,
362 const QuadratureRule& quadrature,
363 const std::shared_ptr<TestSpaceType>& testSpace,
364 const ExpressionType& expression,
367 return ComputeFineScalePressure<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
368 (request.mesh(), QRAdapterNeverAdapt (quadrature), testSpace, expression, offset );
384 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
385 EvaluateAtQuadraturePoint<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
386 EvaluateAtQuadrature (
const RequestLoopElement<MeshType>& request,
387 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
388 const std::shared_ptr<TestSpaceType>& testSpace,
389 const ExpressionType& expression,
390 const UInt offset = 0);
391 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
392 EvaluateAtQuadraturePoint<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
393 EvaluateAtQuadrature (
const RequestLoopElement<MeshType>& request,
394 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
395 const std::shared_ptr<TestSpaceType>& testSpace,
396 const ExpressionType& expression,
399 return EvaluateAtQuadraturePoint<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
400 (request.mesh(), qrAdapterBase.implementation(), testSpace, expression, offset);
403 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
404 EvaluateAtQuadraturePoint<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
405 EvaluateAtQuadrature (
const RequestLoopElement<MeshType>& request,
406 const QuadratureRule& quadrature,
407 const std::shared_ptr<TestSpaceType>& testSpace,
408 const ExpressionType& expression,
409 const UInt offset = 0);
410 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
411 EvaluateAtQuadraturePoint<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
412 EvaluateAtQuadrature (
const RequestLoopElement<MeshType>& request,
413 const QuadratureRule& quadrature,
414 const std::shared_ptr<TestSpaceType>& testSpace,
415 const ExpressionType& expression,
418 return EvaluateAtQuadraturePoint<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
419 (request.mesh(), QRAdapterNeverAdapt (quadrature), testSpace, expression, offset);
434 template <
typename MeshType,
typename ExpressionType,
typename QRAdapterType>
435 IntegrateValueElement<MeshType, ExpressionType, QRAdapterType>
436 integrate (
const RequestLoopElement<MeshType>& request,
437 const QRAdapterBase<QRAdapterType>& qrAdapterBase,
438 const ExpressionType& expression)
440 return IntegrateValueElement<MeshType, ExpressionType, QRAdapterType>
441 (request.mesh(), qrAdapterBase.implementation(), expression);
444 template <
typename MeshType,
typename ExpressionType>
445 IntegrateValueElement<MeshType, ExpressionType, QRAdapterNeverAdapt>
446 integrate (
const RequestLoopElement<MeshType>& request,
447 const QuadratureRule& quadrature,
448 const ExpressionType& expression)
450 return IntegrateValueElement<MeshType, ExpressionType, QRAdapterNeverAdapt>
451 (request.mesh(), QRAdapterNeverAdapt (quadrature), expression);
457 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType>
458 IntegrateMatrixVolumeID<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
459 integrate (
const RequestLoopVolumeID<MeshType>& request,
460 const QuadratureRule& quadrature,
461 const std::shared_ptr<TestSpaceType>& testSpace,
462 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
463 const ExpressionType& expression)
465 return IntegrateMatrixVolumeID<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterNeverAdapt>
466 (request.volumeList(), request.indexList(), QRAdapterNeverAdapt (quadrature), testSpace, solutionSpace, expression);
469 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType,
typename QRAdapterType>
470 IntegrateMatrixVolumeID<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterType>
471 integrate (
const RequestLoopVolumeID<MeshType>& request,
472 const QRAdapterBase<QRAdapterType>& qrAdapter,
473 const std::shared_ptr<TestSpaceType>& testSpace,
474 const std::shared_ptr<SolutionSpaceType>& solutionSpace,
475 const ExpressionType& expression)
477 return IntegrateMatrixVolumeID<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, QRAdapterType>
478 (request.volumeList(), request.indexList(), qrAdapter.implementation(), testSpace, solutionSpace, expression);
481 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
482 IntegrateVectorVolumeID<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt>
483 integrate (
const RequestLoopVolumeID<MeshType>& request,
484 const QuadratureRule& quadrature,
485 const std::shared_ptr<TestSpaceType>& testSpace,
486 const ExpressionType& expression)
488 return IntegrateVectorVolumeID<MeshType, TestSpaceType, ExpressionType, QRAdapterNeverAdapt> (request.volumeList(), request.indexList(), QRAdapterNeverAdapt (quadrature), testSpace, expression);
491 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType,
typename QRAdapterType>
492 IntegrateVectorVolumeID<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
493 integrate (
const RequestLoopVolumeID<MeshType>& request,
494 const QRAdapterBase<QRAdapterType>& qrAdapter,
495 const std::shared_ptr<TestSpaceType>& testSpace,
496 const ExpressionType& expression)
498 return IntegrateVectorVolumeID<MeshType, TestSpaceType, ExpressionType, QRAdapterType>
499 (request.volumeList(), request.indexList(), qrAdapter.implementation(), testSpace, expression);
505 template <
typename MeshType,
typename TestSpaceType,
typename ExpressionType>
506 IntegrateVectorFaceID<MeshType, TestSpaceType, ExpressionType>
507 integrate (
const RequestLoopFaceID<MeshType>& request,
508 const QuadratureBoundary& quadratureBoundary,
509 const std::shared_ptr<TestSpaceType>& testSpace,
510 const ExpressionType& expression)
512 return IntegrateVectorFaceID<MeshType, TestSpaceType, ExpressionType>
513 (request.mesh(), request.id(), quadratureBoundary, testSpace, expression);
517 template <
typename MeshType,
typename TestSpaceType,
typename SolutionSpaceType,
typename ExpressionType>
518 IntegrateMatrixFaceID<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType>
519 integrate (
const RequestLoopFaceID<MeshType>& request,
520 const QuadratureBoundary& quadratureBoundary,
521 const std::shared_ptr<TestSpaceType> testSpace,
522 const std::shared_ptr<SolutionSpaceType> solutionSpace,
523 const ExpressionType& expression)
525 return IntegrateMatrixFaceID<MeshType, TestSpaceType, SolutionSpaceType, ExpressionType>
526 (request.mesh(), request.id(), quadratureBoundary, testSpace, solutionSpace, expression);
530 template <
typename MeshType,
531 typename TestSpaceType,
532 typename SolutionSpaceType,
533 typename ExpressionType,
534 typename LSFESpaceType,
535 typename LSVectorType >
536 IntegrateMatrixFaceIDLSAdapted < MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, LSFESpaceType, LSVectorType>
537 integrate (
const RequestLoopFaceID<MeshType>& request,
538 const LevelSetBDQRAdapter<LSFESpaceType, LSVectorType>& quadratureAdapter,
539 const std::shared_ptr<TestSpaceType> testSpace,
540 const std::shared_ptr<SolutionSpaceType> solutionSpace,
541 const ExpressionType& expression)
543 return IntegrateMatrixFaceIDLSAdapted < MeshType, TestSpaceType, SolutionSpaceType, ExpressionType, LSFESpaceType, LSVectorType> (request.mesh(), request.id(), quadratureAdapter, testSpace, solutionSpace, expression);
546 template <
typename MeshType,
547 typename TestSpaceType,
548 typename ExpressionType,
549 typename LSFESpaceType,
550 typename LSVectorType >
551 IntegrateVectorFaceIDLSAdapted < MeshType, TestSpaceType, ExpressionType, LSFESpaceType, LSVectorType>
552 integrate (
const RequestLoopFaceID<MeshType>& request,
553 const LevelSetBDQRAdapter<LSFESpaceType, LSVectorType>& quadratureAdapter,
554 const std::shared_ptr<TestSpaceType> testSpace,
555 const ExpressionType& expression)
557 return IntegrateVectorFaceIDLSAdapted < MeshType, TestSpaceType, ExpressionType, LSFESpaceType, LSVectorType> (request.mesh(), request.id(), quadratureAdapter, testSpace, expression);