diff --git a/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C b/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C index dfd2d5f2cc..d2b887c3e8 100644 --- a/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C +++ b/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -66,6 +66,9 @@ Note #include "MeshedSurfaces.H" #include "UnsortedMeshedSurfaces.H" +#include "IStringStream.H" +#include "OStringStream.H" + using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -84,11 +87,33 @@ int main(int argc, char *argv[]) argList::validArgs.append("outputFile"); argList::addBoolOption("clean"); - argList::addBoolOption("orient"); - argList::addBoolOption("surfMesh"); + argList::addBoolOption + ( + "orient", + "check surface orientation" + ); + argList::addBoolOption + ( + "surfMesh", + "test surfMesh output" + ); argList::addBoolOption("triSurface"); - argList::addBoolOption("unsorted"); - argList::addBoolOption("triFace"); + argList::addBoolOption + ( + "unsorted", + "use UnsortedMeshedSurface instead of MeshedSurface, " + "or unsorted output (with -triSurface option)" + ); + argList::addBoolOption + ( + "triFace", + "use triFace instead of face" + ); + argList::addBoolOption + ( + "stdout", + "ignore output filename and write to stdout" + ); argList::addOption ( @@ -99,10 +124,11 @@ int main(int argc, char *argv[]) #include "setRootCase.H" + const bool optStdout = args.optionFound("stdout"); const scalar scaleFactor = args.optionLookupOrDefault("scale", 0.0); const fileName importName = args[1]; - const fileName exportName = args[2]; + const fileName exportName = optStdout ? "-stdout" : args[2]; if (importName == exportName) { @@ -114,7 +140,11 @@ int main(int argc, char *argv[]) if ( !MeshedSurface::canRead(importName, true) - || !MeshedSurface::canWriteType(exportName.ext(), true) + || + ( + !optStdout + && !MeshedSurface::canWriteType(exportName.ext(), true) + ) ) { return 1; @@ -128,6 +158,19 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; + // check: output to ostream, construct from istream + { + OStringStream os; + os << surf; + IStringStream is(os.str()); + + triSurface surf2(is); + + // is.rewind(); + // is >> surf2; // FAIL: uses List base class + // surf2.read(is); // FAIL: private method + } + if (args.optionFound("orient")) { Info<< "Checking surface orientation" << endl; @@ -156,8 +199,15 @@ int main(int argc, char *argv[]) Info<< endl; } - // write sorted by region - surf.write(exportName, true); + if (optStdout) + { + Info<< surf; + } + else + { + // normally write sorted (looks nicer) + surf.write(exportName, !args.optionFound("unsorted")); + } } else if (args.optionFound("unsorted")) { @@ -167,6 +217,23 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; + // check: output to ostream, construct from istream + { + OStringStream os; + os << surf; + IStringStream is(os.str()); + + // both work: + UnsortedMeshedSurface surf2(is); + + // OR + // is.rewind(); + // UnsortedMeshedSurface surf2; + // is >> surf2; + + // surf2.read(is); // FAIL: private method + } + if (args.optionFound("orient")) { Info<< "Checking surface orientation" << endl; @@ -194,9 +261,16 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; } - surf.write(exportName); + + if (optStdout) + { + Info<< surf; + } + else + { + surf.write(exportName); + } } -#if 1 else if (args.optionFound("triFace")) { MeshedSurface surf(importName); @@ -205,6 +279,23 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; + // check: output to ostream, construct from istream + { + OStringStream os; + os << surf; + IStringStream is(os.str()); + + // both work: + MeshedSurface surf2(is); + + // OR + // is.rewind(); + // MeshedSurface surf2; + // is >> surf2; + + // surf2.read(is); // FAIL: private method + } + if (args.optionFound("orient")) { Info<< "Checking surface orientation" << endl; @@ -232,9 +323,16 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; } - surf.write(exportName); + + if (optStdout) + { + Info<< surf; + } + else + { + surf.write(exportName); + } } -#endif else { MeshedSurface surf(importName); @@ -243,6 +341,23 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; + // check: output to ostream, construct from istream + { + OStringStream os; + os << surf; + IStringStream is(os.str()); + + // both work: + MeshedSurface surf2(is); + + // OR + // is.rewind(); + // MeshedSurface surf2; + // is >> surf2; + + // surf2.read(is); // FAIL: private method + } + if (args.optionFound("orient")) { Info<< "Checking surface orientation" << endl; @@ -258,7 +373,6 @@ int main(int argc, char *argv[]) Info<< endl; } - Info<< "writing " << exportName; if (scaleFactor <= 0) { @@ -271,7 +385,15 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; } - surf.write(exportName); + + if (optStdout) + { + Info<< surf; + } + else + { + surf.write(exportName); + } if (args.optionFound("surfMesh")) { @@ -287,7 +409,6 @@ int main(int argc, char *argv[]) Info<< "runTime.instance() = " << runTime.instance() << endl; Info<< "runTime.timeName() = " << runTime.timeName() << endl; - Info<< "write MeshedSurface 'yetAnother' via proxy as surfMesh" << endl; surf.write @@ -312,14 +433,11 @@ int main(int argc, char *argv[]) MeshedSurface surfIn2(runTime, "foobar"); Info<<"surfIn2 = " << surfIn2.size() << endl; - Info<< "surfIn = " << surfIn.size() << endl; - Info<< "writing surfMesh as obj = oldSurfIn.obj" << endl; surfIn.write("oldSurfIn.obj"); - Info<< "runTime.instance() = " << runTime.instance() << endl; surfMesh surfOut diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C index 6eebe1a080..aec8e446a5 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -343,7 +343,10 @@ Foam::MeshedSurface::MeshedSurface template -Foam::MeshedSurface::MeshedSurface(const fileName& name) +Foam::MeshedSurface::MeshedSurface +( + const fileName& name +) : ParentType(List(), pointField()) { @@ -351,6 +354,19 @@ Foam::MeshedSurface::MeshedSurface(const fileName& name) } +template +Foam::MeshedSurface::MeshedSurface +( + Istream& is +) +: + ParentType(List(), pointField()), + zones_() +{ + read(is); +} + + template Foam::MeshedSurface::MeshedSurface ( diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.H b/src/surfMesh/MeshedSurface/MeshedSurface.H index e3d99ca999..1362197d8c 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.H +++ b/src/surfMesh/MeshedSurface/MeshedSurface.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,11 +69,18 @@ namespace Foam class Time; class surfMesh; class polyBoundaryMesh; +class Istream; +class Ostream; template class MeshedSurface; template class MeshedSurfaceProxy; template class UnsortedMeshedSurface; +template +Istream& operator>>(Istream&, MeshedSurface&); +template +Ostream& operator<<(Ostream&, const MeshedSurface&); + /*---------------------------------------------------------------------------*\ Class MeshedSurface Declaration \*---------------------------------------------------------------------------*/ @@ -84,7 +91,7 @@ class MeshedSurface public PrimitivePatch, public fileFormats::surfaceFormatsCore { - // friends - despite different face representationsx + // friends - despite different face representations template friend class MeshedSurface; template friend class UnsortedMeshedSurface; friend class surfMesh; @@ -114,6 +121,15 @@ private: List zones_; + // Private Member functions + + //- Read/construct from Istream + Istream& read(Istream&); + + //- Write to Ostream + Ostream& write(Ostream&) const; + + protected: // Protected Member functions @@ -133,7 +149,7 @@ protected: //- Non-const access to the faces List& storedFaces() { - return static_cast &>(*this); + return static_cast&>(*this); } //- Non-const access to the zones @@ -234,8 +250,15 @@ public: //- Construct from file name (uses extension to determine type) MeshedSurface(const fileName&, const word& ext); + //- Construct from Istream + MeshedSurface(Istream&); + //- Construct from database - MeshedSurface(const Time&, const word& surfName=""); + MeshedSurface + ( + const Time&, + const word& surfName = word::null + ); // Declare run-time constructor selection table @@ -285,7 +308,11 @@ public: ); //- Write to file - static void write(const fileName&, const MeshedSurface&); + static void write + ( + const fileName&, + const MeshedSurface& + ); // Member Functions @@ -301,7 +328,7 @@ public: //- Return const access to the faces inline const List& faces() const { - return static_cast &>(*this); + return static_cast&>(*this); } //- Const access to the surface zones. @@ -353,7 +380,7 @@ public: // Note, optimized to avoid overwriting data (with Xfer::null) virtual void reset ( - const Xfer& points, + const Xfer& points, const Xfer>& faces, const Xfer& zones ); @@ -364,7 +391,7 @@ public: ( const Xfer>& points, const Xfer>& faces, - const Xfer& zones + const Xfer& zones ); //- Remove invalid faces @@ -435,7 +462,11 @@ public: } //- Write to database - void write(const Time&, const word& surfName="") const; + void write + ( + const Time&, + const word& surfName = word::null + ) const; // Member operators @@ -444,6 +475,25 @@ public: //- Conversion operator to MeshedSurfaceProxy operator MeshedSurfaceProxy() const; + + + // IOstream Operators + + //- Read MeshedSurface from Istream. + friend Istream& operator>> + ( + Istream&, + MeshedSurface& + ); + + + //- Write MeshedSurface to Ostream. + friend Ostream& operator<< + ( + Ostream&, + const MeshedSurface& + ); + }; diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaceCore.C b/src/surfMesh/MeshedSurface/MeshedSurfaceCore.C index 9d579ee590..5e71aa5cbc 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurfaceCore.C +++ b/src/surfMesh/MeshedSurface/MeshedSurfaceCore.C @@ -66,12 +66,4 @@ namespace Foam } // end of namespace Foam -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // ************************************************************************* // diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaceIO.C b/src/surfMesh/MeshedSurface/MeshedSurfaceIO.C index e968872b50..89204c063b 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurfaceIO.C +++ b/src/surfMesh/MeshedSurface/MeshedSurfaceIO.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,10 +25,35 @@ License #include "MeshedSurface.H" #include "boundBox.H" +#include "Istream.H" #include "Ostream.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +Foam::Istream& Foam::MeshedSurface::read(Istream& is) +{ + is >> this->storedZones() + >> this->storedPoints() + >> this->storedFaces(); + + is.check("MeshedSurface::read(Istream&)"); + return is; +} + + +template +Foam::Ostream& Foam::MeshedSurface::write(Ostream& os) const +{ + os << this->surfZones() + << this->points() + << this->faces(); + + os.check("MeshedSurface::write(Ostream&) const"); + return os; +} + + template void Foam::MeshedSurface::writeStats(Ostream& os) const { @@ -64,4 +89,28 @@ void Foam::MeshedSurface::writeStats(Ostream& os) const } +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template +Foam::Istream& Foam::operator>> +( + Foam::Istream& is, + Foam::MeshedSurface& surf +) +{ + return surf.read(is); +} + + +template +Foam::Ostream& Foam::operator<< +( + Foam::Ostream& os, + const Foam::MeshedSurface& surf +) +{ + return surf.write(os); +} + + // ************************************************************************* // diff --git a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.H b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.H index 4cc7264a43..9338f7dd68 100644 --- a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.H +++ b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -128,7 +128,11 @@ public: ); //- Write to file - static void write(const fileName&, const MeshedSurfaceProxy&); + static void write + ( + const fileName&, + const MeshedSurfaceProxy& + ); // Member Functions @@ -176,7 +180,11 @@ public: } //- Write to database - virtual void write(const Time&, const word& surfName = "") const; + virtual void write + ( + const Time&, + const word& surfName = word::null + ) const; }; diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C index 10a973eb05..11d1237e22 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -263,7 +263,10 @@ Foam::UnsortedMeshedSurface::UnsortedMeshedSurface template -Foam::UnsortedMeshedSurface::UnsortedMeshedSurface(const fileName& name) +Foam::UnsortedMeshedSurface::UnsortedMeshedSurface +( + const fileName& name +) : ParentType() { @@ -271,6 +274,20 @@ Foam::UnsortedMeshedSurface::UnsortedMeshedSurface(const fileName& name) } +template +Foam::UnsortedMeshedSurface::UnsortedMeshedSurface +( + Istream& is +) +: + ParentType(), + zoneIds_(), + zoneToc_() +{ + read(is); +} + + template Foam::UnsortedMeshedSurface::UnsortedMeshedSurface ( @@ -422,6 +439,30 @@ void Foam::UnsortedMeshedSurface::remapFaces // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +Foam::Istream& Foam::UnsortedMeshedSurface::read(Istream& is) +{ + is >> this->storedZoneIds() + >> this->storedPoints() + >> this->storedFaces(); + + is.check("UnsortedMeshedSurface::read(Istream&)"); + return is; +} + + +template +Foam::Ostream& Foam::UnsortedMeshedSurface::write(Ostream& os) const +{ + os << this->zoneIds() + << this->points() + << this->faces(); + + os.check("UnsortedMeshedSurface::write(Ostream&) const"); + return os; +} + + template void Foam::UnsortedMeshedSurface::setSize(const label s) { @@ -759,6 +800,30 @@ Foam::MeshedSurfaceProxy() const } +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template +Foam::Istream& Foam::operator>> +( + Foam::Istream& is, + Foam::UnsortedMeshedSurface& surf +) +{ + return surf.read(is); +} + + +template +Foam::Ostream& Foam::operator<< +( + Foam::Ostream& os, + const Foam::UnsortedMeshedSurface& surf +) +{ + return surf.write(os); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "UnsortedMeshedSurfaceNew.C" diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H index 52cbddd3bc..443cf1f7bc 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,12 +62,18 @@ namespace Foam // Forward declaration of friend functions and operators class Time; -class IFstream; +class Istream; +class Ostream; template class MeshedSurface; template class MeshedSurfaceProxy; template class UnsortedMeshedSurface; +template +Istream& operator>>(Istream&, UnsortedMeshedSurface&); +template +Ostream& operator<<(Ostream&, const UnsortedMeshedSurface&); + /*---------------------------------------------------------------------------*\ Class UnsortedMeshedSurface Declaration \*---------------------------------------------------------------------------*/ @@ -77,7 +83,7 @@ class UnsortedMeshedSurface : public MeshedSurface { - // friends - despite different face representationsx + // friends - despite different face representations template friend class MeshedSurface; template friend class UnsortedMeshedSurface; friend class surfMesh; @@ -104,11 +110,16 @@ private: // Private Member Functions //- Disable resize with value - void resize(const label, const Face&); + void resize(const label, const Face&) = delete; //- Disable setSize with value - void setSize(const label, const Face&); + void setSize(const label, const Face&) = delete; + //- Read/construct from Istream + Istream& read(Istream&); + + //- Write to Ostream + Ostream& write(Ostream&) const; protected: @@ -199,8 +210,15 @@ public: //- Construct from file name (uses extension to determine type) UnsortedMeshedSurface(const fileName&, const word&); + //- Construct from Istream + UnsortedMeshedSurface(Istream&); + //- Construct from objectRegistry and a named surface - UnsortedMeshedSurface(const Time&, const word& surfName=""); + UnsortedMeshedSurface + ( + const Time&, + const word& surfName = word::null + ); // Declare run-time constructor selection table @@ -250,7 +268,11 @@ public: ); //- Write to file - static void write(const fileName&, const UnsortedMeshedSurface&); + static void write + ( + const fileName&, + const UnsortedMeshedSurface& + ); // Member Functions @@ -363,7 +385,11 @@ public: } //- Write to database - void write(const Time&, const word& surfName="") const; + void write + ( + const Time&, + const word& surfName = word::null + ) const; // Member operators @@ -372,6 +398,24 @@ public: //- Conversion operator to MeshedSurfaceProxy operator MeshedSurfaceProxy() const; + + + // IOstream Operators + + //- Read UnsortedMeshedSurface from Istream. + friend Istream& operator>> + ( + Istream&, + UnsortedMeshedSurface& + ); + + + //- Write UnsortedMeshedSurface to Ostream. + friend Ostream& operator<< + ( + Ostream&, + const UnsortedMeshedSurface& + ); }; diff --git a/src/surfMesh/surfMesh/surfMesh.H b/src/surfMesh/surfMesh/surfMesh.H index 5388626803..d8bbff5fe4 100644 --- a/src/surfMesh/surfMesh/surfMesh.H +++ b/src/surfMesh/surfMesh/surfMesh.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -98,10 +98,10 @@ private: // Private Member Functions //- Disallow construct as copy - surfMesh(const surfMesh&); + surfMesh(const surfMesh&) = delete; //- Disallow default bitwise assignment - void operator=(const surfMesh&); + void operator=(const surfMesh&) = delete; protected: @@ -155,7 +155,11 @@ public: // Constructors //- Construct from IOobject, with alternative surface name - explicit surfMesh(const IOobject&, const word& surfName=""); + explicit surfMesh + ( + const IOobject&, + const word& surfName = word::null + ); //- Construct by transferring components (points, faces) without zones. // surfZones are added using addZones() member function @@ -164,7 +168,7 @@ public: const IOobject&, const Xfer&, const Xfer&, - const word& surfName="" + const word& surfName = word::null ); //- Construct copy/move from MeshedSurface @@ -172,7 +176,7 @@ public: ( const IOobject&, const Xfer>& surf, - const word& surfName="" + const word& surfName = word::null ); diff --git a/src/surfMesh/surfaceRegistry/surfaceRegistry.H b/src/surfMesh/surfaceRegistry/surfaceRegistry.H index a55bf46a1f..dd50c91244 100644 --- a/src/surfMesh/surfaceRegistry/surfaceRegistry.H +++ b/src/surfMesh/surfaceRegistry/surfaceRegistry.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,10 +54,10 @@ class surfaceRegistry // Private Member Functions //- Disallow default bitwise copy construct - surfaceRegistry(const surfaceRegistry&); + surfaceRegistry(const surfaceRegistry&) = delete; //- Disallow default bitwise assignment - void operator=(const surfaceRegistry&); + void operator=(const surfaceRegistry&) = delete; public: @@ -75,7 +75,11 @@ public: // Constructors //- Construct for the given objectRegistry and named surface - surfaceRegistry(const objectRegistry&, const word& surfName = ""); + surfaceRegistry + ( + const objectRegistry&, + const word& surfName = word::null + ); //- Destructor