Permalink
Browse files

BUG: fvMeshDistribute: disable fvPatchField reading triggering proces…

…sor comms

fixedGradientFvPatchField does evaluate() upon reading which triggers
deltaCoeffs building which does parallel comms# Please enter the commit message for your changes. Lines starting
  • Loading branch information...
1 parent 55b8e88 commit b7c76dcf7b9685d99a0be78608cc5f3861d06732 mattijs committed Nov 23, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
@@ -1818,6 +1818,9 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> 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::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
}
+ UPstream::parRun() = oldParRun;
+
+
// Start sending&receiving from buffers
pBufs.finishedSends();
@@ -2064,6 +2070,9 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> 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::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
}
}
+ UPstream::parRun() = oldParRun;
// Print a bit.
if (debug)

0 comments on commit b7c76dc

Please sign in to comment.