From a7e8a43f4a4b3b76a44c6961f3d57ce79174f00a Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Wed, 9 Apr 2025 14:23:49 +0200 Subject: [PATCH] ENH: add writeContents() static methods for IOList etc. - encapsulates IOListRef etc into a simpler syntax ENH: use UList instead of refPtr for IOListRef (avoids List cast etc) --- applications/test/IOField/Test-IOField.cxx | 4 +-- .../manipulation/checkMesh/checkTopology.C | 16 +++------- .../manipulation/renumberMesh/renumberMesh.C | 8 ++--- .../decomposePar/domainDecomposition.C | 17 +++++------ .../reconstructParMesh/reconstructParMesh.C | 8 ++--- .../redistributePar/redistributePar.C | 29 +++++++------------ src/OpenFOAM/db/IOobjects/IOList/IOList.C | 23 +++++++++++++-- src/OpenFOAM/db/IOobjects/IOList/IOList.H | 17 ++++++----- .../mapDistribute/IOmapDistributePolyMesh.C | 19 +++++++++++- .../mapDistribute/IOmapDistributePolyMesh.H | 13 ++++++++- src/conversion/ccm/reader/ccmReader.H | 2 +- src/conversion/ccm/reader/ccmReaderAux.C | 2 +- src/conversion/common/reader/meshReader.H | 2 +- src/conversion/common/reader/meshReaderAux.C | 2 +- .../polyTopoChange/hexRef8/hexRef8Data.C | 4 +-- .../polyTopoChange/hexRef8/hexRef8Data.H | 4 +-- .../faDecompose/faMeshDecomposition.C | 10 +++---- .../faReconstruct/faMeshReconstructor.C | 12 ++++---- 18 files changed, 110 insertions(+), 82 deletions(-) diff --git a/applications/test/IOField/Test-IOField.cxx b/applications/test/IOField/Test-IOField.cxx index 96f91d5e7e5..e9f6123e405 100644 --- a/applications/test/IOField/Test-IOField.cxx +++ b/applications/test/IOField/Test-IOField.cxx @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation - Copyright (C) 2019-2022 OpenCFD Ltd. + Copyright (C) 2019-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -269,7 +269,7 @@ int main(int argc, char *argv[]) ioOutput.rename(args.executable() + "-labels"); Info<< "write " << ioOutput.objectRelPath() << endl; { - IOListRef<label>(ioOutput, ints).write(); + IOList<label>::writeContents(ioOutput, ints); } ioOutput.rename(args.executable() + "-points"); diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index 1c2decf3c23..8842ee73c9d 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2023 OpenCFD Ltd. + Copyright (C) 2017-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -700,19 +700,11 @@ Foam::label Foam::checkTopology << mesh.time().timeName()/"cellToRegion" << endl; - IOListRef<label> + IOList<label>::writeContents ( - IOobject - ( - "cellToRegion", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - IOobject::NO_REGISTER - ), + IOobject("cellToRegion", mesh.time().timeName(), mesh), rs - ).write(); + ); // Points in multiple regions diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 9a3eb426477..c5763634bd3 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2024 OpenCFD Ltd. + Copyright (C) 2016-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1913,13 +1913,13 @@ int main(int argc, char *argv[]) ); meshMapIO.resetHeader("cellMap"); - IOListRef<label>(meshMapIO, map().cellMap()).write(); + IOList<label>::writeContents(meshMapIO, map().cellMap()); meshMapIO.resetHeader("faceMap"); - IOListRef<label>(meshMapIO, map().faceMap()).write(); + IOList<label>::writeContents(meshMapIO, map().faceMap()); meshMapIO.resetHeader("pointMap"); - IOListRef<label>(meshMapIO, map().pointMap()).write(); + IOList<label>::writeContents(meshMapIO, map().pointMap()); } } diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index b77f2777fb3..36967082146 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019-2024 OpenCFD Ltd. + Copyright (C) 2019-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -846,12 +846,9 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) "boundaryProcAddressing", procMesh.facesInstance(), polyMesh::meshSubDir/pointMesh::meshSubDir, - procPointMesh.thisDb(), - IOobject::NO_READ, - IOobject::NO_WRITE, - IOobject::NO_REGISTER + procPointMesh.thisDb() ); - IOListRef<label>(ioAddr, boundaryProcAddressing).write(); + IOList<label>::writeContents(ioAddr, boundaryProcAddressing); } } @@ -1013,15 +1010,15 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) // pointProcAddressing ioAddr.rename("pointProcAddressing"); - IOListRef<label>(ioAddr, procPointAddressing_[proci]).write(); + IOList<label>::writeContents(ioAddr, procPointAddressing_[proci]); // faceProcAddressing ioAddr.rename("faceProcAddressing"); - IOListRef<label>(ioAddr, procFaceAddressing_[proci]).write(); + IOList<label>::writeContents(ioAddr, procFaceAddressing_[proci]); // cellProcAddressing ioAddr.rename("cellProcAddressing"); - IOListRef<label>(ioAddr, procCellAddressing_[proci]).write(); + IOList<label>::writeContents(ioAddr, procCellAddressing_[proci]); // Write patch map for backwards compatibility. // (= identity map for original patches, -1 for processor patches) @@ -1031,7 +1028,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) // boundaryProcAddressing ioAddr.rename("boundaryProcAddressing"); - IOListRef<label>(ioAddr, procBoundaryAddr).write(); + IOList<label>::writeContents(ioAddr, procBoundaryAddr); } diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 56eaa1d4d9c..d4611d3f25b 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2024 OpenCFD Ltd. + Copyright (C) 2016-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -502,7 +502,7 @@ void writeMaps Info<< " pointProcAddressing" << endl; ioAddr.rename("pointProcAddressing"); - IOListRef<label>(ioAddr, pointProcAddressing).write(); + IOList<label>::writeContents(ioAddr, pointProcAddressing); // From processor face to reconstructed mesh face Info<< " faceProcAddressing" << endl; @@ -551,13 +551,13 @@ void writeMaps // From processor cell to reconstructed mesh cell Info<< " cellProcAddressing" << endl; ioAddr.rename("cellProcAddressing"); - IOListRef<label>(ioAddr, cellProcAddressing).write(); + IOList<label>::writeContents(ioAddr, cellProcAddressing); // From processor patch to reconstructed mesh patch Info<< " boundaryProcAddressing" << endl; ioAddr.rename("boundaryProcAddressing"); - IOListRef<label>(ioAddr, boundProcAddressing).write(); + IOList<label>::writeContents(ioAddr, boundProcAddressing); Info<< endl; } diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 305ec95aca6..4ac8fd1acb6 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2024 OpenCFD Ltd. + Copyright (C) 2015-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -461,19 +461,12 @@ void writeDecomposition { // Write the decomposition as labelList for use with 'manual' // decomposition method. - IOListRef<label> + IOList<label>::writeContents ( - IOobject - ( - "cellDecomposition", - mesh.facesInstance(), // mesh read from facesInstance - mesh, - IOobjectOption::NO_READ, - IOobjectOption::NO_WRITE, - IOobjectOption::NO_REGISTER - ), + // NB: mesh read from facesInstance + IOobject("cellDecomposition", mesh.facesInstance(), mesh), decomp - ).write(); + ); InfoOrPout << "Writing wanted cell distribution to volScalarField " << name @@ -991,7 +984,8 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite polyMesh::meshSubDir, mesh.thisDb(), IOobjectOption::NO_READ, - IOobjectOption::AUTO_WRITE + IOobjectOption::AUTO_WRITE, + IOobjectOption::REGISTER ), distMap() ); @@ -3029,20 +3023,17 @@ int main(int argc, char *argv[]) { auto oldHandler = fileOperation::fileHandler(writeHandler); - IOmapDistributePolyMeshRef + IOmapDistributePolyMesh::writeContents ( IOobject ( "procAddressing", areaProcMeshPtr->facesInstance(), faMesh::meshSubDir, - areaProcMeshPtr->thisDb(), - IOobjectOption::NO_READ, - IOobjectOption::NO_WRITE, - IOobjectOption::NO_REGISTER + areaProcMeshPtr->thisDb() ), faDistMap - ).write(); + ); areaProcMeshPtr->write(); diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.C b/src/OpenFOAM/db/IOobjects/IOList/IOList.C index a6a0bbb2002..1e535c861d4 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.C +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2024 OpenCFD Ltd. + Copyright (C) 2016-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -118,7 +118,7 @@ template<class T> Foam::IOListRef<T>::IOListRef ( const IOobject& io, - const List<T>& content + const UList<T>& content ) : regIOobject(io), @@ -143,6 +143,23 @@ Foam::List<T> Foam::IOList<T>::readContents(const IOobject& io) } +template<class T> +void Foam::IOList<T>::writeContents +( + const IOobject& io, + const UList<T>& content +) +{ + IOListRef<T> writer + ( + IOobject(io, IOobjectOption::NO_REGISTER), + content + ); + + writer.write(); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class T> @@ -156,7 +173,7 @@ bool Foam::IOList<T>::writeData(Ostream& os) const template<class T> bool Foam::IOListRef<T>::writeData(Ostream& os) const { - os << contentRef_.cref(); + os << contentRef_; return os.good(); } diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.H b/src/OpenFOAM/db/IOobjects/IOList/IOList.H index 636fab73dbb..40f62c6d032 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.H +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018-2024 OpenCFD Ltd. + Copyright (C) 2018-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -96,6 +96,10 @@ public: //- Read and return contents. The IOobject is never registered static List<T> readContents(const IOobject& io); + //- Write contents. The IOobject is never registered. + // Uses IOListRef internally. + static void writeContents(const IOobject& io, const UList<T>& content); + //- Destructor virtual ~IOList() = default; @@ -121,7 +125,7 @@ public: Class IOListRef Declaration \*---------------------------------------------------------------------------*/ -//- A IOList wrapper for writing external data. +//- A IOList wrapper for writing external List data template<class T> class IOListRef : @@ -130,7 +134,7 @@ class IOListRef // Private Data //- Reference to the external content - refPtr<List<T>> contentRef_; + UList<T> contentRef_; public: @@ -161,7 +165,7 @@ public: // Constructors //- Construct from IOobject and const data reference - IOListRef(const IOobject& io, const List<T>& content); + IOListRef(const IOobject& io, const UList<T>& content); //- Destructor @@ -171,10 +175,9 @@ public: // Member Functions //- Allow cast to const content - // Fatal if content is not set - operator const List<T>&() const + operator const UList<T>&() const { - return contentRef_.cref(); + return contentRef_; } //- The writeData method for regIOobject write operation diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistributePolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistributePolyMesh.C index 8f35bbedaa2..0557a63f547 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistributePolyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistributePolyMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2022-2024 OpenCFD Ltd. + Copyright (C) 2022-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -124,6 +124,23 @@ Foam::IOmapDistributePolyMeshRef::IOmapDistributePolyMeshRef /// contentRef_.ref(map); // writable reference /// } +// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // + +void Foam::IOmapDistributePolyMesh::writeContents +( + const IOobject& io, + const mapDistributePolyMesh& map +) +{ + IOmapDistributePolyMeshRef writer + ( + IOobject(io, IOobjectOption::NO_REGISTER), + map + ); + + writer.write(); +} + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistributePolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistributePolyMesh.H index b0d85a2afd7..92fb1390c62 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistributePolyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistributePolyMesh.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2022-2024 OpenCFD Ltd. + Copyright (C) 2022-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -88,6 +88,17 @@ public: ); + // Factory Methods + + //- Write contents. The IOobject is never registered. + // Uses IOmapDistributePolyMeshRef internally. + static void writeContents + ( + const IOobject& io, + const mapDistributePolyMesh& map + ); + + //- Destructor virtual ~IOmapDistributePolyMesh() = default; diff --git a/src/conversion/ccm/reader/ccmReader.H b/src/conversion/ccm/reader/ccmReader.H index 147c320a4d8..ab05dc2c0ee 100644 --- a/src/conversion/ccm/reader/ccmReader.H +++ b/src/conversion/ccm/reader/ccmReader.H @@ -393,7 +393,7 @@ private: ( const objectRegistry& registry, const word& propertyName, - const labelList& list, + const labelUList& list, IOstreamOption streamOpt ) const; diff --git a/src/conversion/ccm/reader/ccmReaderAux.C b/src/conversion/ccm/reader/ccmReaderAux.C index 3e119be25c0..eb5167095ab 100644 --- a/src/conversion/ccm/reader/ccmReaderAux.C +++ b/src/conversion/ccm/reader/ccmReaderAux.C @@ -145,7 +145,7 @@ void Foam::ccm::reader::writeMeshLabelList ( const objectRegistry& registry, const word& propertyName, - const labelList& list, + const labelUList& list, IOstreamOption streamOpt ) const { diff --git a/src/conversion/common/reader/meshReader.H b/src/conversion/common/reader/meshReader.H index 68baf6a7750..3bd02e90bc1 100644 --- a/src/conversion/common/reader/meshReader.H +++ b/src/conversion/common/reader/meshReader.H @@ -192,7 +192,7 @@ private: ( const objectRegistry& registry, const word& propertyName, - const labelList& list, + const labelUList& list, IOstreamOption streamOpt ) const; diff --git a/src/conversion/common/reader/meshReaderAux.C b/src/conversion/common/reader/meshReaderAux.C index d4b4d5f426e..bdf234e9494 100644 --- a/src/conversion/common/reader/meshReaderAux.C +++ b/src/conversion/common/reader/meshReaderAux.C @@ -108,7 +108,7 @@ void Foam::meshReader::writeMeshLabelList ( const objectRegistry& registry, const word& propertyName, - const labelList& list, + const labelUList& list, IOstreamOption streamOpt ) const { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C index 78bb1bfe48d..e3f66c35037 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C @@ -101,8 +101,8 @@ Foam::hexRef8Data::hexRef8Data ( const IOobject& io, const hexRef8Data& data, - const labelList& cellMap, - const labelList& pointMap + const labelUList& cellMap, + const labelUList& pointMap ) { if (data.cellLevelPtr_) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.H index 8363c3839a8..9e5b4706f6e 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.H @@ -93,8 +93,8 @@ public: ( const IOobject& io, const hexRef8Data&, - const labelList& cellMap, - const labelList& pointMap + const labelUList& cellMap, + const labelUList& pointMap ); //- Construct from multiple hexRef8Data diff --git a/src/parallel/decompose/faDecompose/faMeshDecomposition.C b/src/parallel/decompose/faDecompose/faMeshDecomposition.C index 006b556e5ad..63806592796 100644 --- a/src/parallel/decompose/faDecompose/faMeshDecomposition.C +++ b/src/parallel/decompose/faDecompose/faMeshDecomposition.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd - Copyright (C) 2018-2024 OpenCFD Ltd. + Copyright (C) 2018-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1318,19 +1318,19 @@ bool Foam::faMeshDecomposition::writeDecomposition() // pointProcAddressing ioAddr.rename("pointProcAddressing"); - IOListRef<label>(ioAddr, procPatchPointAddressing_[procI]).write(); + IOList<label>::writeContents(ioAddr, procPatchPointAddressing_[procI]); // edgeProcAddressing ioAddr.rename("edgeProcAddressing"); - IOListRef<label>(ioAddr, procEdgeAddressing_[procI]).write(); + IOList<label>::writeContents(ioAddr, procEdgeAddressing_[procI]); // faceProcAddressing ioAddr.rename("faceProcAddressing"); - IOListRef<label>(ioAddr, procFaceAddressing_[procI]).write(); + IOList<label>::writeContents(ioAddr, procFaceAddressing_[procI]); // boundaryProcAddressing ioAddr.rename("boundaryProcAddressing"); - IOListRef<label>(ioAddr, procBoundaryAddressing_[procI]).write(); + IOList<label>::writeContents(ioAddr, procBoundaryAddressing_[procI]); } diff --git a/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C b/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C index 4f6002839da..8786ffb3955 100644 --- a/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C +++ b/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2021-2024 OpenCFD Ltd. + Copyright (C) 2021-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -693,19 +693,19 @@ void Foam::faMeshReconstructor::writeAddressing // boundaryProcAddressing ioAddr.rename("boundaryProcAddressing"); - IOListRef<label>(ioAddr, faBoundaryProcAddr).write(); + IOList<label>::writeContents(ioAddr, faBoundaryProcAddr); // faceProcAddressing ioAddr.rename("faceProcAddressing"); - IOListRef<label>(ioAddr, faFaceProcAddr).write(); + IOList<label>::writeContents(ioAddr, faFaceProcAddr); // pointProcAddressing ioAddr.rename("pointProcAddressing"); - IOListRef<label>(ioAddr, faPointProcAddr).write(); + IOList<label>::writeContents(ioAddr, faPointProcAddr); // edgeProcAddressing ioAddr.rename("edgeProcAddressing"); - IOListRef<label>(ioAddr, faEdgeProcAddr).write(); + IOList<label>::writeContents(ioAddr, faEdgeProcAddr); } @@ -760,7 +760,7 @@ void Foam::faMeshReconstructor::writeMesh IOobject io(fullMesh.boundary()); io.rename("faceLabels"); - IOListRef<label>(io, singlePatchFaceLabels).write(); + IOList<label>::writeContents(io, singlePatchFaceLabels); fullMesh.boundary().write(); -- GitLab