diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C index 698ece2438..3feb342a7b 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -497,9 +497,9 @@ Foam::MeshedSurface::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 ); diff --git a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C index b1d38377a1..194c5b4195 100644 --- a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C +++ b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C @@ -153,9 +153,9 @@ void Foam::MeshedSurfaceProxy::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::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::write t.timeName(), surfMesh::meshSubDir, t, - IOobject::NO_READ, - IOobject::NO_WRITE, - IOobject::NO_REGISTER + IOobjectOption::NO_READ, + IOobjectOption::NO_WRITE, + IOobjectOption::NO_REGISTER ) ); diff --git a/src/surfMesh/polySurface/polySurface.C b/src/surfMesh/polySurface/polySurface.C index 37609d0e6a..553fce0d63 100644 --- a/src/surfMesh/polySurface/polySurface.C +++ b/src/surfMesh/polySurface/polySurface.C @@ -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 ) diff --git a/src/surfMesh/polySurface/polySurfaceTemplates.C b/src/surfMesh/polySurface/polySurfaceTemplates.C index e78f06f5e6..b557b44c40 100644 --- a/src/surfMesh/polySurface/polySurfaceTemplates.C +++ b/src/surfMesh/polySurface/polySurfaceTemplates.C @@ -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, diff --git a/src/surfMesh/readers/boundary/boundaryDataSurfaceReader.C b/src/surfMesh/readers/boundary/boundaryDataSurfaceReader.C index 4e28be30f7..6d365d93b1 100644 --- a/src/surfMesh/readers/boundary/boundaryDataSurfaceReader.C +++ b/src/surfMesh/readers/boundary/boundaryDataSurfaceReader.C @@ -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) ); diff --git a/src/surfMesh/readers/boundary/boundaryDataSurfaceReaderTemplates.C b/src/surfMesh/readers/boundary/boundaryDataSurfaceReaderTemplates.C index c19b7cf05c..9eef412029 100644 --- a/src/surfMesh/readers/boundary/boundaryDataSurfaceReaderTemplates.C +++ b/src/surfMesh/readers/boundary/boundaryDataSurfaceReaderTemplates.C @@ -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 rawData(io, IOobjectOption::READ_IF_PRESENT); + rawIOField rawData(io, IOobjectOption::LAZY_READ); if (rawData.hasAverage()) { diff --git a/src/surfMesh/readers/ensight/ensightSurfaceReader.C b/src/surfMesh/readers/ensight/ensightSurfaceReader.C index 394eebdcaf..e0515ec664 100644 --- a/src/surfMesh/readers/ensight/ensightSurfaceReader.C +++ b/src/surfMesh/readers/ensight/ensightSurfaceReader.C @@ -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); diff --git a/src/surfMesh/readers/ensight/ensightSurfaceReaderTemplates.C b/src/surfMesh/readers/ensight/ensightSurfaceReaderTemplates.C index 32d161afea..b64e05bb16 100644 --- a/src/surfMesh/readers/ensight/ensightSurfaceReaderTemplates.C +++ b/src/surfMesh/readers/ensight/ensightSurfaceReaderTemplates.C @@ -156,7 +156,7 @@ Foam::tmp> Foam::ensightSurfaceReader::readField } } - if (masterOnly_ && Pstream::parRun()) + if (masterOnly_ && UPstream::parRun()) { Pstream::broadcast(field, UPstream::worldComm); } diff --git a/src/surfMesh/surfMesh/surfMesh.C b/src/surfMesh/surfMesh/surfMesh.C index 2253f688a8..e04c5ab811 100644 --- a/src/surfMesh/surfMesh/surfMesh.C +++ b/src/surfMesh/surfMesh/surfMesh.C @@ -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() ) ) diff --git a/src/surfMesh/surfMesh/surfMeshIO.C b/src/surfMesh/surfMesh/surfMeshIO.C index 1554365237..4b5530e621 100644 --- a/src/surfMesh/surfMesh/surfMeshIO.C +++ b/src/surfMesh/surfMesh/surfMeshIO.C @@ -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 ) ); diff --git a/src/surfMesh/surfMesh/surfMeshTemplates.C b/src/surfMesh/surfMesh/surfMeshTemplates.C index 3f746d17d5..6bb6576710 100644 --- a/src/surfMesh/surfMesh/surfMeshTemplates.C +++ b/src/surfMesh/surfMesh/surfMeshTemplates.C @@ -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, diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C index 114f24e52a..555233d6e0 100644 --- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C @@ -114,9 +114,9 @@ bool Foam::fileFormats::VTKsurfaceFormat::read ( "vtk::surfaceFormat", *dummyTimePtr, - IOobject::NO_READ, - IOobject::NO_WRITE, - IOobject::NO_REGISTER + IOobjectOption::NO_READ, + IOobjectOption::NO_WRITE, + IOobjectOption::NO_REGISTER ) ); diff --git a/src/surfMesh/surfaceRegistry/surfaceRegistry.C b/src/surfMesh/surfaceRegistry/surfaceRegistry.C index 401b8cdd8f..49c38628b2 100644 --- a/src/surfMesh/surfaceRegistry/surfaceRegistry.C +++ b/src/surfMesh/surfaceRegistry/surfaceRegistry.C @@ -56,8 +56,8 @@ Foam::surfaceRegistry::surfaceRegistry obr.time().timeName(), prefix, obr, - IOobject::NO_READ, - IOobject::NO_WRITE + IOobjectOption::NO_READ, + IOobjectOption::NO_WRITE ) ) {} diff --git a/src/surfMesh/writers/abaqus/abaqusSurfaceWriter.C b/src/surfMesh/writers/abaqus/abaqusSurfaceWriter.C index f5166c6d70..ab7624bfcd 100644 --- a/src/surfMesh/writers/abaqus/abaqusSurfaceWriter.C +++ b/src/surfMesh/writers/abaqus/abaqusSurfaceWriter.C @@ -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())) { diff --git a/src/surfMesh/writers/abaqus/abaqusSurfaceWriter.H b/src/surfMesh/writers/abaqus/abaqusSurfaceWriter.H index cb406661ba..8f0b850a68 100644 --- a/src/surfMesh/writers/abaqus/abaqusSurfaceWriter.H +++ b/src/surfMesh/writers/abaqus/abaqusSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/abaqus/abaqusSurfaceWriterImpl.C b/src/surfMesh/writers/abaqus/abaqusSurfaceWriterImpl.C index df06f13694..b14c6cb7c9 100644 --- a/src/surfMesh/writers/abaqus/abaqusSurfaceWriterImpl.C +++ b/src/surfMesh/writers/abaqus/abaqusSurfaceWriterImpl.C @@ -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(); diff --git a/src/surfMesh/writers/boundary/boundaryDataSurfaceWriter.C b/src/surfMesh/writers/boundary/boundaryDataSurfaceWriter.C index ff76eccbcb..5fff14a196 100644 --- a/src/surfMesh/writers/boundary/boundaryDataSurfaceWriter.C +++ b/src/surfMesh/writers/boundary/boundaryDataSurfaceWriter.C @@ -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"); diff --git a/src/surfMesh/writers/boundary/boundaryDataSurfaceWriter.H b/src/surfMesh/writers/boundary/boundaryDataSurfaceWriter.H index 8e42d89ba7..893f8f234c 100644 --- a/src/surfMesh/writers/boundary/boundaryDataSurfaceWriter.H +++ b/src/surfMesh/writers/boundary/boundaryDataSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/common/surfaceWriter.C b/src/surfMesh/writers/common/surfaceWriter.C index 963aaa63c6..4efff2f1f3 100644 --- a/src/surfMesh/writers/common/surfaceWriter.C +++ b/src/surfMesh/writers/common/surfaceWriter.C @@ -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::surfaceWriter::mergeFieldTemplate const Field& fld ) const { - if (parallel_ && Pstream::parRun()) + if (parallel_ && UPstream::parRun()) { // Ensure geometry is also merged merge(); @@ -593,7 +592,7 @@ Foam::tmp> Foam::surfaceWriter::mergeFieldTemplate // Renumber (point data) to correspond to merged points if ( - Pstream::master() + UPstream::master() && this->isPointData() && mergedSurf_.pointsMap().size() ) diff --git a/src/surfMesh/writers/debug/debugSurfaceWriter.C b/src/surfMesh/writers/debug/debugSurfaceWriter.C index b0ab5cb7b5..e2dff9953f 100644 --- a/src/surfMesh/writers/debug/debugSurfaceWriter.C +++ b/src/surfMesh/writers/debug/debugSurfaceWriter.C @@ -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"); diff --git a/src/surfMesh/writers/debug/debugSurfaceWriter.H b/src/surfMesh/writers/debug/debugSurfaceWriter.H index cb64f2de99..b1228eb162 100644 --- a/src/surfMesh/writers/debug/debugSurfaceWriter.H +++ b/src/surfMesh/writers/debug/debugSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/ensight/ensightSurfaceWriter.H b/src/surfMesh/writers/ensight/ensightSurfaceWriter.H index e7f3a3b8f7..e0c3a4b316 100644 --- a/src/surfMesh/writers/ensight/ensightSurfaceWriter.H +++ b/src/surfMesh/writers/ensight/ensightSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/ensight/ensightSurfaceWriterCollated.C b/src/surfMesh/writers/ensight/ensightSurfaceWriterCollated.C index 93512c1cb9..378ee23109 100644 --- a/src/surfMesh/writers/ensight/ensightSurfaceWriterCollated.C +++ b/src/surfMesh/writers/ensight/ensightSurfaceWriterCollated.C @@ -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())) { diff --git a/src/surfMesh/writers/ensight/ensightSurfaceWriterUncollated.C b/src/surfMesh/writers/ensight/ensightSurfaceWriterUncollated.C index d43ac824a9..6e1f65f682 100644 --- a/src/surfMesh/writers/ensight/ensightSurfaceWriterUncollated.C +++ b/src/surfMesh/writers/ensight/ensightSurfaceWriterUncollated.C @@ -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())) { diff --git a/src/surfMesh/writers/foam/foamSurfaceWriter.C b/src/surfMesh/writers/foam/foamSurfaceWriter.C index 4dcf5dadc5..46656f8bd5 100644 --- a/src/surfMesh/writers/foam/foamSurfaceWriter.C +++ b/src/surfMesh/writers/foam/foamSurfaceWriter.C @@ -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())) { diff --git a/src/surfMesh/writers/foam/foamSurfaceWriter.H b/src/surfMesh/writers/foam/foamSurfaceWriter.H index 67b01f9060..e35bc97ad2 100644 --- a/src/surfMesh/writers/foam/foamSurfaceWriter.H +++ b/src/surfMesh/writers/foam/foamSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/nastran/nastranSurfaceWriter.C b/src/surfMesh/writers/nastran/nastranSurfaceWriter.C index b1b2c7be57..e2e0534264 100644 --- a/src/surfMesh/writers/nastran/nastranSurfaceWriter.C +++ b/src/surfMesh/writers/nastran/nastranSurfaceWriter.C @@ -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())) { diff --git a/src/surfMesh/writers/nastran/nastranSurfaceWriter.H b/src/surfMesh/writers/nastran/nastranSurfaceWriter.H index 15d51da629..1cc4a4d8d2 100644 --- a/src/surfMesh/writers/nastran/nastranSurfaceWriter.H +++ b/src/surfMesh/writers/nastran/nastranSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/nastran/nastranSurfaceWriterImpl.C b/src/surfMesh/writers/nastran/nastranSurfaceWriterImpl.C index 54c0c09e7e..543b7c97fe 100644 --- a/src/surfMesh/writers/nastran/nastranSurfaceWriterImpl.C +++ b/src/surfMesh/writers/nastran/nastranSurfaceWriterImpl.C @@ -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(); diff --git a/src/surfMesh/writers/null/nullSurfaceWriter.H b/src/surfMesh/writers/null/nullSurfaceWriter.H index f147b109a4..ef1294141f 100644 --- a/src/surfMesh/writers/null/nullSurfaceWriter.H +++ b/src/surfMesh/writers/null/nullSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/proxy/proxySurfaceWriter.C b/src/surfMesh/writers/proxy/proxySurfaceWriter.C index 5d47ca9a3b..9491b8c537 100644 --- a/src/surfMesh/writers/proxy/proxySurfaceWriter.C +++ b/src/surfMesh/writers/proxy/proxySurfaceWriter.C @@ -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())) { diff --git a/src/surfMesh/writers/proxy/proxySurfaceWriter.H b/src/surfMesh/writers/proxy/proxySurfaceWriter.H index 5e395ef159..2530352baf 100644 --- a/src/surfMesh/writers/proxy/proxySurfaceWriter.H +++ b/src/surfMesh/writers/proxy/proxySurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/raw/rawSurfaceWriter.C b/src/surfMesh/writers/raw/rawSurfaceWriter.C index a124a6a22f..7e8c3c3635 100644 --- a/src/surfMesh/writers/raw/rawSurfaceWriter.C +++ b/src/surfMesh/writers/raw/rawSurfaceWriter.C @@ -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(); diff --git a/src/surfMesh/writers/raw/rawSurfaceWriter.H b/src/surfMesh/writers/raw/rawSurfaceWriter.H index 2601a8fcd2..40d6e4493b 100644 --- a/src/surfMesh/writers/raw/rawSurfaceWriter.H +++ b/src/surfMesh/writers/raw/rawSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/raw/rawSurfaceWriterImpl.C b/src/surfMesh/writers/raw/rawSurfaceWriterImpl.C index 5109b8f9ea..4f5e5f31a2 100644 --- a/src/surfMesh/writers/raw/rawSurfaceWriterImpl.C +++ b/src/surfMesh/writers/raw/rawSurfaceWriterImpl.C @@ -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(); diff --git a/src/surfMesh/writers/starcd/starcdSurfaceWriter.C b/src/surfMesh/writers/starcd/starcdSurfaceWriter.C index 1cdeb8ac09..2f193ce8fd 100644 --- a/src/surfMesh/writers/starcd/starcdSurfaceWriter.C +++ b/src/surfMesh/writers/starcd/starcdSurfaceWriter.C @@ -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(); diff --git a/src/surfMesh/writers/starcd/starcdSurfaceWriter.H b/src/surfMesh/writers/starcd/starcdSurfaceWriter.H index c174012925..f6401616fb 100644 --- a/src/surfMesh/writers/starcd/starcdSurfaceWriter.H +++ b/src/surfMesh/writers/starcd/starcdSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/vtk/vtkSurfaceWriter.C b/src/surfMesh/writers/vtk/vtkSurfaceWriter.C index 197f0dcc0b..29e0b9c478 100644 --- a/src/surfMesh/writers/vtk/vtkSurfaceWriter.C +++ b/src/surfMesh/writers/vtk/vtkSurfaceWriter.C @@ -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()) { diff --git a/src/surfMesh/writers/vtk/vtkSurfaceWriter.H b/src/surfMesh/writers/vtk/vtkSurfaceWriter.H index ef17661fce..503f43494f 100644 --- a/src/surfMesh/writers/vtk/vtkSurfaceWriter.H +++ b/src/surfMesh/writers/vtk/vtkSurfaceWriter.H @@ -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() ); diff --git a/src/surfMesh/writers/x3d/x3dSurfaceWriter.C b/src/surfMesh/writers/x3d/x3dSurfaceWriter.C index 85aaf31321..8a2dfa71b2 100644 --- a/src/surfMesh/writers/x3d/x3dSurfaceWriter.C +++ b/src/surfMesh/writers/x3d/x3dSurfaceWriter.C @@ -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(); diff --git a/src/surfMesh/writers/x3d/x3dSurfaceWriter.H b/src/surfMesh/writers/x3d/x3dSurfaceWriter.H index 1295194adb..7d88c459a5 100644 --- a/src/surfMesh/writers/x3d/x3dSurfaceWriter.H +++ b/src/surfMesh/writers/x3d/x3dSurfaceWriter.H @@ -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() );