DUNE-ACFEM (unstable)

unaryexpression.hh
1#ifndef __DUNE_ACFEM_MODELS_UNARYEXPRESSION_HH__
2#define __DUNE_ACFEM_MODELS_UNARYEXPRESSION_HH__
3
4#include "../expressions/operationtraits.hh"
5#include "../expressions/storage.hh"
6#include "../expressions/interface.hh"
7#include "../expressions/signutil.hh"
8#include "../common/literals.hh"
9#include "../tensors/tensor.hh"
10
11#include "modeltraits.hh"
12#include "expressionoperations.hh"
13
14namespace Dune
15{
16
17 namespace ACFem
18 {
19
32 namespace PDEModel {
33
34 using namespace Literals;
35
37 using namespace ModelIntrospection;
38
40 template<class Model, class Quadrature = PointWrapperQuadrature<typename Model::DomainType> >
41 using AllArgs = typename Traits<Model>::template AllArguments<Quadrature>;
42
79 template<class Model, class ReturnValueFunctor, std::size_t tag,
80 class LinArgSeq, class OuterArgSeq, class InnerArgSeq,
81 class Enable = void>
83
85 template<class Model,
86 std::size_t tag,
88 class F = OperationTraits<IdentityOperation> >
90 Model, F, tag,
94 >;
95
129 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
130 class ModelMethod<Model, F, flux,
132 IndexSequence<pointIndex, OuterArgsIdx...>,
133 IndexSequence<InnerArgsIdx...>,
134 std::enable_if_t<Traits<Model>::template HasMethod<flux>::value> >
135 {
136 public:
137 static constexpr MethodTag tag = ModelIntrospection::flux;
138
139 ModelMethod(const Model& model, const F& f = F())
140 : model_(model), f_(f)
141 {}
142
144 template<class Quadrature>
145 auto flux(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
146 {
147 return f_(model_.flux(std::get<InnerArgsIdx>(std::forward_as_tuple(x, args...))...));
148 }
149
151 template<class Quadrature>
152 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
153 {
154 return flux(x, args...);
155 }
156
157 private:
158 const Model& model_;
159 const F& f_;
160 };
161
163 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
164 class ModelMethod<Model, F, flux,
166 IndexSequence<OuterArgsIdx...>,
167 IndexSequence<InnerArgsIdx...>,
168 std::enable_if_t<Traits<Model>::template HasMethod<flux>::value> >
169 {
170 public:
171 static constexpr MethodTag tag = ModelIntrospection::flux;
172
173 ModelMethod(const Model& model, const F& f = F())
174 : model_(model), f_(f)
175 {}
176
178 auto flux(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
179 {
180 return f_(model_.flux(std::get<InnerArgsIdx>(std::forward_as_tuple(args...))...));
181 }
182
184 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
185 {
186 return flux(args...);
187 }
188
189 private:
190 const Model& model_;
191 const F& f_;
192 };
193
195 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
196 class ModelMethod<Model, F, flux,
198 IndexSequence<pointIndex, OuterArgsIdx...>,
199 IndexSequence<InnerArgsIdx...>,
200 std::enable_if_t<!Traits<Model>::template HasMethod<flux>::value> >
201 {
202 public:
203 static constexpr MethodTag tag = ModelIntrospection::flux;
204
205 ModelMethod(const Model& model, const F& f = F())
206 : l_(model, f)
207 {}
208
210 template<class Quadrature>
211 auto flux(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
212 {
213 return l_(x, args...);
214 }
215
217 template<class Quadrature>
218 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
219 {
220 return l_(x, args...);
221 }
222
223 private:
224 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<pointIndex, OuterArgsIdx...>::value, F> l_;
225 };
226
228 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
229 class ModelMethod<Model, F, flux,
231 IndexSequence<OuterArgsIdx...>,
232 IndexSequence<InnerArgsIdx...>,
233 std::enable_if_t<!Traits<Model>::template HasMethod<flux>::value> >
234 {
235 public:
236 static constexpr MethodTag tag = ModelIntrospection::flux;
237
238 ModelMethod(const Model& model, const F& f = F())
239 : l_(model, f)
240 {}
241
243 auto flux(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
244 {
245 return l_(args...);
246 }
247
249 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
250 {
251 return l_(args...);
252 }
253
254 private:
255 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<OuterArgsIdx...>::value, F> l_;
256 };
257
268 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
269 class ModelMethod<Model, F, linearizedFlux,
270 IndexSequence<LinArgsIdx...>,
271 IndexSequence<pointIndex, OuterArgsIdx...>,
272 IndexSequence<InnerArgsIdx...>,
273 std::enable_if_t<Traits<Model>::template HasMethod<linearizedFlux>::value> >
274 {
275 public:
276 static constexpr MethodTag tag = ModelIntrospection::linearizedFlux;
277
278 ModelMethod(const Model& model, const F& f = F())
279 : model_(model), f_(f)
280 {}
281
283 template<class Quadrature>
284 auto linearizedFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
286 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
287 {
288 return f_(model_.linearizedFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., x, args...))...));
289 }
290
292 template<class Quadrature>
293 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
295 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
296 {
297 return linearizedFlux(linArgs..., x, args...);
298 }
299
300 private:
301 const Model& model_;
302 const F& f_;
303 };
304
306 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
307 class ModelMethod<Model, F, linearizedFlux,
308 IndexSequence<LinArgsIdx...>,
309 IndexSequence<OuterArgsIdx...>,
310 IndexSequence<InnerArgsIdx...>,
311 std::enable_if_t<Traits<Model>::template HasMethod<linearizedFlux>::value> >
312 {
313 public:
314 static constexpr MethodTag tag = ModelIntrospection::linearizedFlux;
315
316 ModelMethod(const Model& model, const F& f = F())
317 : model_(model), f_(f)
318 {}
319
321 auto linearizedFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
322 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
323 {
324 return f_(model_.linearizedFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., args...))...));
325 }
326
328 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
329 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
330 {
331 return linearizedFlux(linArgs..., args...);
332 }
333
334 private:
335 const Model& model_;
336 const F& f_;
337 };
338
340 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
341 class ModelMethod<Model, F, linearizedFlux,
342 IndexSequence<LinArgsIdx...>,
343 IndexSequence<pointIndex, OuterArgsIdx...>,
344 IndexSequence<InnerArgsIdx...>,
345 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedFlux>::value> >
346 {
347 public:
348 static constexpr MethodTag tag = ModelIntrospection::linearizedFlux;
349
350 ModelMethod(const Model& model, const F& f = F())
351 {}
352
354 template<class Quadrature>
355 auto linearizedFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
357 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
358 {
359 return typename Traits<Model>::template ReturnType<tag>(0);
360 }
361
363 template<class Quadrature>
364 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
366 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
367 {
368 return typename Traits<Model>::template ReturnType<tag>(0);
369 }
370 };
371
373 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
374 class ModelMethod<Model, F, linearizedFlux,
375 IndexSequence<LinArgsIdx...>,
376 IndexSequence<OuterArgsIdx...>,
377 IndexSequence<InnerArgsIdx...>,
378 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedFlux>::value> >
379 {
380 public:
381 static constexpr MethodTag tag = ModelIntrospection::linearizedFlux;
382
383 ModelMethod(const Model& model, const F& f = F())
384 {}
385
387 auto linearizedFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
388 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
389 {
390 return typename Traits<Model>::template ReturnType<tag>(0);
391 }
392
394 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
395 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
396 {
397 return typename Traits<Model>::template ReturnType<tag>(0);
398 }
399 };
400
411 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
412 class ModelMethod<Model, F, source,
414 IndexSequence<pointIndex, OuterArgsIdx...>,
415 IndexSequence<InnerArgsIdx...>,
416 std::enable_if_t<Traits<Model>::template HasMethod<source>::value> >
417 {
418 public:
419 static constexpr MethodTag tag = ModelIntrospection::source;
420
421 ModelMethod(const Model& model, const F& f = F())
422 : model_(model), f_(f)
423 {}
424
426 template<class Quadrature>
427 auto source(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
428 {
429 return f_(model_.source(std::get<InnerArgsIdx>(std::forward_as_tuple(x, args...))...));
430 }
431
433 template<class Quadrature>
434 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
435 {
436 return source(x, args...);
437 }
438
439 private:
440 const Model& model_;
441 const F& f_;
442 };
443
445 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
446 class ModelMethod<Model, F, source,
448 IndexSequence<OuterArgsIdx...>,
449 IndexSequence<InnerArgsIdx...>,
450 std::enable_if_t<Traits<Model>::template HasMethod<source>::value> >
451 {
452 public:
453 static constexpr MethodTag tag = ModelIntrospection::source;
454
455 ModelMethod(const Model& model, const F& f = F())
456 : model_(model), f_(f)
457 {}
458
460 auto source(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
461 {
462 return f_(model_.source(std::get<InnerArgsIdx>(std::forward_as_tuple(args...))...));
463 }
464
466 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
467 {
468 return source(args...);
469 }
470
471 private:
472 const Model& model_;
473 const F& f_;
474 };
475
477 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
478 class ModelMethod<Model, F, source,
480 IndexSequence<pointIndex, OuterArgsIdx...>,
481 IndexSequence<InnerArgsIdx...>,
482 std::enable_if_t<!Traits<Model>::template HasMethod<source>::value> >
483 {
484 public:
485 static constexpr MethodTag tag = ModelIntrospection::source;
486
487 ModelMethod(const Model& model, const F& f = F())
488 : l_(model, f)
489 {}
490
492 template<class Quadrature>
493 auto source(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
494 {
495 return l_(x, args...);
496 }
497
499 template<class Quadrature>
500 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
501 {
502 return l_(x, args...);
503 }
504
505 private:
506 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<pointIndex, OuterArgsIdx...>::value, F> l_;
507 };
508
510 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
511 class ModelMethod<Model, F, source,
513 IndexSequence<OuterArgsIdx...>,
514 IndexSequence<InnerArgsIdx...>,
515 std::enable_if_t<!Traits<Model>::template HasMethod<source>::value> >
516 {
517 public:
518 static constexpr MethodTag tag = ModelIntrospection::source;
519
520 ModelMethod(const Model& model, const F& f = F())
521 : l_(model, f)
522 {}
523
525 auto source(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
526 {
527 return l_(args...);
528 }
529
531 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
532 {
533 return l_(args...);
534 }
535
536 private:
537 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<OuterArgsIdx...>::value, F> l_;
538 };
539
550 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
551 class ModelMethod<Model, F, linearizedSource,
552 IndexSequence<LinArgsIdx...>,
553 IndexSequence<pointIndex, OuterArgsIdx...>,
554 IndexSequence<InnerArgsIdx...>,
555 std::enable_if_t<Traits<Model>::template HasMethod<linearizedSource>::value> >
556 {
557 public:
558 static constexpr MethodTag tag = ModelIntrospection::linearizedSource;
559
560 ModelMethod(const Model& model, const F& f = F())
561 : model_(model), f_(f)
562 {}
563
565 template<class Quadrature>
566 auto linearizedSource(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
568 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
569 {
570 return f_(model_.linearizedSource(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., x, args...))...));
571 }
572
574 template<class Quadrature>
575 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
577 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
578 {
579 return linearizedSource(linArgs..., x, args...);
580 }
581
582 private:
583 const Model& model_;
584 const F& f_;
585 };
586
588 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
589 class ModelMethod<Model, F, linearizedSource,
590 IndexSequence<LinArgsIdx...>,
591 IndexSequence<OuterArgsIdx...>,
592 IndexSequence<InnerArgsIdx...>,
593 std::enable_if_t<Traits<Model>::template HasMethod<linearizedSource>::value> >
594 {
595 public:
596 static constexpr MethodTag tag = ModelIntrospection::linearizedSource;
597
598 ModelMethod(const Model& model, const F& f = F())
599 : model_(model), f_(f)
600 {}
601
603 auto linearizedSource(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
604 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
605 {
606 return f_(model_.linearizedSource(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., args...))...));
607 }
608
610 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
611 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
612 {
613 return linearizedSource(linArgs..., args...);
614 }
615
616 private:
617 const Model& model_;
618 const F& f_;
619 };
620
622 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
623 class ModelMethod<Model, F, linearizedSource,
624 IndexSequence<LinArgsIdx...>,
625 IndexSequence<pointIndex, OuterArgsIdx...>,
626 IndexSequence<InnerArgsIdx...>,
627 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedSource>::value> >
628 {
629 public:
630 static constexpr MethodTag tag = ModelIntrospection::linearizedSource;
631
632 ModelMethod(const Model& model, const F& f = F())
633 {}
634
636 template<class Quadrature>
637 auto linearizedSource(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
639 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
640 {
641 return typename Traits<Model>::template ReturnType<tag>(0);
642 }
643
645 template<class Quadrature>
646 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
648 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
649 {
650 return typename Traits<Model>::template ReturnType<tag>(0);
651 }
652 };
653
655 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
656 class ModelMethod<Model, F, linearizedSource,
657 IndexSequence<LinArgsIdx...>,
658 IndexSequence<OuterArgsIdx...>,
659 IndexSequence<InnerArgsIdx...>,
660 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedSource>::value> >
661 {
662 public:
663 static constexpr MethodTag tag = ModelIntrospection::linearizedSource;
664
665 ModelMethod(const Model& model, const F& f = F())
666 {}
667
669 auto linearizedSource(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
670 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
671 {
672 return typename Traits<Model>::template ReturnType<tag>(0);
673 }
674
676 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
677 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
678 {
679 return typename Traits<Model>::template ReturnType<tag>(0);
680 }
681 };
682
693 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
694 class ModelMethod<Model, F, robinFlux,
696 IndexSequence<pointIndex, OuterArgsIdx...>,
697 IndexSequence<InnerArgsIdx...>,
698 std::enable_if_t<Traits<Model>::template HasMethod<robinFlux>::value> >
699 {
700 public:
701 static constexpr MethodTag tag = ModelIntrospection::robinFlux;
702
703 ModelMethod(const Model& model, const F& f = F())
704 : model_(model), f_(f)
705 {}
706
708 template<class Quadrature>
709 auto robinFlux(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
710 {
711 return f_(model_.robinFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(x, args...))...));
712 }
713
715 template<class Quadrature>
716 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
717 {
718 return robinFlux(x, args...);
719 }
720
721 private:
722 const Model& model_;
723 const F& f_;
724 };
725
727 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
728 class ModelMethod<Model, F, robinFlux,
730 IndexSequence<OuterArgsIdx...>,
731 IndexSequence<InnerArgsIdx...>,
732 std::enable_if_t<Traits<Model>::template HasMethod<robinFlux>::value> >
733 {
734 public:
735 static constexpr MethodTag tag = ModelIntrospection::robinFlux;
736
737 ModelMethod(const Model& model, const F& f = F())
738 : model_(model), f_(f)
739 {}
740
742 auto robinFlux(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
743 {
744 return f_(model_.robinFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(args...))...));
745 }
746
748 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
749 {
750 return robinFlux(args...);
751 }
752
753 private:
754 const Model& model_;
755 const F& f_;
756 };
757
759 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
760 class ModelMethod<Model, F, robinFlux,
762 IndexSequence<pointIndex, OuterArgsIdx...>,
763 IndexSequence<InnerArgsIdx...>,
764 std::enable_if_t<!Traits<Model>::template HasMethod<robinFlux>::value> >
765 {
766 public:
767 static constexpr MethodTag tag = ModelIntrospection::robinFlux;
768
769 ModelMethod(const Model& model, const F& f = F())
770 : l_(model, f)
771 {}
772
774 template<class Quadrature>
775 auto robinFlux(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
776 {
777 return l_(x, args...);
778 }
779
781 template<class Quadrature>
782 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
783 {
784 return l_(x, args...);
785 }
786
787 private:
788 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<pointIndex, OuterArgsIdx...>::value, F> l_;
789 };
790
792 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
793 class ModelMethod<Model, F, robinFlux,
795 IndexSequence<OuterArgsIdx...>,
796 IndexSequence<InnerArgsIdx...>,
797 std::enable_if_t<!Traits<Model>::template HasMethod<robinFlux>::value> >
798 {
799 public:
800 static constexpr MethodTag tag = ModelIntrospection::robinFlux;
801
802 ModelMethod(const Model& model, const F& f = F())
803 : l_(model, f)
804 {}
805
807 auto robinFlux(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
808 {
809 return l_(args...);
810 }
811
813 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
814 {
815 return l_(args...);
816 }
817
818 private:
819 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<OuterArgsIdx...>::value, F> l_;
820 };
821
832 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
833 class ModelMethod<Model, F, linearizedRobinFlux,
834 IndexSequence<LinArgsIdx...>,
835 IndexSequence<pointIndex, OuterArgsIdx...>,
836 IndexSequence<InnerArgsIdx...>,
837 std::enable_if_t<Traits<Model>::template HasMethod<linearizedRobinFlux>::value> >
838 {
839 public:
840 static constexpr MethodTag tag = ModelIntrospection::linearizedRobinFlux;
841
842 ModelMethod(const Model& model, const F& f = F())
843 : model_(model), f_(f)
844 {}
845
847 template<class Quadrature>
848 auto linearizedRobinFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
850 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
851 {
852 return f_(model_.linearizedRobinFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., x, args...))...));
853 }
854
856 template<class Quadrature>
857 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
859 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
860 {
861 return linearizedRobinFlux(linArgs..., x, args...);
862 }
863
864 private:
865 const Model& model_;
866 const F& f_;
867 };
868
870 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
871 class ModelMethod<Model, F, linearizedRobinFlux,
872 IndexSequence<LinArgsIdx...>,
873 IndexSequence<OuterArgsIdx...>,
874 IndexSequence<InnerArgsIdx...>,
875 std::enable_if_t<Traits<Model>::template HasMethod<linearizedRobinFlux>::value> >
876 {
877 public:
878 static constexpr MethodTag tag = ModelIntrospection::linearizedRobinFlux;
879
880 ModelMethod(const Model& model, const F& f = F())
881 : model_(model), f_(f)
882 {}
883
885 auto linearizedRobinFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
886 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
887 {
888 return f_(model_.linearizedRobinFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., args...))...));
889 }
890
892 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
893 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
894 {
895 return linearizedRobinFlux(linArgs..., args...);
896 }
897
898 private:
899 const Model& model_;
900 const F& f_;
901 };
902
904 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
905 class ModelMethod<Model, F, linearizedRobinFlux,
906 IndexSequence<LinArgsIdx...>,
907 IndexSequence<pointIndex, OuterArgsIdx...>,
908 IndexSequence<InnerArgsIdx...>,
909 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedRobinFlux>::value> >
910 {
911 public:
912 static constexpr MethodTag tag = ModelIntrospection::linearizedRobinFlux;
913
914 ModelMethod(const Model& model, const F& f = F())
915 {}
916
918 template<class Quadrature>
919 auto linearizedRobinFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
921 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
922 {
923 return typename Traits<Model>::template ReturnType<tag>(0);
924 }
925
927 template<class Quadrature>
928 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
930 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
931 {
932 return typename Traits<Model>::template ReturnType<tag>(0);
933 }
934 };
935
937 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
938 class ModelMethod<Model, F, linearizedRobinFlux,
939 IndexSequence<LinArgsIdx...>,
940 IndexSequence<OuterArgsIdx...>,
941 IndexSequence<InnerArgsIdx...>,
942 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedRobinFlux>::value> >
943 {
944 public:
945 static constexpr MethodTag tag = ModelIntrospection::linearizedRobinFlux;
946
947 ModelMethod(const Model& model, const F& f = F())
948 {}
949
951 auto linearizedRobinFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
952 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
953 {
954 return typename Traits<Model>::template ReturnType<tag>(0);
955 }
956
958 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
959 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
960 {
961 return typename Traits<Model>::template ReturnType<tag>(0);
962 }
963 };
964
975 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
976 class ModelMethod<Model, F, singularFlux,
978 IndexSequence<pointIndex, OuterArgsIdx...>,
979 IndexSequence<InnerArgsIdx...>,
980 std::enable_if_t<Traits<Model>::template HasMethod<singularFlux>::value> >
981 {
982 public:
983 static constexpr MethodTag tag = ModelIntrospection::singularFlux;
984
985 ModelMethod(const Model& model, const F& f = F())
986 : model_(model), f_(f)
987 {}
988
990 template<class Quadrature>
991 auto singularFlux(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
992 {
993 return f_(model_.singularFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(x, args...))...));
994 }
995
997 template<class Quadrature>
998 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
999 {
1000 return singularFlux(x, args...);
1001 }
1002
1003 private:
1004 const Model& model_;
1005 const F& f_;
1006 };
1007
1009 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1010 class ModelMethod<Model, F, singularFlux,
1011 IndexSequence<>,
1012 IndexSequence<OuterArgsIdx...>,
1013 IndexSequence<InnerArgsIdx...>,
1014 std::enable_if_t<Traits<Model>::template HasMethod<singularFlux>::value> >
1015 {
1016 public:
1017 static constexpr MethodTag tag = ModelIntrospection::singularFlux;
1018
1019 ModelMethod(const Model& model, const F& f = F())
1020 : model_(model), f_(f)
1021 {}
1022
1024 auto singularFlux(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1025 {
1026 return f_(model_.singularFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(args...))...));
1027 }
1028
1030 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1031 {
1032 return singularFlux(args...);
1033 }
1034
1035 private:
1036 const Model& model_;
1037 const F& f_;
1038 };
1039
1041 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1042 class ModelMethod<Model, F, singularFlux,
1043 IndexSequence<>,
1044 IndexSequence<pointIndex, OuterArgsIdx...>,
1045 IndexSequence<InnerArgsIdx...>,
1046 std::enable_if_t<!Traits<Model>::template HasMethod<singularFlux>::value> >
1047 {
1048 public:
1049 static constexpr MethodTag tag = ModelIntrospection::singularFlux;
1050
1051 ModelMethod(const Model& model, const F& f = F())
1052 : l_(model, f)
1053 {}
1054
1056 template<class Quadrature>
1057 auto singularFlux(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1058 {
1059 return l_(x, args...);
1060 }
1061
1063 template<class Quadrature>
1064 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1065 {
1066 return l_(x, args...);
1067 }
1068
1069 private:
1070 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<pointIndex, OuterArgsIdx...>::value, F> l_;
1071 };
1072
1074 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1075 class ModelMethod<Model, F, singularFlux,
1076 IndexSequence<>,
1077 IndexSequence<OuterArgsIdx...>,
1078 IndexSequence<InnerArgsIdx...>,
1079 std::enable_if_t<!Traits<Model>::template HasMethod<singularFlux>::value> >
1080 {
1081 public:
1082 static constexpr MethodTag tag = ModelIntrospection::singularFlux;
1083
1084 ModelMethod(const Model& model, const F& f = F())
1085 : l_(model, f)
1086 {}
1087
1089 auto singularFlux(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1090 {
1091 return l_(args...);
1092 }
1093
1095 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1096 {
1097 return l_(args...);
1098 }
1099
1100 private:
1101 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<OuterArgsIdx...>::value, F> l_;
1102 };
1103
1114 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1115 class ModelMethod<Model, F, linearizedSingularFlux,
1116 IndexSequence<LinArgsIdx...>,
1117 IndexSequence<pointIndex, OuterArgsIdx...>,
1118 IndexSequence<InnerArgsIdx...>,
1119 std::enable_if_t<Traits<Model>::template HasMethod<linearizedSingularFlux>::value> >
1120 {
1121 public:
1122 static constexpr MethodTag tag = ModelIntrospection::linearizedSingularFlux;
1123
1124 ModelMethod(const Model& model, const F& f = F())
1125 : model_(model), f_(f)
1126 {}
1127
1129 template<class Quadrature>
1130 auto linearizedSingularFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1132 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1133 {
1134 return f_(model_.linearizedSingularFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., x, args...))...));
1135 }
1136
1138 template<class Quadrature>
1139 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1141 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1142 {
1143 return linearizedSingularFlux(linArgs..., x, args...);
1144 }
1145
1146 private:
1147 const Model& model_;
1148 const F& f_;
1149 };
1150
1152 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1153 class ModelMethod<Model, F, linearizedSingularFlux,
1154 IndexSequence<LinArgsIdx...>,
1155 IndexSequence<OuterArgsIdx...>,
1156 IndexSequence<InnerArgsIdx...>,
1157 std::enable_if_t<Traits<Model>::template HasMethod<linearizedSingularFlux>::value> >
1158 {
1159 public:
1160 static constexpr MethodTag tag = ModelIntrospection::linearizedSingularFlux;
1161
1162 ModelMethod(const Model& model, const F& f = F())
1163 : model_(model), f_(f)
1164 {}
1165
1167 auto linearizedSingularFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1168 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1169 {
1170 return f_(model_.linearizedSingularFlux(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., args...))...));
1171 }
1172
1174 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1175 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1176 {
1177 return linearizedSingularFlux(linArgs..., args...);
1178 }
1179
1180 private:
1181 const Model& model_;
1182 const F& f_;
1183 };
1184
1186 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1187 class ModelMethod<Model, F, linearizedSingularFlux,
1188 IndexSequence<LinArgsIdx...>,
1189 IndexSequence<pointIndex, OuterArgsIdx...>,
1190 IndexSequence<InnerArgsIdx...>,
1191 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedSingularFlux>::value> >
1192 {
1193 public:
1194 static constexpr MethodTag tag = ModelIntrospection::linearizedSingularFlux;
1195
1196 ModelMethod(const Model& model, const F& f = F())
1197 {}
1198
1200 template<class Quadrature>
1201 auto linearizedSingularFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1203 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1204 {
1205 return typename Traits<Model>::template ReturnType<tag>(0);
1206 }
1207
1209 template<class Quadrature>
1210 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1212 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1213 {
1214 return typename Traits<Model>::template ReturnType<tag>(0);
1215 }
1216 };
1217
1219 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1220 class ModelMethod<Model, F, linearizedSingularFlux,
1221 IndexSequence<LinArgsIdx...>,
1222 IndexSequence<OuterArgsIdx...>,
1223 IndexSequence<InnerArgsIdx...>,
1224 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedSingularFlux>::value> >
1225 {
1226 public:
1227 static constexpr MethodTag tag = ModelIntrospection::linearizedSingularFlux;
1228
1229 ModelMethod(const Model& model, const F& f = F())
1230 {}
1231
1233 auto linearizedSingularFlux(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1234 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1235 {
1236 return typename Traits<Model>::template ReturnType<tag>(0);
1237 }
1238
1240 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1241 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1242 {
1243 return typename Traits<Model>::template ReturnType<tag>(0);
1244 }
1245 };
1246
1257 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1258 class ModelMethod<Model, F, ModelIntrospection::dirichlet,
1259 IndexSequence<>,
1260 IndexSequence<pointIndex, OuterArgsIdx...>,
1261 IndexSequence<InnerArgsIdx...>,
1262 std::enable_if_t<Traits<Model>::template HasMethod<ModelIntrospection::dirichlet>::value> >
1263 {
1264 public:
1265 static constexpr MethodTag tag = ModelIntrospection::dirichlet;
1266
1267 ModelMethod(const Model& model, const F& f = F())
1268 : model_(model), f_(f)
1269 {}
1270
1272 template<class Quadrature>
1273 auto dirichlet(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1274 {
1275 return f_(model_.dirichlet(std::get<InnerArgsIdx>(std::forward_as_tuple(x, args...))...));
1276 }
1277
1279 template<class Quadrature>
1280 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1281 {
1282 return dirichlet(x, args...);
1283 }
1284
1285 private:
1286 const Model& model_;
1287 const F& f_;
1288 };
1289
1291 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1292 class ModelMethod<Model, F, ModelIntrospection::dirichlet,
1293 IndexSequence<>,
1294 IndexSequence<OuterArgsIdx...>,
1295 IndexSequence<InnerArgsIdx...>,
1296 std::enable_if_t<Traits<Model>::template HasMethod<ModelIntrospection::dirichlet>::value> >
1297 {
1298 public:
1299 static constexpr MethodTag tag = ModelIntrospection::dirichlet;
1300
1301 ModelMethod(const Model& model, const F& f = F())
1302 : model_(model), f_(f)
1303 {}
1304
1306 auto dirichlet(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1307 {
1308 return f_(model_.dirichlet(std::get<InnerArgsIdx>(std::forward_as_tuple(args...))...));
1309 }
1310
1312 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1313 {
1314 return dirichlet(args...);
1315 }
1316
1317 private:
1318 const Model& model_;
1319 const F& f_;
1320 };
1321
1323 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1324 class ModelMethod<Model, F, ModelIntrospection::dirichlet,
1325 IndexSequence<>,
1326 IndexSequence<pointIndex, OuterArgsIdx...>,
1327 IndexSequence<InnerArgsIdx...>,
1328 std::enable_if_t<!Traits<Model>::template HasMethod<ModelIntrospection::dirichlet>::value> >
1329 {
1330 public:
1331 static constexpr MethodTag tag = ModelIntrospection::dirichlet;
1332
1333 ModelMethod(const Model& model, const F& f = F())
1334 : l_(model, f)
1335 {}
1336
1338 template<class Quadrature>
1339 auto dirichlet(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1340 {
1341 return l_(x, args...);
1342 }
1343
1345 template<class Quadrature>
1346 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1347 {
1348 return l_(x, args...);
1349 }
1350
1351 private:
1352 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<pointIndex, OuterArgsIdx...>::value, F> l_;
1353 };
1354
1356 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1357 class ModelMethod<Model, F, ModelIntrospection::dirichlet,
1358 IndexSequence<>,
1359 IndexSequence<OuterArgsIdx...>,
1360 IndexSequence<InnerArgsIdx...>,
1361 std::enable_if_t<!Traits<Model>::template HasMethod<ModelIntrospection::dirichlet>::value> >
1362 {
1363 public:
1364 static constexpr MethodTag tag = ModelIntrospection::dirichlet;
1365
1366 ModelMethod(const Model& model, const F& f = F())
1367 : l_(model, f)
1368 {}
1369
1371 auto dirichlet(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1372 {
1373 return l_(args...);
1374 }
1375
1377 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1378 {
1379 return l_(args...);
1380 }
1381
1382 private:
1383 const TaggedModelMethod<Model, LinearizedTag<tag>::value, SequenceMask<OuterArgsIdx...>::value, F> l_;
1384 };
1385
1396 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1397 class ModelMethod<Model, F, linearizedDirichlet,
1398 IndexSequence<LinArgsIdx...>,
1399 IndexSequence<pointIndex, OuterArgsIdx...>,
1400 IndexSequence<InnerArgsIdx...>,
1401 std::enable_if_t<Traits<Model>::template HasMethod<linearizedDirichlet>::value> >
1402 {
1403 public:
1404 static constexpr MethodTag tag = ModelIntrospection::linearizedDirichlet;
1405
1406 ModelMethod(const Model& model, const F& f = F())
1407 : model_(model), f_(f)
1408 {}
1409
1411 template<class Quadrature>
1412 auto linearizedDirichlet(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1414 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1415 {
1416 return f_(model_.linearizedDirichlet(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., x, args...))...));
1417 }
1418
1420 template<class Quadrature>
1421 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1423 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1424 {
1425 return linearizedDirichlet(linArgs..., x, args...);
1426 }
1427
1428 private:
1429 const Model& model_;
1430 const F& f_;
1431 };
1432
1434 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1435 class ModelMethod<Model, F, linearizedDirichlet,
1436 IndexSequence<LinArgsIdx...>,
1437 IndexSequence<OuterArgsIdx...>,
1438 IndexSequence<InnerArgsIdx...>,
1439 std::enable_if_t<Traits<Model>::template HasMethod<linearizedDirichlet>::value> >
1440 {
1441 public:
1442 static constexpr MethodTag tag = ModelIntrospection::linearizedDirichlet;
1443
1444 ModelMethod(const Model& model, const F& f = F())
1445 : model_(model), f_(f)
1446 {}
1447
1449 auto linearizedDirichlet(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1450 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1451 {
1452 return f_(model_.linearizedDirichlet(std::get<InnerArgsIdx>(std::forward_as_tuple(linArgs..., args...))...));
1453 }
1454
1456 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1457 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1458 {
1459 return linearizedDirichlet(linArgs..., args...);
1460 }
1461
1462 private:
1463 const Model& model_;
1464 const F& f_;
1465 };
1466
1468 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1469 class ModelMethod<Model, F, linearizedDirichlet,
1470 IndexSequence<LinArgsIdx...>,
1471 IndexSequence<pointIndex, OuterArgsIdx...>,
1472 IndexSequence<InnerArgsIdx...>,
1473 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedDirichlet>::value> >
1474 {
1475 public:
1476 static constexpr MethodTag tag = ModelIntrospection::linearizedDirichlet;
1477
1478 ModelMethod(const Model& model, const F& f = F())
1479 {}
1480
1482 template<class Quadrature>
1483 auto linearizedDirichlet(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1485 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1486 {
1487 return typename Traits<Model>::template ReturnType<tag>(0);
1488 }
1489
1491 template<class Quadrature>
1492 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1494 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1495 {
1496 return typename Traits<Model>::template ReturnType<tag>(0);
1497 }
1498 };
1499
1501 template<class Model, class F, std::size_t... LinArgsIdx, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1502 class ModelMethod<Model, F, linearizedDirichlet,
1503 IndexSequence<LinArgsIdx...>,
1504 IndexSequence<OuterArgsIdx...>,
1505 IndexSequence<InnerArgsIdx...>,
1506 std::enable_if_t<!Traits<Model>::template HasMethod<linearizedDirichlet>::value> >
1507 {
1508 public:
1509 static constexpr MethodTag tag = ModelIntrospection::linearizedDirichlet;
1510
1511 ModelMethod(const Model& model, const F& f = F())
1512 {}
1513
1515 auto linearizedDirichlet(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1516 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1517 {
1518 return typename Traits<Model>::template ReturnType<tag>(0);
1519 }
1520
1522 auto operator()(const TupleElement<LinArgsIdx, AllArgs<Model> >&... linArgs,
1523 const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1524 {
1525 return typename Traits<Model>::template ReturnType<tag>(0);
1526 }
1527 };
1528
1539 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1540 class ModelMethod<Model, F, fluxDivergence,
1541 IndexSequence<>,
1542 IndexSequence<pointIndex, OuterArgsIdx...>,
1543 IndexSequence<InnerArgsIdx...>,
1544 std::enable_if_t<Traits<Model>::template HasMethod<fluxDivergence>::value> >
1545 {
1546 public:
1547 static constexpr MethodTag tag = ModelIntrospection::fluxDivergence;
1548
1549 ModelMethod(const Model& model, const F& f = F())
1550 : model_(model), f_(f)
1551 {}
1552
1554 template<class Quadrature>
1555 auto fluxDivergence(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1556 {
1557 return f_(model_.fluxDivergence(std::get<InnerArgsIdx>(std::forward_as_tuple(x, args...))...));
1558 }
1559
1561 template<class Quadrature>
1562 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1563 {
1564 return fluxDivergence(x, args...);
1565 }
1566
1567 private:
1568 const Model& model_;
1569 const F& f_;
1570 };
1571
1573 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1574 class ModelMethod<Model, F, fluxDivergence,
1575 IndexSequence<>,
1576 IndexSequence<OuterArgsIdx...>,
1577 IndexSequence<InnerArgsIdx...>,
1578 std::enable_if_t<Traits<Model>::template HasMethod<fluxDivergence>::value> >
1579 {
1580 public:
1581 static constexpr MethodTag tag = ModelIntrospection::fluxDivergence;
1582
1583 ModelMethod(const Model& model, const F& f = F())
1584 : model_(model), f_(f)
1585 {}
1586
1588 auto fluxDivergence(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1589 {
1590 return f_(model_.fluxDivergence(std::get<InnerArgsIdx>(std::forward_as_tuple(args...))...));
1591 }
1592
1594 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1595 {
1596 return fluxDivergence(args...);
1597 }
1598
1599 private:
1600 const Model& model_;
1601 const F& f_;
1602 };
1603
1605 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1606 class ModelMethod<Model, F, fluxDivergence,
1607 IndexSequence<>,
1608 IndexSequence<pointIndex, OuterArgsIdx...>,
1609 IndexSequence<InnerArgsIdx...>,
1610 std::enable_if_t<!Traits<Model>::template HasMethod<fluxDivergence>::value> >
1611 {
1612 public:
1613 static constexpr MethodTag tag = ModelIntrospection::fluxDivergence;
1614
1615 ModelMethod(const Model& model, const F& f = F())
1616 {}
1617
1619 template<class Quadrature>
1620 auto fluxDivergence(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1621 {
1622 return typename Traits<Model>::template ReturnType<tag>(0);
1623 }
1624
1626 template<class Quadrature>
1627 auto operator()(const QuadraturePoint<Quadrature>& x, const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1628 {
1629 return typename Traits<Model>::template ReturnType<tag>(0);
1630 }
1631 };
1632
1634 template<class Model, class F, std::size_t... OuterArgsIdx, std::size_t... InnerArgsIdx>
1635 class ModelMethod<Model, F, fluxDivergence,
1636 IndexSequence<>,
1637 IndexSequence<OuterArgsIdx...>,
1638 IndexSequence<InnerArgsIdx...>,
1639 std::enable_if_t<!Traits<Model>::template HasMethod<fluxDivergence>::value> >
1640 {
1641 public:
1642 static constexpr MethodTag tag = ModelIntrospection::fluxDivergence;
1643
1644 ModelMethod(const Model& model, const F& f = F())
1645 {}
1646
1648 auto fluxDivergence(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1649 {
1650 return typename Traits<Model>::template ReturnType<tag>(0);
1651 }
1652
1654 auto operator()(const TupleElement<OuterArgsIdx, AllArgs<Model> >&... args) const
1655 {
1656 return typename Traits<Model>::template ReturnType<tag>(0);
1657 }
1658 };
1659
1681 template<class ReturnValueFunctor,
1682 class Model,
1683 class Methods = typename ModelTraits<Model>::Methods,
1684 class Signatures = typename ModelTraits<Model>::MethodCallSignatures>
1686
1688 template<class F, class Model, std::size_t... tag, class Signatures>
1689 class UnaryModelExpression<F, Model, IndexSequence<tag...>, Signatures>
1690 : public ModelBase<typename std::decay_t<Model>::DomainFunctionSpaceType,
1691 typename std::decay_t<Model>::RangeFunctionSpaceType>
1692 , public Expressions::Storage<F, Model>
1693 // Expressions model rvalues. We are constant if the
1694 // underlying expression claims to be so or if we store a copy
1695 // and the underlying expression is "independent"
1696 // (i.e. determined at runtime only by the contained data), or
1697 // if the value of the expression is just a compile-time
1698 // constant.
1699 , public MPL::UniqueTags<
1700 typename AssumeTraits<F>::Properties,
1701 ConditionalType<(IsConstantExprArg<Model>::value
1702 && !FunctorHas<IsIndeterminateOperation, F>::value
1703 && !FunctorHas<IsPlaceholderOperation, F>::value
1704 ), ConstantExpression, void>,
1705 ConditionalType<(IsTypedValue<Model>::value
1706 && !FunctorHas<IsDynamicOperation, F>::value
1707 && !FunctorHas<IsIndeterminateOperation, F>::value
1708 && !FunctorHas<IsPlaceholderOperation, F>::value
1709 ), TypedValueExpression, void> >
1710 // end of tag promotion
1711 , public TaggedModelMethod<std::decay_t<Model>, tag, Get<tag, Signatures>::value, F>...
1712 {
1713 using StorageType = Expressions::Storage<F, Model>;
1714 protected:
1715 using StorageType::t0_;
1716 public:
1717 using StorageType::operand;
1718 using StorageType::operation;
1719 using typename StorageType::OperationType;
1720 using typename StorageType::FunctorType;
1721 using TraitsType = ModelTraits<Model>;
1722 using UnaryOperationType = typename F::OperationType;
1723 using ModelType = Model;
1724 using ModelDecay = std::decay_t<Model>;
1725
1726 /* Models need to be captured by value as the entire
1727 * expression must be copyable in a way that bind(otherEntity)
1728 * does not affect the original copy.
1729 */
1730 static_assert(std::is_same<ModelType, ModelDecay>::value,
1731 "Models need to be captured by value.");
1732
1744 template<class ModelArg, class FArg, std::enable_if_t<std::is_constructible<StorageType, FArg, ModelArg>::value, int> = 0>
1745 UnaryModelExpression(ModelArg&& model, FArg&& f)
1746 : StorageType(std::forward<FArg>(f), std::forward<ModelArg>(model))
1747 , TaggedModelMethod<ModelDecay, tag, Get<tag, Signatures>::value, F>(this->model(), operation())...
1748 {}
1749
1750 template<class ModelArg, std::enable_if_t<std::is_constructible<StorageType, F, ModelArg>::value, int> = 0>
1751 UnaryModelExpression(ModelArg&& model)
1752 : UnaryModelExpression(std::forward<ModelArg>(model), F{})
1753 {}
1754
1759 : StorageType(other)
1760 , TaggedModelMethod<ModelDecay, tag, Get<tag, Signatures>::value, F>(model(), operation())...
1761 {}
1762
1767 : StorageType(std::move(other))
1768 , TaggedModelMethod<ModelDecay, tag, Get<tag, Signatures>::value, F>(model(), operation())...
1769 {}
1770
1771 UnaryModelExpression& operator=(const UnaryModelExpression& other)
1772 {
1773 static_cast<StorageType>(*this) = other;
1774 return *this;
1775 }
1776
1777 UnaryModelExpression& operator=(UnaryModelExpression&& other)
1778 {
1779 static_cast<StorageType>(*this) = std::move(other);
1780 return *this;
1781 }
1782
1784 template<class T,
1785 std::enable_if_t<(Expressions::EmitByValueV<T>
1786 && std::is_same<T, ModelDecay>::value
1787 && (IsIdentityOperation<OperationType>::value
1788 ||
1789 IsClosureOperation<OperationType>::value)
1790 ), int> = 0>
1791 operator T () const { return operand(0_c); }
1792
1794 template<class T,
1795 std::enable_if_t<(!Expressions::EmitByValueV<T>
1796 && std::is_same<T, ModelDecay>::value
1797 && (IsIdentityOperation<OperationType>::value
1798 ||
1799 IsClosureOperation<OperationType>::value)
1800 ), int> = 0>
1801 operator T () && { return operand(0_c); }
1802
1804 template<class T,
1805 std::enable_if_t<(!Expressions::EmitByValueV<T>
1806 && std::is_same<T, ModelDecay>::value
1807 && (IsIdentityOperation<OperationType>::value
1808 ||
1809 IsClosureOperation<OperationType>::value)
1810 ), int> = 0>
1811 operator T& () & { return operand(0_c); }
1812
1814 template<class T,
1815 std::enable_if_t<(!Expressions::EmitByValueV<T>
1816 && std::is_same<T, ModelDecay>::value
1817 && (IsIdentityOperation<OperationType>::value
1818 ||
1819 IsClosureOperation<OperationType>::value)
1820 ), int> = 0>
1821 operator const T& () const& { return operand(0_c); }
1822
1823 template<class Entity>
1824 void bind(const Entity& entity)
1825 {
1826 model().bind(entity);
1827 }
1828
1829 void unbind()
1830 {
1831 model().unbind();
1832 }
1833
1834 template<class Intersection>
1835 auto classifyBoundary(const Intersection& intersection)
1836 {
1837 return model().classifyBoundary(intersection);
1838 }
1839
1840 std::string name() const
1841 {
1842 return operationName(operation(), model().name());
1843 }
1844
1845 protected:
1846 constexpr auto&& model() && { return t0_; }
1847 constexpr auto& model() & { return t0_; }
1848 constexpr const auto& model() const& { return t0_; }
1849 };
1850
1857 template<class F, class T, std::enable_if_t<IsPDEModel<T>::value, int> = 0>
1858 constexpr auto operate(Expressions::DontOptimize, F, const T& t)
1859 {
1860 DUNE_ACFEM_RECORD_OPTIMIZATION;
1861
1862 return UnaryModelExpression<F, T>(t, F{});
1863 }
1864
1865 } // PDEModel
1866
1868 template<class Model,
1869 std::size_t tag,
1870 std::size_t signature = Get<tag, typename ModelTraits<Model>::MethodCallSignatures>::value>
1872
1874 template<class Model, std::size_t tag>
1877
1879 template<class F, class Model>
1881
1883
1885
1886 } // namespace ACFem
1887
1888} // namespace Dune
1889
1890
1891#endif // __DUNE_ACFEM_MODELES_UNARYEXPRESSION_HH__
auto dirichlet(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1339
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1346
auto dirichlet(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1273
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1280
auto fluxDivergence(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1588
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1594
auto fluxDivergence(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1620
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1627
auto fluxDivergence(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1648
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1654
auto fluxDivergence(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1555
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1562
auto flux(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:178
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:184
auto flux(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:243
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:249
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:152
auto flux(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:145
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:218
auto flux(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:211
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1456
auto linearizedDirichlet(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1449
auto linearizedDirichlet(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1515
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1522
auto linearizedDirichlet(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1412
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1421
auto linearizedDirichlet(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1483
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1492
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:394
auto linearizedFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:387
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:293
auto linearizedFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:284
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:328
auto linearizedFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:321
auto linearizedFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:355
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:364
auto linearizedRobinFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:848
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:857
auto linearizedRobinFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:885
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:892
auto linearizedRobinFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:919
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:928
auto linearizedRobinFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:951
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:958
auto linearizedSingularFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1167
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1174
auto linearizedSingularFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1201
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1210
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1139
auto linearizedSingularFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1130
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1240
auto linearizedSingularFlux(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1233
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:610
auto linearizedSource(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:603
auto linearizedSource(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:566
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:575
auto linearizedSource(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:637
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:646
auto linearizedSource(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:669
auto operator()(const TupleElement< LinArgsIdx, AllArgs< Model > > &... linArgs, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:676
auto robinFlux(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:807
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:813
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:716
auto robinFlux(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:709
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:782
auto robinFlux(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:775
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:748
auto robinFlux(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:742
auto singularFlux(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1057
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1064
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1095
auto singularFlux(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1089
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:1030
auto singularFlux(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:1024
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:998
auto singularFlux(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:991
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:434
auto source(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:427
auto source(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:493
auto operator()(const QuadraturePoint< Quadrature > &x, const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:500
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:466
auto source(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:460
auto source(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
The proper method inherited by the derived model.
Definition: unaryexpression.hh:525
auto operator()(const TupleElement< OuterArgsIdx, AllArgs< Model > > &... args) const
Helper in order to use parametrized expression templates.
Definition: unaryexpression.hh:531
Implement the method specified by tag with the signature defined by OuterArgSeq.
Definition: unaryexpression.hh:82
UnaryModelExpression(UnaryModelExpression &&other)
Move constructor.
Definition: unaryexpression.hh:1766
UnaryModelExpression(ModelArg &&model, FArg &&f)
Constructor from given model and operation.
Definition: unaryexpression.hh:1745
UnaryModelExpression(const UnaryModelExpression &other)
Copy constructor.
Definition: unaryexpression.hh:1758
General unary model expression template.
Definition: unaryexpression.hh:1685
OptimizeTag< 0 > DontOptimize
Bottom level is overloaded to do nothing.
Definition: optimizationbase.hh:74
std::string operationName(F &&f, const std::string &arg)
Verbose print of an operation, helper function to produce noise.
Definition: operationtraits.hh:601
PDEModel::UnaryModelExpression< F, Model > UnaryModelExpression
Exports from namespace.
Definition: unaryexpression.hh:1880
PDEModel::TaggedModelMethod< Model, tag, signature > ModelMethod
Exports from namespace.
Definition: unaryexpression.hh:1871
std::tuple_element_t< N, std::decay_t< TupleLike > > TupleElement
Forward to std::tuple_element<N, std::decay_t<T> >
Definition: access.hh:125
typename MaskSequenceHelper< mask, 0 >::type MaskSequence
Generate the index-sequence type of set bits from a bit-mask.
Definition: mask.hh:74
IndexConstant< SequenceMaskHelper< I... >::value > SequenceMask
Generate a bit-mask from the given index-sequence.
Definition: mask.hh:78
constexpr auto operate(Expressions::DontOptimize, F &&f, T &&t)
Generate a unary tensor expression.
Definition: unaryexpression.hh:185
Sequence< std::size_t, V... > IndexSequence
Sequence of std::size_t values.
Definition: types.hh:64
MethodTag
An enum in order to parametrize the call-signature introspection.
Definition: modeltraits.hh:23
TraitsHelper::MethodSignatureClosure< CheckMethodTag< tag >::value > MethodSignatureClosure
Type alias extracting the "closure" of all supported call-signatures.
Definition: modeltraits.hh:631
Fem::QuadraturePointWrapper< Quadrature > QuadraturePoint
Shortcut.
Definition: quadraturepoint.hh:23
ModelIntrospection::Traits< Model > ModelTraits
Traits class for models.
Definition: modeltraits.hh:898
STL namespace.
Gets the type of the n-th element of a tuple-like or the std::integral_constant corresponding to the ...
Definition: access.hh:42
A structure defining some basic default types and methods.
Definition: modelbase.hh:41
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 27, 23:30, 2024)