STYLE: update surface writers to use UPstream, IOobjectOption naming

This commit is contained in:
Mark Olesen 2023-07-05 20:40:18 +02:00
parent 7a29eb9b3b
commit 63753605a0
41 changed files with 152 additions and 153 deletions

View File

@ -497,9 +497,9 @@ Foam::MeshedSurface<Face>::MeshedSurface
"dummyName",
runTime.timeName(),
runTime,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::MUST_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
),
surfName
);

View File

@ -153,9 +153,9 @@ void Foam::MeshedSurfaceProxy<Face>::write
t.timeName(),
surfMesh::meshSubDir,
t,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
@ -179,9 +179,9 @@ void Foam::MeshedSurfaceProxy<Face>::write
t.timeName(),
surfMesh::meshSubDir,
t,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
@ -212,9 +212,9 @@ void Foam::MeshedSurfaceProxy<Face>::write
t.timeName(),
surfMesh::meshSubDir,
t,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);

View File

@ -91,9 +91,9 @@ Foam::polySurface::polySurface(const IOobject& io, bool doCheckIn)
io.name(),
io.db().time().constant(),
io.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::REGISTER
)
),
MeshReference(faceList(), pointField()),
@ -122,9 +122,9 @@ Foam::polySurface::polySurface
surfName,
obr.time().constant(),
obr,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::REGISTER
),
doCheckIn
)

View File

@ -117,9 +117,9 @@ void Foam::polySurface::storeField
(
fieldName,
fieldDb,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::REGISTER
),
*this,
dims,
@ -158,9 +158,9 @@ void Foam::polySurface::storeField
(
fieldName,
fieldDb,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::REGISTER
),
*this,
dims,

View File

@ -64,9 +64,9 @@ Foam::pointField Foam::boundaryDataSurfaceReader::readPoints
(
pointsFile, // absolute path
runTime,
IOobject::MUST_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER,
IOobjectOption::MUST_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER,
true // global object (currently not used)
);

View File

@ -51,9 +51,9 @@ Foam::boundaryDataSurfaceReader::readField
(
valuesFile, // absolute path
runTime,
IOobject::MUST_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER,
IOobjectOption::MUST_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER,
true // global object (currently not used)
);
@ -61,7 +61,7 @@ Foam::boundaryDataSurfaceReader::readField
<< "File: " << io.objectPath() << endl;
// Read data (TDB: setAverage)
rawIOField<Type> rawData(io, IOobjectOption::READ_IF_PRESENT);
rawIOField<Type> rawData(io, IOobjectOption::LAZY_READ);
if (rawData.hasAverage())
{

View File

@ -346,7 +346,7 @@ Foam::ensightSurfaceReader::ensightSurfaceReader
surfaceReader(fName, options),
masterOnly_
(
Pstream::parRun()
UPstream::parRun()
&& options.getOrDefault("masterOnly", false)
),
readFormat_(IOstreamOption::ASCII), // Placeholder value
@ -371,7 +371,7 @@ Foam::ensightSurfaceReader::ensightSurfaceReader
readCase(is);
}
if (masterOnly_ && Pstream::parRun())
if (masterOnly_ && UPstream::parRun())
{
Pstream::broadcasts
(
@ -644,7 +644,7 @@ const Foam::meshedSurface& Foam::ensightSurfaceReader::geometry
surf = readGeometry(geomFile);
}
if (masterOnly_ && Pstream::parRun())
if (masterOnly_ && UPstream::parRun())
{
// Note: don't need faceTypeInfo_ on (non-reading) ranks
Pstream::broadcast(surf, UPstream::worldComm);

View File

@ -156,7 +156,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField
}
}
if (masterOnly_ && Pstream::parRun())
if (masterOnly_ && UPstream::parRun())
{
Pstream::broadcast(field, UPstream::worldComm);
}

View File

