OpenFOAM
9
The OpenFOAM Foundation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
GeometricFieldFunctionsM.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
\*---------------------------------------------------------------------------*/
25
26
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
27
28
#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc) \
29
\
30
TEMPLATE \
31
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
32
( \
33
const GeometricField<Type1, PatchField, GeoMesh>& df \
34
); \
35
\
36
TEMPLATE \
37
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
38
( \
39
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1 \
40
);
41
42
43
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45
#define UNARY_OPERATOR(ReturnType, Type1, Op, opFunc, Dfunc) \
46
\
47
TEMPLATE \
48
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
49
( \
50
const GeometricField<Type1, PatchField, GeoMesh>& df1 \
51
); \
52
\
53
TEMPLATE \
54
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
55
( \
56
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1 \
57
);
58
59
60
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61
62
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func) \
63
\
64
TEMPLATE \
65
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
66
( \
67
const GeometricField<Type1, PatchField, GeoMesh>& df1, \
68
const GeometricField<Type2, PatchField, GeoMesh>& df2 \
69
); \
70
\
71
TEMPLATE \
72
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
73
( \
74
const GeometricField<Type1, PatchField, GeoMesh>& df1, \
75
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2 \
76
); \
77
\
78
TEMPLATE \
79
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
80
( \
81
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1, \
82
const GeometricField<Type2, PatchField, GeoMesh>& df2 \
83
); \
84
\
85
TEMPLATE \
86
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
87
( \
88
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1, \
89
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2 \
90
);
91
92
93
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94
95
#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func) \
96
\
97
TEMPLATE \
98
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
99
( \
100
const dimensioned<Type1>& dt1, \
101
const GeometricField<Type2, PatchField, GeoMesh>& df2 \
102
); \
103
\
104
TEMPLATE \
105
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
106
( \
107
const Type1& t1, \
108
const GeometricField<Type2, PatchField, GeoMesh>& df2 \
109
); \
110
\
111
TEMPLATE \
112
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
113
( \
114
const dimensioned<Type1>& dt1, \
115
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2 \
116
); \
117
\
118
TEMPLATE \
119
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
120
( \
121
const Type1& t1, \
122
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2 \
123
);
124
125
126
#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func) \
127
\
128
TEMPLATE \
129
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
130
( \
131
const GeometricField<Type1, PatchField, GeoMesh>& df1, \
132
const dimensioned<Type2>& dt2 \
133
); \
134
\
135
TEMPLATE \
136
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
137
( \
138
const GeometricField<Type1, PatchField, GeoMesh>& df1, \
139
const Type2& t2 \
140
); \
141
\
142
TEMPLATE \
143
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
144
( \
145
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1, \
146
const dimensioned<Type2>& dt2 \
147
); \
148
\
149
TEMPLATE \
150
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
151
( \
152
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf2, \
153
const Type2& t2 \
154
);
155
156
157
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func) \
158
BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func) \
159
BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
160
161
162
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
165
\
166
TEMPLATE \
167
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
168
( \
169
const GeometricField<Type1, PatchField, GeoMesh>& df1, \
170
const GeometricField<Type2, PatchField, GeoMesh>& df2 \
171
); \
172
\
173
TEMPLATE \
174
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
175
( \
176
const GeometricField<Type1, PatchField, GeoMesh>& df1, \
177
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2 \
178
); \
179
\
180
TEMPLATE \
181
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
182
( \
183
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1, \
184
const GeometricField<Type2, PatchField, GeoMesh>& df2 \
185
); \
186
\
187
TEMPLATE \
188
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
189
( \
190
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1, \
191
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2 \
192
);
193
194
195
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197
#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
198
\
199
TEMPLATE \
200
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
201
( \
202
const dimensioned<Type1>& dt1, \
203
const GeometricField<Type2, PatchField, GeoMesh>& df2 \
204
); \
205
\
206
TEMPLATE \
207
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
208
( \
209
const Type1& t1, \
210
const GeometricField<Type2, PatchField, GeoMesh>& df2 \
211
); \
212
\
213
TEMPLATE \
214
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
215
( \
216
const dimensioned<Type1>& dt1, \
217
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2 \
218
); \
219
\
220
TEMPLATE \
221
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
222
( \
223
const Type1& t1, \
224
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2 \
225
);
226
227
228
#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
229
\
230
TEMPLATE \
231
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
232
( \
233
const GeometricField<Type1, PatchField, GeoMesh>& df1, \
234
const dimensioned<Type2>& dt2 \
235
); \
236
\
237
TEMPLATE \
238
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
239
( \
240
const GeometricField<Type1, PatchField, GeoMesh>& df1, \
241
const Type2& t2 \
242
); \
243
\
244
TEMPLATE \
245
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
246
( \
247
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1, \
248
const dimensioned<Type2>& dt2 \
249
); \
250
\
251
TEMPLATE \
252
tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
253
( \
254
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1, \
255
const Type2& t2 \
256
);
257
258
259
#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
260
BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
261
BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
262
263
264
// ************************************************************************* //
src
OpenFOAM
fields
GeometricFields
GeometricField
GeometricFieldFunctionsM.H
Generated by
1.8.13