Commit 935be5df authored by mattijs's avatar mattijs
Browse files

ENH: IOdictionary : transfer note() in masterOnly mode.

parent 7ae8dc48
...@@ -68,9 +68,8 @@ void Foam::IOdictionary::readFile(const bool masterOnly) ...@@ -68,9 +68,8 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
// Master reads headerclassname from file. Make sure this gets // Master reads headerclassname from file. Make sure this gets
// transfered as well as contents. // transfered as well as contents.
word masterClassName = headerClassName(); Pstream::scatter(comms, const_cast<word&>(headerClassName()));
Pstream::scatter(comms, masterClassName); Pstream::scatter(comms, note());
// Get my communication order // Get my communication order
const Pstream::commsStruct& myComm = comms[Pstream::myProcNo()]; const Pstream::commsStruct& myComm = comms[Pstream::myProcNo()];
...@@ -94,7 +93,6 @@ void Foam::IOdictionary::readFile(const bool masterOnly) ...@@ -94,7 +93,6 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
IOstream::ASCII IOstream::ASCII
); );
IOdictionary::readData(fromAbove); IOdictionary::readData(fromAbove);
const_cast<word&>(headerClassName()) = masterClassName;
} }
// Send to my downstairs neighbours // Send to my downstairs neighbours
......
...@@ -203,8 +203,8 @@ bool Foam::regIOobject::read() ...@@ -203,8 +203,8 @@ bool Foam::regIOobject::read()
// Master reads headerclassname from file. Make sure this gets // Master reads headerclassname from file. Make sure this gets
// transfered as well as contents. // transfered as well as contents.
word masterClassName = headerClassName(); Pstream::scatter(comms, const_cast<word&>(headerClassName()));
Pstream::scatter(comms, masterClassName); Pstream::scatter(comms, note());
// Get my communication order // Get my communication order
...@@ -231,7 +231,6 @@ bool Foam::regIOobject::read() ...@@ -231,7 +231,6 @@ bool Foam::regIOobject::read()
IOstream::ASCII IOstream::ASCII
); );
ok = readData(fromAbove); ok = readData(fromAbove);
const_cast<word&>(headerClassName()) = masterClassName;
} }
// Send to my downstairs neighbours // Send to my downstairs neighbours
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment