pointPatchFieldFunctions.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 namespace Foam
27 {
28 
29 /* * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * */
30 
31 template<class Type>
32 inline void component
33 (
35  const pointPatchField<Type>& f,
36  const direction d
37 )
38 {}
39 
40 
41 template<class Type>
42 inline void T
43 (
45  const pointPatchField<Type>& f2
46 )
47 {}
48 
49 
50 template<class Type, direction r>
51 inline void pow
52 (
53  Field<typename powProduct<Type, r>::type>& f,
54  const pointPatchField<Type>& vf
55 )
56 {}
57 
58 
59 template<class Type>
60 inline void sqr
61 (
63  const pointPatchField<Type>& vf
64 )
65 {}
66 
67 
68 template<class Type>
69 inline void magSqr
70 (
72  const pointPatchField<Type>& f
73 )
74 {}
75 
76 
77 template<class Type>
78 inline void mag
79 (
81  const pointPatchField<Type>& f
82 )
83 {}
84 
85 
86 template<class Type>
87 inline void cmptAv
88 (
90  const pointPatchField<Type>& f
91 )
92 {}
93 
94 
95 template<class Type>
96 inline void cmptMag
97 (
99  const pointPatchField<Type>& f
100 )
101 {}
102 
103 
104 #define BINARY_FUNCTION(func) \
105  \
106 template<class Type> \
107 inline void func \
108 ( \
109  pointPatchField<Type>& f, \
110  const pointPatchField<Type>& f1, \
111  const pointPatchField<Type>& f2 \
112 ) \
113 {} \
114  \
115 template<class Type> \
116 inline void func \
117 ( \
118  pointPatchField<Type>& f, \
119  const pointPatchField<Type>& f1, \
120  const Type& s \
121 ) \
122 {}
123 
128 
129 
130 /* * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * */
131 
132 #define UNARY_OPERATOR(op, opFunc) \
133  \
134 template<class Type> \
135 inline void opFunc \
136 ( \
137  pointPatchField<Type>& f, \
138  const pointPatchField<Type>& f1 \
139 ) \
140 {}
141 
143 
144 #define BINARY_OPERATOR(Type1, Type2, op, opFunc) \
145  \
146 template<class Type> \
147 inline void opFunc \
148 ( \
149  pointPatchField<Type>& f, \
150  const pointPatchField<Type1>& f1, \
151  const pointPatchField<Type2>& f2 \
152 ) \
153 {}
154 
155 BINARY_OPERATOR(scalar, Type, *, multiply)
156 BINARY_OPERATOR(Type, scalar, *, multiply)
157 BINARY_OPERATOR(Type, scalar, /, divide)
158 
159 #define BINARY_TYPE_OPERATOR_SF(TYPE, op, opFunc) \
160  \
161 template<class Type> \
162 inline void opFunc \
163 ( \
164  pointPatchField<Type>& f, \
165  const TYPE& s, \
166  const pointPatchField<Type>& f1 \
167 ) \
168 {}
169 
170 
171 #define BINARY_TYPE_OPERATOR_FS(TYPE, op, opFunc) \
172  \
173 template<class Type> \
174 inline void opFunc \
175 ( \
176  pointPatchField<Type>& f, \
177  const pointPatchField<Type>& f1, \
178  const TYPE& s \
179 ) \
180 {}
181 
182 
186 
187 
188 #define PRODUCT_OPERATOR(product, op, opFunc) \
189  \
190 template \
191 < \
192  class Type1, \
193  class Type2 \
194 > \
195 inline void opFunc \
196 ( \
197  pointPatchField \
198  <typename product<Type1, Type2>::type>& f, \
199  const pointPatchField<Type1>& f1, \
200  const pointPatchField<Type2>& f2 \
201 ) \
202 {} \
203  \
204 template \
205 < \
206  class Type, \
207  class Form, \
208  class Cmpt, \
209  direction nCmpt \
210 > \
211 inline void opFunc \
212 ( \
213  pointPatchField \
214  <typename product<Type, Form>::type>& f, \
215  const pointPatchField<Type>& f1, \
216  const VectorSpace<Form,Cmpt,nCmpt>& vs \
217 ) \
218 {} \
219  \
220 template \
221 < \
222  class Form, \
223  class Cmpt, \
224  direction nCmpt, \
225  class Type \
226 > \
227 inline void opFunc \
228 ( \
229  pointPatchField \
230  <typename product<Form, Type>::type>& f, \
231  const VectorSpace<Form,Cmpt,nCmpt>& vs, \
232  const pointPatchField<Type>& f1 \
233 ) \
234 {}
235 
236 PRODUCT_OPERATOR(typeOfSum, +, add)
238 
239 PRODUCT_OPERATOR(outerProduct, *, outer)
240 PRODUCT_OPERATOR(crossProduct, ^, cross)
241 PRODUCT_OPERATOR(innerProduct, &, dot)
242 PRODUCT_OPERATOR(scalarProduct, &&, dotdot)
243 
244 #undef PRODUCT_OPERATOR
245 
246 
247 inline void hdual
248 (
251 )
252 {}
253 
254 inline void hdual
255 (
258 )
259 {}
260 
261 inline void diag
262 (
265 )
266 {}
267 
268 inline void tr
269 (
272 )
273 {}
274 
275 inline void dev
276 (
279 )
280 {}
281 
282 inline void dev2
283 (
286 )
287 {}
288 
289 inline void det
290 (
293 )
294 {}
295 
296 inline void inv
297 (
300 )
301 {}
302 
303 inline void symm
304 (
307 )
308 {}
309 
310 inline void twoSymm
311 (
314 )
315 {}
316 
317 inline void skew
318 (
321 )
322 {}
323 
324 inline void eigenValues
325 (
328 )
329 {}
330 
331 inline void eigenVectors
332 (
335 )
336 {}
337 
338 
339 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
340 
341 } // End namespace Foam
342 
343 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
344 
345 #include "undefFieldFunctionsM.H"
346 
347 // ************************************************************************* //
void divide(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
void multiply(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
#define BINARY_FUNCTION(func)
dimensionedTensor skew(const dimensionedTensor &dt)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
uint8_t direction
Definition: direction.H:45
pTraits< Type >::cmptType cmptType
Component type.
Definition: Field.H:97
dimensionedVector eigenValues(const dimensionedTensor &dt)
#define BINARY_OPERATOR(Type1, Type2, op, opFunc)
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Definition: products.H:90
dimensionedScalar det(const dimensionedSphericalTensor &dt)
#define PRODUCT_OPERATOR(product, op, opFunc)
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
#define BINARY_TYPE_OPERATOR_SF(TYPE, op, opFunc)
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Abstract base class for point-mesh patch fields.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
#define BINARY_TYPE_OPERATOR_FS(TYPE, op, opFunc)
Pre-declare SubField and related Field type.
Definition: Field.H:56
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
void hdual(pointPatchField< vector > &, const pointPatchField< tensor > &)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
#define UNARY_OPERATOR(op, opFunc)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedTensor eigenVectors(const dimensionedTensor &dt)
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
Definition: products.H:136
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensioned< scalar > mag(const dimensioned< Type > &)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Namespace for OpenFOAM.