BUG: collated: correctly handle ascii writing. See #1545.

The collated container ('decomposedBlockData') is always binary
but the 'payload' might be ascii so use that header information
instead of the decomposeBlockData header.
This commit is contained in:
mattijs
2020-01-13 11:21:36 +00:00
parent 4e73d0e40e
commit b1a866c37c

View File

@ -658,7 +658,7 @@ Foam::autoPtr<Foam::ISstream> Foam::decomposedBlockData::readBlocks
Pstream::scatter(ok, Pstream::msgType(), comm); Pstream::scatter(ok, Pstream::msgType(), comm);
//- Set stream properties from isPtr on master //- Set stream properties from realIsPtr on master
// Scatter master header info // Scatter master header info
string ver; string ver;
@ -667,12 +667,12 @@ Foam::autoPtr<Foam::ISstream> Foam::decomposedBlockData::readBlocks
unsigned scalarByteSize; unsigned scalarByteSize;
if (UPstream::master(comm)) if (UPstream::master(comm))
{ {
ver = isPtr().version().str(); ver = realIsPtr().version().str();
OStringStream os; OStringStream os;
os << isPtr().format(); os << realIsPtr().format();
format = os.str(); format = os.str();
labelByteSize = isPtr().labelByteSize(); labelByteSize = realIsPtr().labelByteSize();
scalarByteSize = isPtr().scalarByteSize(); scalarByteSize = realIsPtr().scalarByteSize();
} }
Pstream::scatter(ver); //, Pstream::msgType(), comm); Pstream::scatter(ver); //, Pstream::msgType(), comm);
Pstream::scatter(format); //, Pstream::msgType(), comm); Pstream::scatter(format); //, Pstream::msgType(), comm);