From 694a9e29152e12092ffc05ecce605cfd541fbbcc Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 23 Nov 2011 10:28:43 +0000 Subject: [PATCH 1/2] ENH: surfaceInterpolation: have debug in parallel --- .../surfaceInterpolation/surfaceInterpolation.C | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C index fe0643c195..165b8c4d55 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C @@ -134,7 +134,7 @@ void Foam::surfaceInterpolation::makeWeights() const { if (debug) { - Info<< "surfaceInterpolation::makeWeights() : " + Pout<< "surfaceInterpolation::makeWeights() : " << "Constructing weighting factors for face interpolation" << endl; } @@ -188,7 +188,7 @@ void Foam::surfaceInterpolation::makeWeights() const if (debug) { - Info<< "surfaceInterpolation::makeWeights() : " + Pout<< "surfaceInterpolation::makeWeights() : " << "Finished constructing weighting factors for face interpolation" << endl; } @@ -199,7 +199,7 @@ void Foam::surfaceInterpolation::makeDeltaCoeffs() const { if (debug) { - Info<< "surfaceInterpolation::makeDeltaCoeffs() : " + Pout<< "surfaceInterpolation::makeDeltaCoeffs() : " << "Constructing differencing factors array for face gradient" << endl; } @@ -244,7 +244,7 @@ void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const { if (debug) { - Info<< "surfaceInterpolation::makeNonOrthDeltaCoeffs() : " + Pout<< "surfaceInterpolation::makeNonOrthDeltaCoeffs() : " << "Constructing differencing factors array for face gradient" << endl; } @@ -306,7 +306,7 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const { if (debug) { - Info<< "surfaceInterpolation::makeNonOrthCorrectionVectors() : " + Pout<< "surfaceInterpolation::makeNonOrthCorrectionVectors() : " << "Constructing non-orthogonal correction vectors" << endl; } @@ -377,7 +377,7 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const if (debug) { - Info<< "surfaceInterpolation::makeNonOrthCorrectionVectors() : " + Pout<< "surfaceInterpolation::makeNonOrthCorrectionVectors() : " << "Finished constructing non-orthogonal correction vectors" << endl; } From 5885da2ef6570fe25d5340f9253384b37185de3f Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 23 Nov 2011 10:29:57 +0000 Subject: [PATCH 2/2] BUG: fvMeshDistribute: disable fvPatchField reading triggering processor comms fixedGradientFvPatchField does evaluate() upon reading which triggers deltaCoeffs building which does parallel comms --- src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index 4f934e43d4..10ac331363 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -1818,6 +1818,9 @@ Foam::autoPtr Foam::fvMeshDistribute::distribute // What to send to neighbouring domains // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + bool oldParRun = UPstream::parRun(); + UPstream::parRun() = false; + forAll(nSendCells[Pstream::myProcNo()], recvProc) { if @@ -1966,6 +1969,9 @@ Foam::autoPtr Foam::fvMeshDistribute::distribute } + UPstream::parRun() = oldParRun; + + // Start sending&receiving from buffers pBufs.finishedSends(); @@ -2064,6 +2070,9 @@ Foam::autoPtr Foam::fvMeshDistribute::distribute // Receive and add what was sent // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + oldParRun = UPstream::parRun(); + UPstream::parRun() = false; + forAll(nSendCells, sendProc) { // Did processor sendProc send anything to me? @@ -2371,6 +2380,7 @@ Foam::autoPtr Foam::fvMeshDistribute::distribute } } + UPstream::parRun() = oldParRun; // Print a bit. if (debug)