From fd57af998062384d05b4feb3df4daac1584d354c Mon Sep 17 00:00:00 2001 From: henry <Henry Weller h.weller@opencfd.co.uk> Date: Wed, 29 Oct 2008 13:18:36 +0000 Subject: [PATCH] Changed sum to gSum for parallel execution. --- .../postProcessing/patch/patchAverage/patchAverage.C | 4 ++-- .../postProcessing/patch/patchIntegrate/patchIntegrate.C | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C index 41140a33fea..f66a5cf2f36 100644 --- a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C +++ b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C @@ -79,12 +79,12 @@ int main(int argc, char *argv[]) Info<< " Reading volScalarField " << fieldName << endl; volScalarField field(fieldHeader, mesh); - scalar area = sum(mesh.magSf().boundaryField()[patchi]); + scalar area = gSum(mesh.magSf().boundaryField()[patchi]); scalar sumField = 0; if (area > 0) { - sumField = sum + sumField = gSum ( mesh.magSf().boundaryField()[patchi] * field.boundaryField()[patchi] diff --git a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C index 3c0e18a9cf3..c4eb708ff71 100644 --- a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C +++ b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C @@ -75,14 +75,14 @@ int main(int argc, char *argv[]) } // Give patch area - Info<< " Patch area = " << sum(mesh.Sf().boundaryField()[patchi]) << endl; + Info<< " Patch area = " << gSum(mesh.Sf().boundaryField()[patchi]) << endl; if (fieldHeader.headerClassName() == "volScalarField") { Info<< " Reading volScalarField " << fieldName << endl; volScalarField field(fieldHeader, mesh); - vector sumField = sum + vector sumField = gSum ( mesh.Sf().boundaryField()[patchi] * field.boundaryField()[patchi] @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) Info<< " Reading surfaceScalarField " << fieldName << endl; surfaceScalarField field(fieldHeader, mesh); - scalar sumField = sum(field.boundaryField()[patchi]); + scalar sumField = gSum(field.boundaryField()[patchi]); Info<< " Integral of " << fieldName << " over patch " << patchName << '[' << patchi << ']' << " = " -- GitLab