DimensionedFieldFunctions.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
30 
31 #define TEMPLATE template<class Type, class GeoMesh>
33 
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 
39 // * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * //
40 
41 template<class Type, class GeoMesh, direction r>
43 pow
44 (
47 )
48 {
49  typedef typename powProduct<Type, r>::type powProductType;
50 
51  auto tres =
53  (
54  IOobject
55  (
56  "pow(" + df.name() + ',' + name(r) + ')',
57  df.instance(),
58  df.db()
59  ),
60  df.mesh(),
61  pow(df.dimensions(), r)
62  );
63 
64  pow<Type, r, GeoMesh>(tres.ref().field(), df.field());
65 
66  return tres;
67 }
68 
69 
70 template<class Type, class GeoMesh, direction r>
72 pow
73 (
76 )
77 {
78  typedef typename powProduct<Type, r>::type powProductType;
79 
80  const DimensionedField<Type, GeoMesh>& df = tdf();
81 
82  auto tres =
84  (
85  tdf,
86  "pow(" + df.name() + ',' + name(r) + ')',
87  pow(df.dimensions(), r)
88  );
89 
90  pow<Type, r, GeoMesh>(tres.ref().field(), df.field());
91 
92  tdf.clear();
93  return tres;
94 }
95 
96 
97 template<class Type, class GeoMesh>
100 {
101  typedef typename outerProduct<Type, Type>::type outerProductType;
102 
103  auto tres =
105  (
106  IOobject
107  (
108  "sqr(" + df.name() + ')',
109  df.instance(),
110  df.db()
111  ),
112  df.mesh(),
113  sqr(df.dimensions())
114  );
115 
116  sqr(tres.ref().field(), df.field());
117 
118  return tres;
119 }
120 
121 template<class Type, class GeoMesh>
124 {
125  typedef typename outerProduct<Type, Type>::type outerProductType;
126 
127  const DimensionedField<Type, GeoMesh>& df = tdf();
128 
129  auto tres =
131  (
132  tdf,
133  "sqr(" + df.name() + ')',
134  sqr(df.dimensions())
135  );
136 
137  sqr(tres.ref().field(), df.field());
138 
139  tdf.clear();
140  return tres;
141 }
142 
143 
144 template<class Type, class GeoMesh>
147 {
148  typedef typename typeOfMag<Type>::type magType;
149 
150  auto tres =
152  (
153  IOobject
154  (
155  "magSqr(" + df.name() + ')',
156  df.instance(),
157  df.db()
158  ),
159  df.mesh(),
160  sqr(df.dimensions())
161  );
162 
163  magSqr(tres.ref().field(), df.field());
164 
165  return tres;
166 }
167 
168 template<class Type, class GeoMesh>
171 {
172  typedef typename typeOfMag<Type>::type magType;
173 
174  const DimensionedField<Type, GeoMesh>& df = tdf();
175 
176  auto tres =
178  (
179  tdf,
180  "magSqr(" + df.name() + ')',
181  sqr(df.dimensions())
182  );
183 
184  magSqr(tres.ref().field(), df.field());
185 
186  tdf.clear();
187  return tres;
188 }
189 
190 
191 template<class Type, class GeoMesh>
194 {
195  typedef typename typeOfMag<Type>::type magType;
196 
197  auto tres =
199  (
200  IOobject
201  (
202  "mag(" + df.name() + ')',
203  df.instance(),
204  df.db()
205  ),
206  df.mesh(),
207  df.dimensions()
208  );
209 
210  mag(tres.ref().field(), df.field());
211 
212  return tres;
213 }
214 
215 template<class Type, class GeoMesh>
218 {
219  typedef typename typeOfMag<Type>::type magType;
220 
221  const DimensionedField<Type, GeoMesh>& df = tdf();
222 
223  auto tres =
225  (
226  tdf,
227  "mag(" + df.name() + ')',
228  df.dimensions()
229  );
230 
231  mag(tres.ref().field(), df.field());
232 
233  tdf.clear();
234  return tres;
235 }
236 
237 
238 template<class Type, class GeoMesh>
239 tmp
240 <
241  DimensionedField
242  <
244  >
245 >
247 {
248  typedef typename DimensionedField<Type, GeoMesh>::cmptType cmptType;
249 
250  auto tres =
252  (
253  IOobject
254  (
255  "cmptAv(" + df.name() + ')',
256  df.instance(),
257  df.db()
258  ),
259  df.mesh(),
260  df.dimensions()
261  );
262 
263  cmptAv(tres.ref().field(), df.field());
264 
265  return tres;
266 }
267 
268 
269 template<class Type, class GeoMesh>
270 tmp
271 <
272  DimensionedField
273  <
275  >
276 >
278 {
279  typedef typename DimensionedField<Type, GeoMesh>::cmptType cmptType;
280 
281  const DimensionedField<Type, GeoMesh>& df = tdf();
282 
283  auto tres =
285  (
286  tdf,
287  "cmptAv(" + df.name() + ')',
288  df.dimensions()
289  );
290 
291  cmptAv(tres.ref().field(), df.field());
292 
293  tdf.clear();
294  return tres;
295 }
296 
297 
298 #define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc) \
299  \
300 template<class Type, class GeoMesh> \
301 dimensioned<returnType> func \
302 ( \
303  const DimensionedField<Type, GeoMesh>& df \
304 ) \
305 { \
306  return dimensioned<returnType> \
307  ( \
308  #func "(" + df.name() + ')', \
309  df.dimensions(), \
310  dfunc(df.field()) \
311  ); \
312 } \
313  \
314 template<class Type, class GeoMesh> \
315 dimensioned<returnType> func \
316 ( \
317  const tmp<DimensionedField<Type, GeoMesh>>& tdf1 \
318 ) \
319 { \
320  dimensioned<returnType> res = func(tdf1()); \
321  tdf1.clear(); \
322  return res; \
323 }
324 
331 
333 
334 #undef UNARY_REDUCTION_FUNCTION
335 
336 
337 BINARY_FUNCTION(Type, Type, Type, max)
338 BINARY_FUNCTION(Type, Type, Type, min)
339 BINARY_FUNCTION(Type, Type, Type, cmptMultiply)
340 BINARY_FUNCTION(Type, Type, Type, cmptDivide)
341 
342 BINARY_TYPE_FUNCTION(Type, Type, Type, max)
343 BINARY_TYPE_FUNCTION(Type, Type, Type, min)
344 BINARY_TYPE_FUNCTION(Type, Type, Type, cmptMultiply)
345 BINARY_TYPE_FUNCTION(Type, Type, Type, cmptDivide)
346 
348 
349 
350 // * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * //
351 
352 UNARY_OPERATOR(Type, Type, -, negate, transform)
353 
354 BINARY_OPERATOR(Type, Type, scalar, *, '*', multiply)
355 BINARY_OPERATOR(Type, scalar, Type, *, '*', multiply)
356 BINARY_OPERATOR(Type, Type, scalar, /, '|', divide)
357 
358 BINARY_TYPE_OPERATOR_SF(Type, scalar, Type, *, '*', multiply)
359 BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, *, '*', multiply)
360 
361 BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, '|', divide)
362 
363 
364 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
365 
366 #define PRODUCT_OPERATOR(product, op, opFunc) \
367  \
368 template<class Type1, class Type2, class GeoMesh> \
369 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>> \
370 operator op \
371 ( \
372  const DimensionedField<Type1, GeoMesh>& df1, \
373  const DimensionedField<Type2, GeoMesh>& df2 \
374 ) \
375 { \
376  typedef typename product<Type1, Type2>::type productType; \
377  \
378  auto tres = \
379  tmp<DimensionedField<productType, GeoMesh>>::New \
380  ( \
381  IOobject \
382  ( \
383  '(' + df1.name() + #op + df2.name() + ')', \
384  df1.instance(), \
385  df1.db() \
386  ), \
387  df1.mesh(), \
388  df1.dimensions() op df2.dimensions() \
389  ); \
390  \
391  Foam::opFunc(tres.ref().field(), df1.field(), df2.field()); \
392  \
393  return tres; \
394 } \
395  \
396  \
397 template<class Type1, class Type2, class GeoMesh> \
398 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>> \
399 operator op \
400 ( \
401  const DimensionedField<Type1, GeoMesh>& df1, \
402  const tmp<DimensionedField<Type2, GeoMesh>>& tdf2 \
403 ) \
404 { \
405  typedef typename product<Type1, Type2>::type productType; \
406  \
407  const DimensionedField<Type2, GeoMesh>& df2 = tdf2(); \
408  \
409  auto tres = \
410  reuseTmpDimensionedField<productType, Type2, GeoMesh>::New \
411  ( \
412  tdf2, \
413  '(' + df1.name() + #op + df2.name() + ')', \
414  df1.dimensions() op df2.dimensions() \
415  ); \
416  \
417  Foam::opFunc(tres.ref().field(), df1.field(), df2.field()); \
418  \
419  tdf2.clear(); \
420  return tres; \
421 } \
422  \
423  \
424 template<class Type1, class Type2, class GeoMesh> \
425 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>> \
426 operator op \
427 ( \
428  const tmp<DimensionedField<Type1, GeoMesh>>& tdf1, \
429  const DimensionedField<Type2, GeoMesh>& df2 \
430 ) \
431 { \
432  typedef typename product<Type1, Type2>::type productType; \
433  \
434  const DimensionedField<Type1, GeoMesh>& df1 = tdf1(); \
435  \
436  auto tres = \
437  reuseTmpDimensionedField<productType, Type1, GeoMesh>::New \
438  ( \
439  tdf1, \
440  '(' + df1.name() + #op + df2.name() + ')', \
441  df1.dimensions() op df2.dimensions() \
442  ); \
443  \
444  Foam::opFunc(tres.ref().field(), df1.field(), df2.field()); \
445  \
446  tdf1.clear(); \
447  return tres; \
448 } \
449  \
450  \
451 template<class Type1, class Type2, class GeoMesh> \
452 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>> \
453 operator op \
454 ( \
455  const tmp<DimensionedField<Type1, GeoMesh>>& tdf1, \
456  const tmp<DimensionedField<Type2, GeoMesh>>& tdf2 \
457 ) \
458 { \
459  typedef typename product<Type1, Type2>::type productType; \
460  \
461  const DimensionedField<Type1, GeoMesh>& df1 = tdf1(); \
462  const DimensionedField<Type2, GeoMesh>& df2 = tdf2(); \
463  \
464  auto tres = \
465  reuseTmpTmpDimensionedField \
466  <productType, Type1, Type1, Type2, GeoMesh>::New \
467  ( \
468  tdf1, \
469  tdf2, \
470  '(' + df1.name() + #op + df2.name() + ')', \
471  df1.dimensions() op df2.dimensions() \
472  ); \
473  \
474  Foam::opFunc(tres.ref().field(), df1.field(), df2.field()); \
475  \
476  tdf1.clear(); \
477  tdf2.clear(); \
478  return tres; \
479 } \
480  \
481  \
482 template<class Form, class Type, class GeoMesh> \
483 tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh>> \
484 operator op \
485 ( \
486  const DimensionedField<Type, GeoMesh>& df1, \
487  const dimensioned<Form>& dvs \
488 ) \
489 { \
490  typedef typename product<Type, Form>::type productType; \
491  \
492  auto tres = \
493  tmp<DimensionedField<productType, GeoMesh>>::New \
494  ( \
495  IOobject \
496  ( \
497  '(' + df1.name() + #op + dvs.name() + ')', \
498  df1.instance(), \
499  df1.db() \
500  ), \
501  df1.mesh(), \
502  df1.dimensions() op dvs.dimensions() \
503  ); \
504  \
505  Foam::opFunc(tres.ref().field(), df1.field(), dvs.value()); \
506  \
507  return tres; \
508 } \
509  \
510  \
511 template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
512 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
513 operator op \
514 ( \
515  const DimensionedField<Type, GeoMesh>& df1, \
516  const VectorSpace<Form,Cmpt,nCmpt>& vs \
517 ) \
518 { \
519  return df1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
520 } \
521  \
522  \
523 template<class Form, class Type, class GeoMesh> \
524 tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh>> \
525 operator op \
526 ( \
527  const tmp<DimensionedField<Type, GeoMesh>>& tdf1, \
528  const dimensioned<Form>& dvs \
529 ) \
530 { \
531  typedef typename product<Type, Form>::type productType; \
532  \
533  const DimensionedField<Type, GeoMesh>& df1 = tdf1(); \
534  \
535  auto tres = \
536  reuseTmpDimensionedField<productType, Type, GeoMesh>::New \
537  ( \
538  tdf1, \
539  '(' + df1.name() + #op + dvs.name() + ')', \
540  df1.dimensions() op dvs.dimensions() \
541  ); \
542  \
543  Foam::opFunc(tres.ref().field(), df1.field(), dvs.value()); \
544  \
545  tdf1.clear(); \
546  return tres; \
547 } \
548  \
549  \
550 template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
551 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
552 operator op \
553 ( \
554  const tmp<DimensionedField<Type, GeoMesh>>& tdf1, \
555  const VectorSpace<Form,Cmpt,nCmpt>& vs \
556 ) \
557 { \
558  return tdf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
559 } \
560  \
561  \
562 template<class Form, class Type, class GeoMesh> \
563 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
564 operator op \
565 ( \
566  const dimensioned<Form>& dvs, \
567  const DimensionedField<Type, GeoMesh>& df1 \
568 ) \
569 { \
570  typedef typename product<Form, Type>::type productType; \
571  \
572  auto tres = \
573  tmp<DimensionedField<productType, GeoMesh>>::New \
574  ( \
575  IOobject \
576  ( \
577  '(' + dvs.name() + #op + df1.name() + ')', \
578  df1.instance(), \
579  df1.db() \
580  ), \
581  df1.mesh(), \
582  dvs.dimensions() op df1.dimensions() \
583  ); \
584  \
585  Foam::opFunc(tres.ref().field(), dvs.value(), df1.field()); \
586  \
587  return tres; \
588 } \
589  \
590  \
591 template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
592 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
593 operator op \
594 ( \
595  const VectorSpace<Form,Cmpt,nCmpt>& vs, \
596  const DimensionedField<Type, GeoMesh>& df1 \
597 ) \
598 { \
599  return dimensioned<Form>(static_cast<const Form&>(vs)) op df1; \
600 } \
601  \
602  \
603 template<class Form, class Type, class GeoMesh> \
604 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
605 operator op \
606 ( \
607  const dimensioned<Form>& dvs, \
608  const tmp<DimensionedField<Type, GeoMesh>>& tdf1 \
609 ) \
610 { \
611  typedef typename product<Form, Type>::type productType; \
612  \
613  const DimensionedField<Type, GeoMesh>& df1 = tdf1(); \
614  \
615  auto tres = \
616  reuseTmpDimensionedField<productType, Type, GeoMesh>::New \
617  ( \
618  tdf1, \
619  '(' + dvs.name() + #op + df1.name() + ')', \
620  dvs.dimensions() op df1.dimensions() \
621  ); \
622  \
623  Foam::opFunc(tres.ref().field(), dvs.value(), df1.field()); \
624  \
625  tdf1.clear(); \
626  return tres; \
627 } \
628  \
629  \
630 template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
631 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
632 operator op \
633 ( \
634  const VectorSpace<Form,Cmpt,nCmpt>& vs, \
635  const tmp<DimensionedField<Type, GeoMesh>>& tdf1 \
636 ) \
637 { \
638  return dimensioned<Form>(static_cast<const Form&>(vs)) op tdf1; \
639 }
640 
641 
644 
649 
650 #undef PRODUCT_OPERATOR
651 
652 
653 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
654 
655 } // End namespace Foam
656 
657 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
658 
659 #include "undefFieldFunctionsM.H"
660 
661 // ************************************************************************* //
BINARY_TYPE_OPERATOR_SF
#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)
Definition: DimensionedFieldFunctionsM.C:522
BINARY_OPERATOR
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
Definition: DimensionedFieldFunctionsM.C:412
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
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:940
DimensionedFieldReuseFunctions.H
Foam::gSumMag
typeOfMag< Type >::type gSumMag(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:598
PRODUCT_OPERATOR
#define PRODUCT_OPERATOR(product, op, opFunc)
Definition: DimensionedFieldFunctions.C:366
Foam::cmptMultiply
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::DimensionedField::field
const Field< Type > & field() const
Return field.
Definition: DimensionedFieldI.H:90
Foam::gAverage
Type gAverage(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:604
Foam::innerProduct
Definition: products.H:141
Foam::outerProduct::type
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Definition: products.H:114
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:944
Foam::crossProduct
Definition: products.H:129
undefFieldFunctionsM.H
Foam::sumMag
dimensioned< typename typeOfMag< Type >::type > sumMag(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:332
Foam::powProduct::type
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
Definition: products.H:170
Foam::gMinMaxMag
scalarMinMax gMinMaxMag(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:596
Foam::gSum
Type gSum(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:594
BINARY_FUNCTION
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)
Definition: DimensionedFieldFunctionsM.C:141
Foam::transform
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Definition: dimensionSet.C:521
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
DimensionedFieldFunctionsM.C
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::divide
void divide(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
BINARY_TYPE_FUNCTION_FS
#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
Definition: DimensionedFieldFunctionsM.C:329
Foam::scalarProduct
Definition: products.H:153
Foam::typeOfSum
Definition: products.H:97
Foam::DimensionedField::mesh
const Mesh & mesh() const
Return mesh.
Definition: DimensionedFieldI.H:41
Foam::DimensionedField::cmptType
Field< Type >::cmptType cmptType
Component type of the elements of the field.
Definition: DimensionedField.H:92
Foam::cmptAv
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:246
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:75
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::typeOfMag
The magnitude type for given argument.
Definition: products.H:88
Foam::negate
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
Foam::minMaxMag
dimensioned< scalarMinMax > minMaxMag(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:330
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:939
UNARY_REDUCTION_FUNCTION
#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc)
Definition: DimensionedFieldFunctions.C:298
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::DimensionedField::dimensions
const dimensionSet & dimensions() const
Return dimensions.
Definition: DimensionedFieldI.H:49
BINARY_TYPE_FUNCTION
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)
Definition: DimensionedFieldFunctionsM.C:405
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::cmptDivide
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::sqr
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Definition: dimensionedSymmTensor.C:51
Foam::clip
dimensionSet clip(const dimensionSet &ds1, const dimensionSet &ds2)
Definition: dimensionSet.C:278
UNARY_OPERATOR
#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)
Definition: DimensionedFieldFunctionsM.C:87
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
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:942
Foam::sum
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:327
Foam::roots::type
type
Types of root.
Definition: Roots.H:54
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::reuseTmpDimensionedField::New
static tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< Type1, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Definition: DimensionedFieldReuseFunctions.H:43
Foam::minMax
MinMax< label > minMax(const labelHashSet &set)
Find the min/max values of labelHashSet.
Definition: hashSets.C:61
Foam::gMin
Type gMin(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:593
BINARY_TYPE_OPERATOR_FS
#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
Definition: DimensionedFieldFunctionsM.C:599
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:943
Foam::typeOfMag::type
pTraits< typename pTraits< arg1 >::cmptType >::magType type
Definition: products.H:92
Foam::MinMax
A min/max value pair with additional methods. In addition to conveniently storing values,...
Definition: HashSet.H:76
Foam::outerProduct
Definition: products.H:106
Foam::gMax
Type gMax(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:592
Foam::average
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:328
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::gMinMax
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:595
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:945