@ -96,8 +96,8 @@ Foam::surfMesh::surfMesh(const IOobject& io, const word& surfName)
time().findInstance(meshDir(), "points"),
meshSubDir,
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE
IOobjectOption::MUST_READ,
IOobjectOption::NO_WRITE
),
IOobject
(
@ -105,8 +105,8 @@ Foam::surfMesh::surfMesh(const IOobject& io, const word& surfName)
time().findInstance(meshDir(), "faces"),
meshSubDir,
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE
IOobjectOption::MUST_READ,
IOobjectOption::NO_WRITE
)
),
MeshReference(this->storedIOFaces(), this->storedIOPoints()),
@ -119,8 +119,8 @@ Foam::surfMesh::surfMesh(const IOobject& io, const word& surfName)
time().findInstance(meshDir(), "surfZones"),
meshSubDir,
*this,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
IOobjectOption::LAZY_READ,
IOobjectOption::NO_WRITE
)
)
{}
@ -141,8 +141,8 @@ Foam::surfMesh::surfMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
IOobject::NO_WRITE
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE
),
IOobject
(
@ -150,8 +150,8 @@ Foam::surfMesh::surfMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
IOobject::NO_WRITE
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE
)
),
MeshReference(this->storedIOFaces(), this->storedIOPoints()),
@ -164,8 +164,8 @@ Foam::surfMesh::surfMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
IOobject::NO_WRITE
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE
)
)
{}
@ -187,7 +187,7 @@ Foam::surfMesh::surfMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
IOobjectOption::NO_READ,
io.writeOpt()
),
IOobject
@ -196,7 +196,7 @@ Foam::surfMesh::surfMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
IOobjectOption::NO_READ,
io.writeOpt()
)
),
@ -210,7 +210,7 @@ Foam::surfMesh::surfMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
IOobjectOption::NO_READ,
io.writeOpt()
)
)

View File

@ -90,9 +90,9 @@ Foam::surfMesh::readUpdateState Foam::surfMesh::readUpdate()
pointsInst,
meshSubDir,
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::MUST_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
@ -104,9 +104,9 @@ Foam::surfMesh::readUpdateState Foam::surfMesh::readUpdate()
facesInst,
meshSubDir,
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::MUST_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
@ -119,9 +119,9 @@ Foam::surfMesh::readUpdateState Foam::surfMesh::readUpdate()
facesInst,
meshSubDir,
*this,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::LAZY_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
@ -174,9 +174,9 @@ Foam::surfMesh::readUpdateState Foam::surfMesh::readUpdate()
pointsInst,
meshSubDir,
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::MUST_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);

View File

@ -56,9 +56,9 @@ void Foam::surfMesh::storeField
(
fieldName,
fieldDb,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::REGISTER
),
*this,
dims,
@ -96,9 +96,9 @@ void Foam::surfMesh::storeField
(
fieldName,
fieldDb,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::REGISTER
),
*this,
dims,

View File

@ -114,9 +114,9 @@ bool Foam::fileFormats::VTKsurfaceFormat<Face>::read
(
"vtk::surfaceFormat",
*dummyTimePtr,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);

View File

@ -56,8 +56,8 @@ Foam::surfaceRegistry::surfaceRegistry
obr.time().timeName(),
prefix,
obr,
IOobject::NO_READ,
IOobject::NO_WRITE
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE
)
)
{}

View File

