pointPatchFieldFunctions.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011 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, int r>
51 inline void pow
52 (
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 (
73 )
74 {}
75 
76 
77 template<class Type>
78 inline void mag
79 (
82 )
83 {}
84 
85 
86 template<class Type>
87 inline void cmptAv
88 (
91 )
92 {}
93 
94 
95 template<class Type>
96 inline void cmptMag
97 (
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  int 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  int 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 
238 
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 // ************************************************************************* //
Foam::subtract
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:871
Foam::symm
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:82
Foam::component
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Definition: FieldFieldFunctions.C:41
BINARY_TYPE_OPERATOR_SF
#define BINARY_TYPE_OPERATOR_SF(TYPE, op, opFunc)
Definition: pointPatchFieldFunctions.H:159
Foam::skew
dimensionedTensor skew(const dimensionedTensor &dt)
Definition: dimensionedTensor.C:135
Foam::cmptMultiply
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::eigenVectors
dimensionedTensor eigenVectors(const dimensionedTensor &dt)
Definition: dimensionedTensor.C:157
Foam::diag
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
Definition: pointPatchFieldFunctions.H:262
Foam::innerProduct
Definition: products.H:89
Foam::outerProduct::type
typeOfRank< typename pTraits< arg1 >::cmptType, int(pTraits< arg1 >::rank)+int(pTraits< arg2 >::rank) >::type type
Definition: products.H:72
Foam::dot
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:875
BINARY_FUNCTION
#define BINARY_FUNCTION(func)
Definition: pointPatchFieldFunctions.H:104
Foam::crossProduct
Definition: products.H:77
undefFieldFunctionsM.H
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
Foam::dev2
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:115
Foam::pointPatchField
Abstract base class for point-mesh patch fields.
Definition: pointMVCWeight.H:58
UNARY_OPERATOR
#define UNARY_OPERATOR(op, opFunc)
Definition: pointPatchFieldFunctions.H:132
Foam::powProduct::type
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *int(pTraits< arg1 >::rank) >::type type
Definition: products.H:118
Foam::divide
void divide(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
Foam::cmptMag
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:359
Foam::scalarProduct
Definition: products.H:101
Foam::typeOfSum
Definition: products.H:55
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
PRODUCT_OPERATOR
#define PRODUCT_OPERATOR(product, op, opFunc)
Definition: pointPatchFieldFunctions.H:188
BINARY_OPERATOR
#define BINARY_OPERATOR(Type1, Type2, op, opFunc)
Definition: pointPatchFieldFunctions.H:144
Foam::eigenValues
dimensionedVector eigenValues(const dimensionedTensor &dt)
Definition: dimensionedTensor.C:146
Foam::inv
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:71
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
f1
scalar f1
Definition: createFields.H:28
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:73
Foam::negate
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
Foam::add
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:870
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
sf
volScalarField sf(fieldObject, mesh)
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::cmptDivide
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::sqr
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Definition: dimensionedSymmTensor.C:49
Foam::cmptAv
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:252
f
labelList f(nPoints)
Foam::outer
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:873
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::tr
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:49
Foam::det
dimensionedScalar det(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:60
Foam::hdual
void hdual(pointPatchField< vector > &, const pointPatchField< tensor > &)
Definition: pointPatchFieldFunctions.H:248
Foam::multiply
void multiply(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
Foam::cross
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:874
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::twoSymm
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:93
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Foam::outerProduct
Definition: products.H:64
BINARY_TYPE_OPERATOR_FS
#define BINARY_TYPE_OPERATOR_FS(TYPE, op, opFunc)
Definition: pointPatchFieldFunctions.H:171
Foam::dev
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:104
Foam::dotdot
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:876