mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: FieldFunctions reduce on returnType, not input type (#1327)
- for most functions the input type and return type are identical, but MinMax, sumMag are not.
This commit is contained in:
committed by
Andrew Heather
parent
7945ca739c
commit
26a6533053
@ -227,6 +227,7 @@ Type average(const UList<Type>& f);
|
||||
TMP_UNARY_FUNCTION(Type, average)
|
||||
|
||||
|
||||
// With reduction on ReturnType
|
||||
#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc) \
|
||||
\
|
||||
template<class Type> \
|
||||
@ -238,12 +239,13 @@ G_UNARY_FUNCTION(Type, gMin, min, min)
|
||||
G_UNARY_FUNCTION(Type, gSum, sum, sum)
|
||||
G_UNARY_FUNCTION(Type, gMaxMagSqr, maxMagSqr, maxMagSqr)
|
||||
G_UNARY_FUNCTION(Type, gMinMagSqr, minMagSqr, minMagSqr)
|
||||
G_UNARY_FUNCTION(scalar, gSumSqr, sumSqr, sum)
|
||||
G_UNARY_FUNCTION(scalar, gSumMag, sumMag, sum)
|
||||
G_UNARY_FUNCTION(Type, gSumCmptMag, sumCmptMag, sum)
|
||||
|
||||
G_UNARY_FUNCTION(MinMax<Type>, gMinMax, minMax, minMax)
|
||||
G_UNARY_FUNCTION(scalarMinMax, gMinMaxMag, minMaxMag, minMaxMag)
|
||||
G_UNARY_FUNCTION(MinMax<Type>, gMinMax, minMax, sum)
|
||||
G_UNARY_FUNCTION(scalarMinMax, gMinMaxMag, minMaxMag, sum)
|
||||
|
||||
G_UNARY_FUNCTION(scalar, gSumSqr, sumSqr, sum)
|
||||
G_UNARY_FUNCTION(scalar, gSumMag, sumMag, sum)
|
||||
|
||||
#undef G_UNARY_FUNCTION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user