mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: collated format and writing of NURBS3DVolume CPs - see #1947
The if(Pstream::master()) clause in NURBS3DVolume::writeCpsInDict() was causing the fileName of the regIOobject not to be allocated in all processors, giving problems when masterUncollatedFileOperation::masterOp was called by collatedFileOperation::writeObject for the mkDirOp.
This commit is contained in:
@ -1912,31 +1912,28 @@ void Foam::NURBS3DVolume::writeCps(const fileName& baseName) const
|
||||
|
||||
void Foam::NURBS3DVolume::writeCpsInDict() const
|
||||
{
|
||||
if (Pstream::master())
|
||||
{
|
||||
IOdictionary cpsDict
|
||||
IOdictionary cpsDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name_ + "cpsBsplines" + mesh_.time().timeName(),
|
||||
mesh_.time().caseConstant(),
|
||||
cpsFolder_,
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
name_ + "cpsBsplines" + mesh_.time().timeName(),
|
||||
mesh_.time().caseConstant(),
|
||||
cpsFolder_,
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
cpsDict.add("controlPoints", cps_);
|
||||
cpsDict.add("controlPoints", cps_);
|
||||
|
||||
// Always write in ASCII, but allow compression
|
||||
cpsDict.regIOobject::writeObject
|
||||
(
|
||||
IOstreamOption(IOstream::ASCII, mesh_.time().writeCompression()),
|
||||
true
|
||||
);
|
||||
}
|
||||
// Always write in ASCII, but allow compression
|
||||
cpsDict.regIOobject::writeObject
|
||||
(
|
||||
IOstreamOption(IOstream::ASCII, mesh_.time().writeCompression()),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user