diff --git a/src/sampling/Make/files b/src/sampling/Make/files index 5c61d41776..1c30823efc 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -37,6 +37,7 @@ sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C surfWriters = sampledSurface/writers $(surfWriters)/surfaceWriter.C +$(surfWriters)/none/noSurfaceWriter.C $(surfWriters)/ensight/ensightSurfaceWriter.C $(surfWriters)/ensight/ensightPTraits.C $(surfWriters)/foam/foamSurfaceWriter.C diff --git a/src/sampling/sampledSurface/writers/ensight/ensightSurfaceWriter.C b/src/sampling/sampledSurface/writers/ensight/ensightSurfaceWriter.C index be13865ae8..40cfa7832f 100644 --- a/src/sampling/sampledSurface/writers/ensight/ensightSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/ensight/ensightSurfaceWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,13 +24,11 @@ License \*---------------------------------------------------------------------------*/ #include "ensightSurfaceWriter.H" - #include "OFstream.H" #include "OSspecific.H" #include "IOmanip.H" #include "ensightPartFaces.H" #include "ensightPTraits.H" - #include "makeSurfaceWriterMethods.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.C b/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.C index e129693877..985b949114 100644 --- a/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,10 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "foamSurfaceWriter.H" - #include "OFstream.H" #include "OSspecific.H" - #include "makeSurfaceWriterMethods.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C index bee06af4a3..c046f1ac32 100644 --- a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,8 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "nastranSurfaceWriter.H" -#include "IOmanip.H" -#include "Tuple2.H" #include "makeSurfaceWriterMethods.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -111,7 +109,7 @@ void Foam::nastranSurfaceWriter::writeCoord os.unsetf(ios_base::left); os.setf(ios_base::right); os << setw(8) << pointi + 1 - << " " + << " " << setw(8) << p.x() << setw(8) << p.y() << setw(8) << p.z() diff --git a/src/sampling/sampledSurface/writers/none/noSurfaceWriter.C b/src/sampling/sampledSurface/writers/none/noSurfaceWriter.C new file mode 100644 index 0000000000..776bb2c1c4 --- /dev/null +++ b/src/sampling/sampledSurface/writers/none/noSurfaceWriter.C @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "noSurfaceWriter.H" +#include "makeSurfaceWriterMethods.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + makeSurfaceWriterType(noSurfaceWriter); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::noSurfaceWriter::noSurfaceWriter() +: + surfaceWriter() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::noSurfaceWriter::~noSurfaceWriter() +{} + + +// ************************************************************************* // diff --git a/src/sampling/sampledSurface/writers/none/noSurfaceWriter.H b/src/sampling/sampledSurface/writers/none/noSurfaceWriter.H new file mode 100644 index 0000000000..5bb82a3290 --- /dev/null +++ b/src/sampling/sampledSurface/writers/none/noSurfaceWriter.H @@ -0,0 +1,168 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::noSurfaceWriter + +Description + A dummy surfaceWriter selected to disable surface writing. + +SourceFiles + noSurfaceWriter.C + +\*---------------------------------------------------------------------------*/ + +#ifndef noSurfaceWriter_H +#define noSurfaceWriter_H + +#include "surfaceWriter.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class noSurfaceWriter Declaration +\*---------------------------------------------------------------------------*/ + +class noSurfaceWriter +: + public surfaceWriter +{ + +public: + + //- Runtime type information + TypeName("none"); + + + // Constructors + + //- Construct null + noSurfaceWriter(); + + + //- Destructor + virtual ~noSurfaceWriter(); + + + // Member Functions + + //- Write single surface geometry to file. + virtual void write + ( + const fileName& outputDir, + const fileName& surfaceName, + const pointField& points, + const faceList& faces, + const bool verbose = false + ) const + {} + + //- Write scalarField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write vectorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write sphericalTensorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write symmTensorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write tensorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/sampling/sampledSurface/writers/proxy/proxySurfaceWriter.C b/src/sampling/sampledSurface/writers/proxy/proxySurfaceWriter.C index a8870ebbbf..c322fced29 100644 --- a/src/sampling/sampledSurface/writers/proxy/proxySurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/proxy/proxySurfaceWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,11 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "proxySurfaceWriter.H" - #include "MeshedSurfaceProxy.H" -#include "OFstream.H" -#include "OSspecific.H" - #include "makeSurfaceWriterMethods.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSurface/writers/proxy/proxySurfaceWriter.H b/src/sampling/sampledSurface/writers/proxy/proxySurfaceWriter.H index 97ea567830..09e50f8379 100644 --- a/src/sampling/sampledSurface/writers/proxy/proxySurfaceWriter.H +++ b/src/sampling/sampledSurface/writers/proxy/proxySurfaceWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,6 +94,80 @@ public: const bool verbose = false ) const; + //- Write scalarField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write vectorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write sphericalTensorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write symmTensorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write tensorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} }; diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C index ca9ab570f8..105d92b2a9 100644 --- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,11 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "rawSurfaceWriter.H" - #include "OFstream.H" #include "OSspecific.H" -#include "IOmanip.H" - #include "makeSurfaceWriterMethods.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSurface/writers/starcd/starcdSurfaceWriter.C b/src/sampling/sampledSurface/writers/starcd/starcdSurfaceWriter.C index 7514de0597..428257b0cf 100644 --- a/src/sampling/sampledSurface/writers/starcd/starcdSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/starcd/starcdSurfaceWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,11 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "starcdSurfaceWriter.H" - #include "MeshedSurfaceProxy.H" -#include "OFstream.H" -#include "OSspecific.H" - #include "makeSurfaceWriterMethods.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSurface/writers/starcd/starcdSurfaceWriter.H b/src/sampling/sampledSurface/writers/starcd/starcdSurfaceWriter.H index 9b976a40ca..ef8d4900d1 100644 --- a/src/sampling/sampledSurface/writers/starcd/starcdSurfaceWriter.H +++ b/src/sampling/sampledSurface/writers/starcd/starcdSurfaceWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -167,6 +167,35 @@ public: const bool verbose = false ) const; + //- Write symmTensorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} + + //- Write tensorField for a single surface to file. + // One value per face or vertex (isNodeValues = true) + virtual void write + ( + const fileName& outputDir, // /surface/TIME + const fileName& surfaceName, // name of surface + const pointField& points, + const faceList& faces, + const word& fieldName, // name of field + const Field& values, + const bool isNodeValues, + const bool verbose = false + ) const + {} }; diff --git a/src/sampling/sampledSurface/writers/surfaceWriter.C b/src/sampling/sampledSurface/writers/surfaceWriter.C index 7c739017a7..562a73f0df 100644 --- a/src/sampling/sampledSurface/writers/surfaceWriter.C +++ b/src/sampling/sampledSurface/writers/surfaceWriter.C @@ -24,12 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "surfaceWriter.H" - #include "MeshedSurfaceProxy.H" #include "proxySurfaceWriter.H" - -#include "HashTable.H" -#include "word.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSurface/writers/surfaceWriter.H b/src/sampling/sampledSurface/writers/surfaceWriter.H index 5b5cedf175..0d301da33a 100644 --- a/src/sampling/sampledSurface/writers/surfaceWriter.H +++ b/src/sampling/sampledSurface/writers/surfaceWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -123,8 +123,7 @@ public: const pointField& points, const faceList& faces, const bool verbose = false - ) const - {} + ) const = 0; //- Write scalarField for a single surface to file. // One value per face or vertex (isNodeValues = true) @@ -138,8 +137,7 @@ public: const Field& values, const bool isNodeValues, const bool verbose = false - ) const - {} + ) const = 0; //- Write vectorField for a single surface to file. // One value per face or vertex (isNodeValues = true) @@ -153,8 +151,7 @@ public: const Field& values, const bool isNodeValues, const bool verbose = false - ) const - {} + ) const = 0; //- Write sphericalTensorField for a single surface to file. // One value per face or vertex (isNodeValues = true) @@ -168,8 +165,7 @@ public: const Field& values, const bool isNodeValues, const bool verbose = false - ) const - {} + ) const = 0; //- Write symmTensorField for a single surface to file. // One value per face or vertex (isNodeValues = true) @@ -183,8 +179,7 @@ public: const Field& values, const bool isNodeValues, const bool verbose = false - ) const - {} + ) const = 0; //- Write tensorField for a single surface to file. // One value per face or vertex (isNodeValues = true) @@ -198,8 +193,7 @@ public: const Field& values, const bool isNodeValues, const bool verbose = false - ) const - {} + ) const = 0; }; diff --git a/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C index 28e0a8841a..8e4a30daa6 100644 --- a/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,10 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "vtkSurfaceWriter.H" - #include "OFstream.H" #include "OSspecific.H" - #include "makeSurfaceWriterMethods.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/system/continuityFunctions b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/system/continuityFunctions index 59296a328f..f2225719e3 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/system/continuityFunctions +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/system/continuityFunctions @@ -19,7 +19,7 @@ inletMassFlowRate writeFields false; log true; - surfaceFormat null; + surfaceFormat none; regionType patch; name inlet; @@ -42,7 +42,7 @@ outletMassFlowRate writeFields false; log true; - surfaceFormat null; + surfaceFormat none; regionType patch; name outlet;