@ -329,7 +329,7 @@ Foam::fileName Foam::surfaceWriters::abaqusWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputFile.path()))
{

View File

@ -188,7 +188,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -198,7 +198,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -129,7 +129,7 @@ Foam::fileName Foam::surfaceWriters::abaqusWriter::writeTemplate
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
const auto& values = tfield();

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015 OpenFOAM Foundation
Copyright (C) 2015-2022 OpenCFD Ltd.
Copyright (C) 2015-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -169,9 +169,9 @@ void Foam::surfaceWriters::boundaryDataWriter::serialWriteGeometry
(
iopts.objectPath().path()/"normal",
iopts.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
iofld.note() = "face data";
@ -208,7 +208,7 @@ Foam::fileName Foam::surfaceWriters::boundaryDataWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(surfaceDir))
{
@ -222,9 +222,9 @@ Foam::fileName Foam::surfaceWriters::boundaryDataWriter::write()
(
surfaceDir/"points",
*timePtr,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
iopts.note() = (this->isPointData() ? "point data" : "face data");
@ -270,7 +270,7 @@ Foam::fileName Foam::surfaceWriters::boundaryDataWriter::writeTemplate
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputFile.path()))
{
@ -285,9 +285,9 @@ Foam::fileName Foam::surfaceWriters::boundaryDataWriter::writeTemplate
(
surfaceDir/"points",
*timePtr,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
iopts.note() = (this->isPointData() ? "point data" : "face data");
@ -303,9 +303,9 @@ Foam::fileName Foam::surfaceWriters::boundaryDataWriter::writeTemplate
(
outputFile,
*timePtr,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
iofld.note() = (this->isPointData() ? "point data" : "face data");

View File

@ -204,7 +204,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -214,7 +214,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -360,7 +360,7 @@ void Foam::surfaceWriter::setSurface
{
expire();
surf_.reset(surf);
parallel_ = (parallel && Pstream::parRun());
parallel_ = (parallel && UPstream::parRun());
}
@ -373,7 +373,7 @@ void Foam::surfaceWriter::setSurface
{
expire();
surf_.reset(points, faces);
parallel_ = (parallel && Pstream::parRun());
parallel_ = (parallel && UPstream::parRun());
}
@ -466,7 +466,7 @@ bool Foam::surfaceWriter::merge() const
// Similar to expire
adjustedSurf_.clear();
if (parallel_ && Pstream::parRun())
if (parallel_ && UPstream::parRun())
{
changed = mergedSurf_.merge(surf_, mergeDim_);
}
@ -474,15 +474,14 @@ bool Foam::surfaceWriter::merge() const
{
mergedSurf_.clear();
}
if (changed)
{
wroteGeom_ = false;
}
}
upToDate_ = true;
if (changed)
{
wroteGeom_ = false;
}
return changed;
}
@ -491,7 +490,7 @@ const Foam::meshedSurf& Foam::surfaceWriter::surface() const
{
merge();
if (parallel_ && Pstream::parRun())
if (parallel_ && UPstream::parRun())
{
return mergedSurf_;
}
@ -563,7 +562,7 @@ Foam::tmp<Foam::Field<Type>> Foam::surfaceWriter::mergeFieldTemplate
const Field<Type>& fld
) const
{
if (parallel_ && Pstream::parRun())
if (parallel_ && UPstream::parRun())
{
// Ensure geometry is also merged
merge();
@ -593,7 +592,7 @@ Foam::tmp<Foam::Field<Type>> Foam::surfaceWriter::mergeFieldTemplate
// Renumber (point data) to correspond to merged points
if
(
Pstream::master()
UPstream::master()
&& this->isPointData()
&& mergedSurf_.pointsMap().size()
)

View File

@ -267,7 +267,7 @@ Foam::fileName Foam::surfaceWriters::debugWriter::write()
Info<< "Not writing: " << surf.faces().size() << " faces" << nl;
}
if (enableWrite_ && (Pstream::master() || !parallel_))
if (enableWrite_ && (UPstream::master() || !parallel_))
{
if (!isDir(surfaceDir))
{
@ -281,9 +281,9 @@ Foam::fileName Foam::surfaceWriters::debugWriter::write()
(
surfaceDir/"points",
*dummyTimePtr,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
iopts.note() = (this->isPointData() ? "point data" : "face data");
@ -334,7 +334,7 @@ Foam::fileName Foam::surfaceWriters::debugWriter::writeTemplate
const meshedSurf& surf = surface();
// const meshedSurfRef& surf = adjustSurface();
if (enableWrite_ && (Pstream::master() || !parallel_))
if (enableWrite_ && (UPstream::master() || !parallel_))
{
if (!isDir(outputFile.path()))
{
@ -349,9 +349,9 @@ Foam::fileName Foam::surfaceWriters::debugWriter::writeTemplate
(
surfaceDir/"points",
*dummyTimePtr,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
iopts.note() = (this->isPointData() ? "point data" : "face data");
@ -367,9 +367,9 @@ Foam::fileName Foam::surfaceWriters::debugWriter::writeTemplate
(
outputFile,
*dummyTimePtr,
IOobject::NO_READ,
IOobject::NO_WRITE,
IOobject::NO_REGISTER
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
IOobjectOption::NO_REGISTER
)
);
iofld.note() = (this->isPointData() ? "point data" : "face data");

View File

@ -129,7 +129,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -139,7 +139,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -145,7 +145,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -155,7 +155,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -97,7 +97,7 @@ Foam::fileName Foam::surfaceWriters::ensightWriter::writeCollated
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputFile.path()))
{

View File

@ -62,7 +62,7 @@ Foam::fileName Foam::surfaceWriters::ensightWriter::writeUncollated()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputDir))
{
@ -164,7 +164,7 @@ Foam::fileName Foam::surfaceWriters::ensightWriter::writeUncollated
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputFile.path()))
{

View File

@ -122,7 +122,7 @@ Foam::fileName Foam::surfaceWriters::foamWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
const pointField& points = surf.points();
const faceList& faces = surf.faces();
@ -203,7 +203,7 @@ Foam::fileName Foam::surfaceWriters::foamWriter::writeTemplate
}
if (Pstream::master())
if (UPstream::master())
{
if (!isDir(outputFile.path()))
{

View File

@ -149,7 +149,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -159,7 +159,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -412,7 +412,7 @@ Foam::fileName Foam::surfaceWriters::nastranWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputFile.path()))
{

View File

@ -232,7 +232,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -242,7 +242,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -235,7 +235,7 @@ Foam::fileName Foam::surfaceWriters::nastranWriter::writeTemplate
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
const auto& values = tfield();

View File

@ -73,7 +73,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -83,7 +83,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -128,7 +128,7 @@ Foam::fileName Foam::surfaceWriters::proxyWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputFile.path()))
{

View File

@ -112,7 +112,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -122,7 +122,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -138,7 +138,7 @@ Foam::fileName Foam::surfaceWriters::rawWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
const pointField& points = surf.points();
const faceList& faces = surf.faces();

View File

@ -148,7 +148,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -158,7 +158,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -117,7 +117,7 @@ Foam::fileName Foam::surfaceWriters::rawWriter::writeTemplate
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
const auto& values = tfield();
const pointField& points = surf.points();

View File

@ -140,7 +140,7 @@ Foam::fileName Foam::surfaceWriters::starcdWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputFile.path()))
{
@ -219,7 +219,7 @@ Foam::fileName Foam::surfaceWriters::starcdWriter::writeTemplate
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
const auto& values = tfield();

View File

@ -135,7 +135,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -145,7 +145,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -215,7 +215,7 @@ Foam::fileName Foam::surfaceWriters::vtkWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (!writer_ && (Pstream::master() || !parallel_))
if (!writer_ && (UPstream::master() || !parallel_))
{
writer_.reset
(
@ -295,7 +295,7 @@ Foam::fileName Foam::surfaceWriters::vtkWriter::writeTemplate
}
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!nFields_ && writer_->legacy())
{

View File

@ -159,7 +159,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -170,7 +170,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);

View File

@ -217,7 +217,7 @@ Foam::fileName Foam::surfaceWriters::x3dWriter::write()
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
if (!isDir(outputFile.path()))
{
@ -282,7 +282,7 @@ Foam::fileName Foam::surfaceWriters::x3dWriter::writeTemplate
// const meshedSurf& surf = surface();
const meshedSurfRef& surf = adjustSurface();
if (Pstream::master() || !parallel_)
if (UPstream::master() || !parallel_)
{
const auto& values = tfield();

View File

@ -137,7 +137,7 @@ public:
(
const meshedSurf& surf,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);
@ -147,7 +147,7 @@ public:
const pointField& points,
const faceList& faces,
const fileName& outputPath,
bool parallel = Pstream::parRun(),
bool parallel = UPstream::parRun(),
const dictionary& options = dictionary()
);