mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: comunicators: have solver with user-defined communicator
(originating from polyMesh::comm() and processorPolyPatch::comm())
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,6 +25,7 @@ License
|
||||
|
||||
#define TEMPLATE template<class Type>
|
||||
#include "FieldFunctionsM.H"
|
||||
#include "UPstream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -201,7 +202,7 @@ TMP_UNARY_FUNCTION(Type, average)
|
||||
#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc) \
|
||||
\
|
||||
template<class Type> \
|
||||
ReturnType gFunc(const UList<Type>& f); \
|
||||
ReturnType gFunc(const UList<Type>& f, const int comm = UPstream::worldComm); \
|
||||
TMP_UNARY_FUNCTION(ReturnType, gFunc)
|
||||
|
||||
G_UNARY_FUNCTION(Type, gMax, max, max)
|
||||
@ -214,13 +215,27 @@ G_UNARY_FUNCTION(Type, gSumCmptMag, sumCmptMag, sum)
|
||||
#undef G_UNARY_FUNCTION
|
||||
|
||||
template<class Type>
|
||||
scalar gSumProd(const UList<Type>& f1, const UList<Type>& f2);
|
||||
scalar gSumProd
|
||||
(
|
||||
const UList<Type>& f1,
|
||||
const UList<Type>& f2,
|
||||
const int comm = UPstream::worldComm
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
Type gSumCmptProd(const UList<Type>& f1, const UList<Type>& f2);
|
||||
Type gSumCmptProd
|
||||
(
|
||||
const UList<Type>& f1,
|
||||
const UList<Type>& f2,
|
||||
const int comm = UPstream::worldComm
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
Type gAverage(const UList<Type>& f);
|
||||
Type gAverage
|
||||
(
|
||||
const UList<Type>& f,
|
||||
const int comm = UPstream::worldComm
|
||||
);
|
||||
|
||||
TMP_UNARY_FUNCTION(Type, gAverage)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user