FieldReductionFunctions.C File Reference
Include dependency graph for FieldReductionFunctions.C:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Foam
 Namespace for OpenFOAM.
 

Macros

#define G_REDUCTION_FUNCTION(ReturnType, gFunc, Func, rFunc)
 
#define TMP_REDUCTION_FUNCTION(ReturnType, Func)
 

Functions

template<class Type >
Type max (const UList< Type > &f)
 
template<class Type >
Type gMax (const UList< Type > &f, const label comm)
 
template<class Type >
Type max (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type gMax (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type min (const UList< Type > &f)
 
template<class Type >
Type gMin (const UList< Type > &f, const label comm)
 
template<class Type >
Type min (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type gMin (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type sum (const UList< Type > &f)
 
template<class Type >
Type gSum (const UList< Type > &f, const label comm)
 
template<class Type >
Type sum (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type gSum (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type maxMagSqr (const UList< Type > &f)
 
template<class Type >
Type gMaxMagSqr (const UList< Type > &f, const label comm)
 
template<class Type >
Type maxMagSqr (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type gMaxMagSqr (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type minMagSqr (const UList< Type > &f)
 
template<class Type >
Type gMinMagSqr (const UList< Type > &f, const label comm)
 
template<class Type >
Type minMagSqr (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type gMinMagSqr (const tmp< Field< Type >> &tf1)
 
template<class Type >
scalar sumProd (const UList< Type > &f1, const UList< Type > &f2)
 
template<class Type >
scalar gSumProd (const UList< Type > &f1, const UList< Type > &f2, const label comm)
 
template<class Type >
Type sumCmptProd (const UList< Type > &f1, const UList< Type > &f2)
 
template<class Type >
Type gSumCmptProd (const UList< Type > &f1, const UList< Type > &f2, const label comm)
 
template<class Type >
scalar sumSqr (const UList< Type > &f)
 
template<class Type >
scalar gSumSqr (const UList< Type > &f, const label comm)
 
template<class Type >
scalar sumSqr (const tmp< Field< Type >> &tf1)
 
template<class Type >
scalar gSumSqr (const tmp< Field< Type >> &tf1)
 
template<class Type >
scalar sumMag (const UList< Type > &f)
 
template<class Type >
scalar gSumMag (const UList< Type > &f, const label comm)
 
template<class Type >
scalar sumMag (const tmp< Field< Type >> &tf1)
 
template<class Type >
scalar gSumMag (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type sumCmptMag (const UList< Type > &f)
 
template<class Type >
Type gSumCmptMag (const UList< Type > &f, const label comm)
 
template<class Type >
Type sumCmptMag (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type gSumCmptMag (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type average (const UList< Type > &f)
 
template<class Type >
Type gAverage (const UList< Type > &f, const label comm)
 
template<class Type >
Type average (const tmp< Field< Type >> &tf1)
 
template<class Type >
Type gAverage (const tmp< Field< Type >> &tf1)
 

Detailed Description

Original source file FieldReductionFunctions.C

Definition in file FieldReductionFunctions.C.

Macro Definition Documentation

◆ G_REDUCTION_FUNCTION

#define G_REDUCTION_FUNCTION (   ReturnType,
  gFunc,
  Func,
  rFunc 
)
Value:
\
template<class Type> \
ReturnType gFunc \
( \
const UList<Type>& f, \
const label comm \
) \
{ \
ReturnType res = Func(f); \
reduce(res, rFunc##Op<Type>(), Pstream::msgType(), comm); \
return res; \
}
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
labelList f(nPoints)

Definition at line 36 of file FieldReductionFunctions.C.

◆ TMP_REDUCTION_FUNCTION

#define TMP_REDUCTION_FUNCTION (   ReturnType,
  Func 
)
Value:
\
template<class Type> \
ReturnType Func(const tmp<Field<Type>>& tf1) \
{ \
ReturnType res = Func(tf1()); \
tf1.clear(); \
return res; \
}

Definition at line 50 of file FieldReductionFunctions.C.