BUG: decomposedBlockData: fixed reconstruction problem

Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2744
This commit is contained in:
Henry Weller
2017-11-10 16:02:12 +00:00
committed by Andrew Heather
parent 5688340a05
commit e061de2c0a

View File

@ -904,8 +904,8 @@ bool Foam::decomposedBlockData::writeBlocks
labelPair masterData(startAndSize);
if (UPstream::master(comm))
{
label totalSize = 0;
label proci = masterData[0];
label totalSize = recvSizes[masterData[0]];
label proci = masterData[0]+1;
while
(
proci < nProcs
@ -923,7 +923,6 @@ bool Foam::decomposedBlockData::writeBlocks
masterData[1] = proci-masterData[0];
}
// Scatter masterData
UPstream::scatter
(
@ -935,7 +934,7 @@ bool Foam::decomposedBlockData::writeBlocks
comm
);
if (startAndSize[1] == 0)
if (startAndSize[0] == nProcs || startAndSize[1] == 0)
{
break;
}