Add brackets around send/receive of fields for better scoping in load balance comms

This commit is contained in:
Hrvoje Jasak 2018-10-24 17:15:19 +01:00
parent 556b9c0731
commit d23e612f80

View file

@ -36,7 +36,7 @@ void Foam::topoChangerFvMesh::sendFields
) const ) const
{ {
// Send number of fields // Send number of fields
toProc<< geoFields.size() << nl; toProc<< geoFields.size() << nl << token::BEGIN_LIST << nl;
label fI = 0; label fI = 0;
@ -57,6 +57,7 @@ void Foam::topoChangerFvMesh::sendFields
fI++; fI++;
} }
toProc<< token::END_LIST << nl << nl;
} }
@ -124,6 +125,8 @@ void Foam::topoChangerFvMesh::receiveFields
receivedFields.setSize(nScalarFields); receivedFields.setSize(nScalarFields);
fromProc.readBegin("topoChangerFvMeshReceiveFields");
forAll (receivedFields, fI) forAll (receivedFields, fI)
{ {
word fieldName(fromProc); word fieldName(fromProc);
@ -148,6 +151,8 @@ void Foam::topoChangerFvMesh::receiveFields
) )
); );
} }
fromProc.readEnd("topoChangerFvMeshReceiveFields");
} }