DUNE-ACFEM (unstable)

expressionoperations.hh
1#ifndef __DUNE_ACFEM_MODELS_EXPRESSIONOPERATIONS_HH__
2#define __DUNE_ACFEM_MODELS_EXPRESSIONOPERATIONS_HH__
3
6#include "../expressions/expressionoperations.hh"
7#include "modeltraits.hh"
8
9namespace Dune {
10
11 namespace ACFem {
12
13 namespace PDEModel {
14
15 using namespace ModelIntrospection;
16
32 template<class T>
33 struct IsDedicatedOperation
34 : FalseType
35 {};
36
38
42 template<class MethodTags>
44 {};
45
46 template<class MethodTags>
47 struct IsDedicatedOperation<CropOperation<MethodTags> >
48 : TrueType
49 {};
50
51 template<class T>
52 struct IsCropOperation
53 : FalseType
54 {};
55
56 template<class MethodTags>
57 struct IsCropOperation<CropOperation<MethodTags> >
58 : TrueType
59 {};
60
61 template<class T>
62 using IsCropExpression =
63 BoolConstant<(Expressions::IsExpression<T>::value && IsCropOperation<Expressions::Operation<T> >::value)>;
64
66
71 template<class MethodTags = ModelAdmissibleMethods,
72 class ClosureCallSignatures = ModelMethodClosureSignatures>
74 {
76 "Each methods needs a designated closure signature.");
77 };
78
79 template<class MethodTags, class ClosureCallSignatures>
80 struct IsDedicatedOperation<ClosureOperation<MethodTags, ClosureCallSignatures> >
81 : TrueType
82 {};
83
84 template<class T>
85 struct IsClosureOperation
86 : FalseType
87 {};
88
89 template<class MethodTags, class ClosureSignatures>
90 struct IsClosureOperation<ClosureOperation<MethodTags, ClosureSignatures> >
91 : TrueType
92 {};
93
94 template<class T>
95 using IsClosureExpression =
96 BoolConstant<(Expressions::IsExpression<T>::value && IsClosureOperation<Expressions::Operation<T> >::value)>;
97
99
100 struct RitzLoadFlavour
101 {};
102
103 struct L2LoadFlavour
104 {};
105
107 template<class Flavour>
109 {};
110
111 template<class Flavour>
112 struct IsDedicatedOperation<ApplyOperation<Flavour> >
113 : TrueType
114 {};
115
117
119
120 } // NS PDEModel
121
122 template<class T>
123 using IsModelOperation = PDEModel::IsDedicatedOperation<T>;
124
125 } // NS ACFem
126
127} // NS Dune
128
129#endif // __DUNE_ACFEM_MODELS_EXPRESSIONOPERATIONS_HH__
constexpr std::size_t size()
Gives the number of elements in tuple-likes and std::integer_sequence.
Definition: size.hh:73
Constant< bool, V > BoolConstant
Short-cut for integral constant of type bool.
Definition: types.hh:48
BoolConstant< false > FalseType
Alias for std::false_type.
Definition: types.hh:110
BoolConstant< true > TrueType
Alias for std::true_type.
Definition: types.hh:107
ModelIntrospection::MethodSignaturesClosureType ModelMethodClosureSignatures
A sequence with the closure signatures for all methods.
Definition: modeltraits.hh:926
ModelIntrospection::AllMethodTags ModelAdmissibleMethods
A sequence with the tags of all possible model-methods.
Definition: modeltraits.hh:923
Apply a model to a function.
Definition: expressionoperations.hh:109
Augment the call signature of the methods listed in MethodTags by the call-signature indicated by the...
Definition: expressionoperations.hh:74
Remove all methods which are not listed in MethodTags.
Definition: expressionoperations.hh:44
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)