ENH: comunicators: have solver with user-defined communicator

(originating from polyMesh::comm() and processorPolyPatch::comm())
This commit is contained in:
mattijs
2013-02-06 14:26:31 +00:00
parent ea8d290191
commit 33d6ea3e62
37 changed files with 613 additions and 154 deletions

View File

@ -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)