twoPhaseMixtureThermo: Fix for collated file operation

twoPhaseMixtureThermo writes the temperatures during construction only
for them to be read again immediately after by construction of the
individual phases' thermo models. When running with collated file
handling this behaviour is not thread safe. This change deactivates
threading for the duration of this behaviour.

Patch contributed by Mattijs Janssens
This commit is contained in:
Will Bainbridge
2018-06-14 10:55:27 +01:00
committed by mattijs
parent 6fb5c1f59a
commit 70bc72c2df
7 changed files with 74 additions and 15 deletions

View File

@ -938,7 +938,7 @@ bool Foam::decomposedBlockData::writeBlocks
label startProc = 1;
label nSendProcs = nProcs-1;
while (nSendProcs > 0)
while (nSendProcs > 0 && startProc < nProcs)
{
nSendProcs = calcNumProcs
(
@ -952,7 +952,7 @@ bool Foam::decomposedBlockData::writeBlocks
startProc
);
if (startProc == nProcs || nSendProcs == 0)
if (nSendProcs == 0)
{
break;
}