From cb97fa675ea65da151b33916fbcde1d11649782f Mon Sep 17 00:00:00 2001
From: mattijs <mattijs@hunt.opencfd.co.uk>
Date: Thu, 30 Apr 2009 15:43:20 +0100
Subject: [PATCH] use total number of cells/points in parallel

---
 src/meshTools/cellClassification/cellClassification.C     | 8 ++++----
 src/meshTools/cellDist/patchWave/patchDataWave.C          | 2 +-
 src/meshTools/cellDist/patchWave/patchWave.C              | 4 ++--
 .../LES/LESdeltas/smoothDelta/smoothDelta.C               | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/meshTools/cellClassification/cellClassification.C b/src/meshTools/cellClassification/cellClassification.C
index 9adf4c6526e..f54876c9c50 100644
--- a/src/meshTools/cellClassification/cellClassification.C
+++ b/src/meshTools/cellClassification/cellClassification.C
@@ -323,10 +323,10 @@ void Foam::cellClassification::markCells
     MeshWave<cellInfo> cellInfoCalc
     (
         mesh_,
-        changedFaces,       // Labels of changed faces
-        changedFacesInfo,   // Information on changed faces
-        cellInfoList,       // Information on all cells
-        mesh_.nCells()      // max iterations
+        changedFaces,                       // Labels of changed faces
+        changedFacesInfo,                   // Information on changed faces
+        cellInfoList,                       // Information on all cells
+        mesh_.globalData().nTotalCells()    // max iterations
     );
 
     // Get information out of cellInfoList
diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.C b/src/meshTools/cellDist/patchWave/patchDataWave.C
index 4bd42721ba5..b22a110be62 100644
--- a/src/meshTools/cellDist/patchWave/patchDataWave.C
+++ b/src/meshTools/cellDist/patchWave/patchDataWave.C
@@ -226,7 +226,7 @@ void Foam::patchDataWave<TransferType>::correct()
         mesh(),
         changedFaces,
         faceDist,
-        mesh().nCells() // max iterations
+        mesh().globalData().nTotalCells() // max iterations
     );
 
 
diff --git a/src/meshTools/cellDist/patchWave/patchWave.C b/src/meshTools/cellDist/patchWave/patchWave.C
index 7cb37059258..f48d3835598 100644
--- a/src/meshTools/cellDist/patchWave/patchWave.C
+++ b/src/meshTools/cellDist/patchWave/patchWave.C
@@ -28,7 +28,7 @@ License
 #include "polyMesh.H"
 #include "wallPoint.H"
 #include "MeshWave.H"
-
+#include "globalMeshData.H"
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
@@ -187,7 +187,7 @@ void Foam::patchWave::correct()
         mesh(),
         changedFaces,
         faceDist,
-        mesh().nCells() // max iterations
+        mesh().globalData().nTotalCells()   // max iterations
     );
 
 
diff --git a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C
index 7b836c60ee7..bea05e99733 100644
--- a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C
+++ b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C
@@ -138,7 +138,7 @@ void smoothDelta::calcDelta()
         changedFacesInfo,
         faceDeltaData,
         cellDeltaData,
-        mesh_.nCells()  // max iterations
+        mesh_.globalData().nTotalCells()    // max iterations
     );
 
     forAll(delta_, cellI)
-- 
GitLab