From f4a65fbada3f9794c6a13696db4f3837c704533b Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 17 Jun 2021 11:48:09 +0100 Subject: [PATCH] sampling: Renamed and moved classes from fileFormats The writer class has been renamed setWriter in order to clarify its usage. The coordSet and setWriter classes have been moved into the sampling library, as this fits their usage. --- .../functionObjects/Make/options | 1 + .../sizeDistribution/sizeDistribution.C | 2 +- .../sizeDistribution/sizeDistribution.H | 4 +-- .../manipulation/checkMesh/checkGeometry.C | 4 +-- .../manipulation/checkMesh/checkGeometry.H | 4 +-- .../mesh/manipulation/checkMesh/checkMesh.C | 9 +++-- .../mesh/manipulation/checkMesh/checkTools.C | 2 +- .../mesh/manipulation/checkMesh/checkTools.H | 6 ++-- .../manipulation/checkMesh/checkTopology.C | 4 +-- .../manipulation/checkMesh/checkTopology.H | 4 +-- .../lagrangian/particleTracks/Make/options | 2 ++ .../particleTracks/particleTracks.C | 10 +++--- src/fileFormats/Make/files | 13 ------- .../field/histogram/histogram.C | 4 +-- .../field/histogram/histogram.H | 6 ++-- .../regionSizeDistribution.C | 4 +-- .../regionSizeDistribution.H | 6 ++-- .../field/streamLine/streamLine.C | 6 ++-- .../field/streamLine/streamLine.H | 8 ++--- src/sampling/Make/files | 13 +++++++ .../coordSet/coordSet.C | 2 +- .../coordSet/coordSet.H | 2 +- .../sampledSet/sampledSet/sampledSet.C | 4 +-- .../sampledSet/sampledSets/sampledSets.H | 10 +++--- .../sampledSets/sampledSetsTemplates.C | 4 +-- .../sampledSet/writers}/csv/csvSetWriter.C | 2 +- .../sampledSet/writers}/csv/csvSetWriter.H | 6 ++-- .../writers}/csv/csvSetWriterRunTime.C | 4 +-- .../writers}/ensight/ensightSetWriter.C | 4 +-- .../writers}/ensight/ensightSetWriter.H | 6 ++-- .../ensight/ensightSetWriterRunTime.C | 4 +-- .../writers}/gnuplot/gnuplotSetWriter.C | 4 +-- .../writers}/gnuplot/gnuplotSetWriter.H | 6 ++-- .../gnuplot/gnuplotSetWriterRunTime.C | 4 +-- .../writers}/jplot/jplotSetWriter.C | 4 +-- .../writers}/jplot/jplotSetWriter.H | 6 ++-- .../writers}/jplot/jplotSetWriterRunTime.C | 4 +-- .../sampledSet/writers}/raw/rawSetWriter.C | 4 +-- .../sampledSet/writers}/raw/rawSetWriter.H | 6 ++-- .../writers}/raw/rawSetWriterRunTime.C | 4 +-- .../sampledSet/writers/setWriter.C} | 36 +++++++++---------- .../sampledSet/writers/setWriter.H} | 31 ++++++++-------- .../sampledSet/writers/setWriters.C} | 8 ++--- .../sampledSet/writers/setWriters.H} | 14 ++++---- .../sampledSet/writers}/vtk/vtkSetWriter.C | 8 ++--- .../sampledSet/writers}/vtk/vtkSetWriter.H | 6 ++-- .../writers}/vtk/vtkSetWriterRunTime.C | 4 +-- .../writers}/xmgrace/xmgraceSetWriter.C | 4 +-- .../writers}/xmgrace/xmgraceSetWriter.H | 6 ++-- .../xmgrace/xmgraceSetWriterRunTime.C | 4 +-- 50 files changed, 164 insertions(+), 159 deletions(-) rename src/{fileFormats => sampling}/coordSet/coordSet.C (98%) rename src/{fileFormats => sampling}/coordSet/coordSet.H (98%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/csv/csvSetWriter.C (99%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/csv/csvSetWriter.H (96%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/csv/csvSetWriterRunTime.C (94%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/ensight/ensightSetWriter.C (99%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/ensight/ensightSetWriter.H (96%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/ensight/ensightSetWriterRunTime.C (94%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/gnuplot/gnuplotSetWriter.C (97%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/gnuplot/gnuplotSetWriter.H (96%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/gnuplot/gnuplotSetWriterRunTime.C (94%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/jplot/jplotSetWriter.C (97%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/jplot/jplotSetWriter.H (96%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/jplot/jplotSetWriterRunTime.C (94%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/raw/rawSetWriter.C (97%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/raw/rawSetWriter.H (96%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/raw/rawSetWriterRunTime.C (94%) rename src/{fileFormats/sampledSetWriters/writer.C => sampling/sampledSet/writers/setWriter.C} (85%) rename src/{fileFormats/sampledSetWriters/writer.H => sampling/sampledSet/writers/setWriter.H} (91%) rename src/{fileFormats/sampledSetWriters/writers.C => sampling/sampledSet/writers/setWriters.C} (87%) rename src/{fileFormats/sampledSetWriters/writers.H => sampling/sampledSet/writers/setWriters.H} (93%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/vtk/vtkSetWriter.C (96%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/vtk/vtkSetWriter.H (96%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/vtk/vtkSetWriterRunTime.C (94%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/xmgrace/xmgraceSetWriter.C (97%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/xmgrace/xmgraceSetWriter.H (96%) rename src/{fileFormats/sampledSetWriters => sampling/sampledSet/writers}/xmgrace/xmgraceSetWriterRunTime.C (94%) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/Make/options index 60502197d3..c9b69038a2 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/Make/options +++ b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/Make/options @@ -10,6 +10,7 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/functionObjects/field/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude LIB_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C index 2db5149e9f..6fe1fc5871 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C @@ -444,7 +444,7 @@ Foam::functionObjects::sizeDistribution::sizeDistribution } } - scalarFormatter_ = writer::New("raw"); + scalarFormatter_ = setWriter::New("raw"); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H index 682e4287d3..9a087a625f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H @@ -76,7 +76,7 @@ SourceFiles #include "logFiles.H" #include "populationBalanceModel.H" #include "writeFile.H" -#include "writer.H" +#include "setWriter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -135,7 +135,7 @@ protected: writeFile file_; //- Output formatter, set to raw - autoPtr> scalarFormatter_; + autoPtr> scalarFormatter_; //- Reference to populationBalanceModel const Foam::diameterModels::populationBalanceModel& popBal_; diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index d5f3b70288..f3db6f64dc 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -10,7 +10,7 @@ #include "polyMeshTetDecomposition.H" #include "vtkSurfaceWriter.H" -#include "writer.H" +#include "setWriter.H" #include "checkTools.H" #include "cyclicAMIPolyPatch.H" @@ -581,7 +581,7 @@ Foam::label Foam::checkGeometry const polyMesh& mesh, const bool allGeometry, const autoPtr& surfWriter, - const autoPtr>& setWriter + const autoPtr>& setWriter ) { label noFailedChecks = 0; diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H index 4056bf4b50..ba95d7488f 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H @@ -1,7 +1,7 @@ #include "label.H" #include "HashSet.H" #include "labelVector.H" -#include "writer.H" +#include "setWriter.H" namespace Foam { @@ -40,6 +40,6 @@ namespace Foam const polyMesh& mesh, const bool allGeometry, const autoPtr&, - const autoPtr>& + const autoPtr>& ); } diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C index e0a3634cfd..244642d6f3 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -160,7 +160,7 @@ int main(int argc, char *argv[]) autoPtr surfWriter; - autoPtr> setWriter; + autoPtr> setWriter; if (writeSets) { surfWriter = surfaceWriter::New @@ -168,7 +168,10 @@ int main(int argc, char *argv[]) surfaceFormat, mesh.time().writeFormat() ); - setWriter = writer::New(vtkSetWriter::typeName); + setWriter = Foam::setWriter::New + ( + vtkSetWriter::typeName + ); } diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C index 9f38f0722f..87b1931c62 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C @@ -378,7 +378,7 @@ void Foam::mergeAndWrite void Foam::mergeAndWrite ( - const writer& writer, + const setWriter& writer, const pointSet& set ) { diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTools.H b/applications/utilities/mesh/manipulation/checkMesh/checkTools.H index 794fce5e42..ffc9ff1a30 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTools.H +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTools.H @@ -1,6 +1,6 @@ #include "scalar.H" #include "indirectPrimitivePatch.H" -#include "writer.H" +#include "setWriter.H" namespace Foam { @@ -19,7 +19,7 @@ namespace Foam void mergeAndWrite ( const polyMesh& mesh, - const surfaceWriter& writer, + const surfaceWriter& setWriter, const word& name, const indirectPrimitivePatch setPatch, const fileName& outputDir @@ -35,7 +35,7 @@ namespace Foam //- Write vtk representation of (assembled) pointSet to 'set' file in // postProcessing/ directory - void mergeAndWrite(const writer&, const pointSet&); + void mergeAndWrite(const setWriter&, const pointSet&); } diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index 7ab6c06d66..4a8837c4ea 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::label Foam::checkTopology const bool allTopology, const bool allGeometry, const autoPtr& surfWriter, - const autoPtr>& setWriter + const autoPtr>& setWriter ) { label noFailedChecks = 0; diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.H b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.H index 699c577500..07ca1e2ca3 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.H +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.H @@ -1,6 +1,6 @@ #include "label.H" #include "autoPtr.H" -#include "writer.H" +#include "setWriter.H" namespace Foam { @@ -13,6 +13,6 @@ namespace Foam const bool, const bool, const autoPtr&, - const autoPtr>& + const autoPtr>& ); } diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options index b653926f93..97b75b2ed1 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options @@ -2,11 +2,13 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lfileFormats \ + -lsampling \ -lgenericPatchFields \ -llagrangian diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C index 268c7b77b3..6c57d87690 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ Description #include "timeSelector.H" #include "OFstream.H" #include "passiveParticleCloud.H" -#include "writer.H" +#include "setWriter.H" using namespace Foam; @@ -210,10 +210,8 @@ int main(int argc, char *argv[]) tracks[trackI].transfer(allTracks[trackI]); } - autoPtr> scalarFormatterPtr = writer::New - ( - setFormat - ); + autoPtr> scalarFormatterPtr = + setWriter::New(setFormat); // OFstream vtkTracks(vtkPath/"particleTracks.vtk"); fileName vtkFile diff --git a/src/fileFormats/Make/files b/src/fileFormats/Make/files index f477a0ed6c..f4d0265988 100644 --- a/src/fileFormats/Make/files +++ b/src/fileFormats/Make/files @@ -4,17 +4,4 @@ nas/NASCore.C starcd/STARCDCore.C obj/OBJstream.C -coordSet/coordSet.C - -setWriters = sampledSetWriters - -$(setWriters)/writers.C -$(setWriters)/ensight/ensightSetWriterRunTime.C -$(setWriters)/gnuplot/gnuplotSetWriterRunTime.C -$(setWriters)/jplot/jplotSetWriterRunTime.C -$(setWriters)/raw/rawSetWriterRunTime.C -$(setWriters)/vtk/vtkSetWriterRunTime.C -$(setWriters)/xmgrace/xmgraceSetWriterRunTime.C -$(setWriters)/csv/csvSetWriterRunTime.C - LIB = $(FOAM_LIBBIN)/libfileFormats diff --git a/src/functionObjects/field/histogram/histogram.C b/src/functionObjects/field/histogram/histogram.C index 30465b264c..576d1cef6c 100644 --- a/src/functionObjects/field/histogram/histogram.C +++ b/src/functionObjects/field/histogram/histogram.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,7 +98,7 @@ bool Foam::functionObjects::histogram::read(const dictionary& dict) dict.lookup("nBins") >> nBins_; word format(dict.lookup("setFormat")); - formatterPtr_ = writer::New(format); + formatterPtr_ = setWriter::New(format); return true; } diff --git a/src/functionObjects/field/histogram/histogram.H b/src/functionObjects/field/histogram/histogram.H index d4db74171b..21193f6743 100644 --- a/src/functionObjects/field/histogram/histogram.H +++ b/src/functionObjects/field/histogram/histogram.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,7 +69,7 @@ SourceFiles #include "fvMeshFunctionObject.H" #include "writeFile.H" -#include "writer.H" +#include "setWriter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -103,7 +103,7 @@ class histogram label nBins_; //- Output formatter to write - autoPtr> formatterPtr_; + autoPtr> formatterPtr_; // Private Member Functions diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index 238a3ed0ca..56c66b733b 100644 --- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -358,7 +358,7 @@ bool Foam::functionObjects::regionSizeDistribution::read(const dictionary& dict) dict.lookup("fields") >> fields_; word format(dict.lookup("setFormat")); - formatterPtr_ = writer::New(format); + formatterPtr_ = setWriter::New(format); if (dict.found("coordinateSystem")) { diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H index df65aa2895..48fe677520 100644 --- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H +++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -106,7 +106,7 @@ SourceFiles #include "fvMeshFunctionObject.H" #include "writeFile.H" -#include "writer.H" +#include "setWriter.H" #include "Map.H" #include "volFieldsFwd.H" #include "wordReList.H" @@ -157,7 +157,7 @@ class regionSizeDistribution wordReList fields_; //- Output formatter to write - autoPtr> formatterPtr_; + autoPtr> formatterPtr_; //- Optional coordinate system autoPtr coordSysPtr_; diff --git a/src/functionObjects/field/streamLine/streamLine.C b/src/functionObjects/field/streamLine/streamLine.C index 54a988a8c2..91b22a15bb 100644 --- a/src/functionObjects/field/streamLine/streamLine.C +++ b/src/functionObjects/field/streamLine/streamLine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -421,8 +421,8 @@ bool Foam::functionObjects::streamLine::read(const dictionary& dict) ); sampledSetAxis_ = sampledSetPtr_->axis(); - scalarFormatterPtr_ = writer::New(dict.lookup("setFormat")); - vectorFormatterPtr_ = writer::New(dict.lookup("setFormat")); + scalarFormatterPtr_ = setWriter::New(dict.lookup("setFormat")); + vectorFormatterPtr_ = setWriter::New(dict.lookup("setFormat")); return true; } diff --git a/src/functionObjects/field/streamLine/streamLine.H b/src/functionObjects/field/streamLine/streamLine.H index b9c52a70fd..4756c06e5c 100644 --- a/src/functionObjects/field/streamLine/streamLine.H +++ b/src/functionObjects/field/streamLine/streamLine.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,7 +109,7 @@ SourceFiles #include "DynamicList.H" #include "scalarList.H" #include "vectorList.H" -#include "writer.H" +#include "setWriter.H" #include "indirectPrimitivePatch.H" #include "NamedEnum.H" @@ -205,10 +205,10 @@ private: word sampledSetAxis_; //- File writer for scalar data - autoPtr> scalarFormatterPtr_; + autoPtr> scalarFormatterPtr_; //- File writer for vector data - autoPtr> vectorFormatterPtr_; + autoPtr> vectorFormatterPtr_; // Generated data diff --git a/src/sampling/Make/files b/src/sampling/Make/files index a76630c8e1..f416982149 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -2,6 +2,8 @@ probes/probes.C probes/patchProbes.C probes/probesGrouping.C +coordSet/coordSet.C + sampledSet/sampledSet/sampledSet.C sampledSet/sampledSets/sampledSets.C sampledSet/sampledSets/sampledSetsGrouping.C @@ -20,6 +22,17 @@ sampledSet/triSurfaceMeshSampledSet/triSurfaceMeshSampledSet.C sampledSet/cellSetSampledSet/cellSetSampledSet.C sampledSet/faceSetSampledSet/faceSetSampledSet.C +setWriters = sampledSet/writers + +$(setWriters)/setWriters.C +$(setWriters)/ensight/ensightSetWriterRunTime.C +$(setWriters)/gnuplot/gnuplotSetWriterRunTime.C +$(setWriters)/jplot/jplotSetWriterRunTime.C +$(setWriters)/raw/rawSetWriterRunTime.C +$(setWriters)/vtk/vtkSetWriterRunTime.C +$(setWriters)/xmgrace/xmgraceSetWriterRunTime.C +$(setWriters)/csv/csvSetWriterRunTime.C + cuttingPlane/cuttingPlane.C sampledSurface/sampledPatch/sampledPatch.C diff --git a/src/fileFormats/coordSet/coordSet.C b/src/sampling/coordSet/coordSet.C similarity index 98% rename from src/fileFormats/coordSet/coordSet.C rename to src/sampling/coordSet/coordSet.C index 79287be9a3..5d5221c198 100644 --- a/src/fileFormats/coordSet/coordSet.C +++ b/src/sampling/coordSet/coordSet.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/fileFormats/coordSet/coordSet.H b/src/sampling/coordSet/coordSet.H similarity index 98% rename from src/fileFormats/coordSet/coordSet.H rename to src/sampling/coordSet/coordSet.H index c639881d6e..5c39fcb6ac 100644 --- a/src/fileFormats/coordSet/coordSet.H +++ b/src/sampling/coordSet/coordSet.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C index e4b3b41365..3b2a559d62 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.C +++ b/src/sampling/sampledSet/sampledSet/sampledSet.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "sampledSet.H" #include "polyMesh.H" #include "meshSearch.H" -#include "writer.H" +#include "setWriter.H" #include "lineCell.H" #include "lineCellFace.H" #include "lineFace.H" diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.H b/src/sampling/sampledSet/sampledSets/sampledSets.H index 83dd40677f..1503f8a28b 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSets.H +++ b/src/sampling/sampledSet/sampledSets/sampledSets.H @@ -42,7 +42,7 @@ SourceFiles #include "meshSearch.H" #include "interpolation.H" #include "coordSet.H" -#include "writer.H" +#include "setWriter.H" #include "wordReList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -76,7 +76,7 @@ class sampledSets public: //- The set formatter - autoPtr> formatter; + autoPtr> formatter; //- Construct null fieldGroup() @@ -89,7 +89,7 @@ class sampledSets fieldGroup(const word& writeFormat) : DynamicList(0), - formatter(writer::New(writeFormat)) + formatter(setWriter::New(writeFormat)) {} //- Reset format and field list @@ -102,7 +102,7 @@ class sampledSets //- Assign a new formatter void operator=(const word& writeFormat) { - formatter = writer::New(writeFormat); + formatter = setWriter::New(writeFormat); } }; @@ -236,7 +236,7 @@ class sampledSets const PtrList>& masterFields, const label setI, const fileName& timeDir, - const writer& formatter + const setWriter& formatter ); template diff --git a/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C b/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C index 926b88bb6f..fcdd410a14 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C +++ b/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,7 +128,7 @@ void Foam::sampledSets::writeSampleFile const PtrList>& masterFields, const label setI, const fileName& timeDir, - const writer& formatter + const setWriter& formatter ) { wordList valueSetNames(masterFields.size()); diff --git a/src/fileFormats/sampledSetWriters/csv/csvSetWriter.C b/src/sampling/sampledSet/writers/csv/csvSetWriter.C similarity index 99% rename from src/fileFormats/sampledSetWriters/csv/csvSetWriter.C rename to src/sampling/sampledSet/writers/csv/csvSetWriter.C index 49142090b6..e57ba53d1a 100644 --- a/src/fileFormats/sampledSetWriters/csv/csvSetWriter.C +++ b/src/sampling/sampledSet/writers/csv/csvSetWriter.C @@ -33,7 +33,7 @@ License template Foam::csvSetWriter::csvSetWriter() : - writer() + setWriter() {} diff --git a/src/fileFormats/sampledSetWriters/csv/csvSetWriter.H b/src/sampling/sampledSet/writers/csv/csvSetWriter.H similarity index 96% rename from src/fileFormats/sampledSetWriters/csv/csvSetWriter.H rename to src/sampling/sampledSet/writers/csv/csvSetWriter.H index 7718f3d6ab..2a9c5048bb 100644 --- a/src/fileFormats/sampledSetWriters/csv/csvSetWriter.H +++ b/src/sampling/sampledSet/writers/csv/csvSetWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ SourceFiles #ifndef csvSetWriter_H #define csvSetWriter_H -#include "writer.H" +#include "setWriter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +49,7 @@ namespace Foam template class csvSetWriter : - public writer + public setWriter { // Private Member Functions diff --git a/src/fileFormats/sampledSetWriters/csv/csvSetWriterRunTime.C b/src/sampling/sampledSet/writers/csv/csvSetWriterRunTime.C similarity index 94% rename from src/fileFormats/sampledSetWriters/csv/csvSetWriterRunTime.C rename to src/sampling/sampledSet/writers/csv/csvSetWriterRunTime.C index 549ea2aa7c..41cb3fa71d 100644 --- a/src/fileFormats/sampledSetWriters/csv/csvSetWriterRunTime.C +++ b/src/sampling/sampledSet/writers/csv/csvSetWriterRunTime.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "csvSetWriter.H" -#include "writers.H" +#include "setWriters.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.C b/src/sampling/sampledSet/writers/ensight/ensightSetWriter.C similarity index 99% rename from src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.C rename to src/sampling/sampledSet/writers/ensight/ensightSetWriter.C index 67e65c26f0..376e6bd58d 100644 --- a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.C +++ b/src/sampling/sampledSet/writers/ensight/ensightSetWriter.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ License template Foam::ensightSetWriter::ensightSetWriter() : - writer() + setWriter() {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.H b/src/sampling/sampledSet/writers/ensight/ensightSetWriter.H similarity index 96% rename from src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.H rename to src/sampling/sampledSet/writers/ensight/ensightSetWriter.H index c7e67892d4..b53af6e76c 100644 --- a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.H +++ b/src/sampling/sampledSet/writers/ensight/ensightSetWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ SourceFiles #ifndef ensightSetWriter_H #define ensightSetWriter_H -#include "writer.H" +#include "setWriter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +48,7 @@ namespace Foam template class ensightSetWriter : - public writer + public setWriter { public: diff --git a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriterRunTime.C b/src/sampling/sampledSet/writers/ensight/ensightSetWriterRunTime.C similarity index 94% rename from src/fileFormats/sampledSetWriters/ensight/ensightSetWriterRunTime.C rename to src/sampling/sampledSet/writers/ensight/ensightSetWriterRunTime.C index 350482b3b5..b5a5f122c1 100644 --- a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriterRunTime.C +++ b/src/sampling/sampledSet/writers/ensight/ensightSetWriterRunTime.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "ensightSetWriter.H" -#include "writers.H" +#include "setWriters.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.C b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.C similarity index 97% rename from src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.C rename to src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.C index b29588032a..67beeb52eb 100644 --- a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.C +++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ License template Foam::gnuplotSetWriter::gnuplotSetWriter() : - writer() + setWriter() {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.H b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H similarity index 96% rename from src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.H rename to src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H index bbb0520d23..49f3189cdb 100644 --- a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.H +++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ SourceFiles #ifndef gnuplotSetWriter_H #define gnuplotSetWriter_H -#include "writer.H" +#include "setWriter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +48,7 @@ namespace Foam template class gnuplotSetWriter : - public writer + public setWriter { public: diff --git a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriterRunTime.C b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriterRunTime.C similarity index 94% rename from src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriterRunTime.C rename to src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriterRunTime.C index cff4402a1b..1ddba6ecdc 100644 --- a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriterRunTime.C +++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriterRunTime.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "gnuplotSetWriter.H" -#include "writers.H" +#include "setWriters.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.C b/src/sampling/sampledSet/writers/jplot/jplotSetWriter.C similarity index 97% rename from src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.C rename to src/sampling/sampledSet/writers/jplot/jplotSetWriter.C index bf470d9f92..4020581be8 100644 --- a/src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.C +++ b/src/sampling/sampledSet/writers/jplot/jplotSetWriter.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,7 +47,7 @@ Foam::Ostream& Foam::jplotSetWriter::writeHeader(Ostream& os) const template Foam::jplotSetWriter::jplotSetWriter() : - writer() + setWriter() {} diff --git a/src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.H b/src/sampling/sampledSet/writers/jplot/jplotSetWriter.H similarity index 96% rename from src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.H rename to src/sampling/sampledSet/writers/jplot/jplotSetWriter.H index 514ddca35a..83a6e01d46 100644 --- a/src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.H +++ b/src/sampling/sampledSet/writers/jplot/jplotSetWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ SourceFiles #ifndef jplotSetWriter_H #define jplotSetWriter_H -#include "writer.H" +#include "setWriter.H" #include "vector.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,7 +47,7 @@ namespace Foam template class jplotSetWriter : - public writer + public setWriter { // Private Member Functions diff --git a/src/fileFormats/sampledSetWriters/jplot/jplotSetWriterRunTime.C b/src/sampling/sampledSet/writers/jplot/jplotSetWriterRunTime.C similarity index 94% rename from src/fileFormats/sampledSetWriters/jplot/jplotSetWriterRunTime.C rename to src/sampling/sampledSet/writers/jplot/jplotSetWriterRunTime.C index f73b48f7ac..85479da2bb 100644 --- a/src/fileFormats/sampledSetWriters/jplot/jplotSetWriterRunTime.C +++ b/src/sampling/sampledSet/writers/jplot/jplotSetWriterRunTime.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "jplotSetWriter.H" -#include "writers.H" +#include "setWriters.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fileFormats/sampledSetWriters/raw/rawSetWriter.C b/src/sampling/sampledSet/writers/raw/rawSetWriter.C similarity index 97% rename from src/fileFormats/sampledSetWriters/raw/rawSetWriter.C rename to src/sampling/sampledSet/writers/raw/rawSetWriter.C index 15fb9bebde..c544cfea6f 100644 --- a/src/fileFormats/sampledSetWriters/raw/rawSetWriter.C +++ b/src/sampling/sampledSet/writers/raw/rawSetWriter.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ License template Foam::rawSetWriter::rawSetWriter() : - writer() + setWriter() {} diff --git a/src/fileFormats/sampledSetWriters/raw/rawSetWriter.H b/src/sampling/sampledSet/writers/raw/rawSetWriter.H similarity index 96% rename from src/fileFormats/sampledSetWriters/raw/rawSetWriter.H rename to src/sampling/sampledSet/writers/raw/rawSetWriter.H index 6c68bcfb02..9987999f60 100644 --- a/src/fileFormats/sampledSetWriters/raw/rawSetWriter.H +++ b/src/sampling/sampledSet/writers/raw/rawSetWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ SourceFiles #ifndef rawSetWriter_H #define rawSetWriter_H -#include "writer.H" +#include "setWriter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +48,7 @@ namespace Foam template class rawSetWriter : - public writer + public setWriter { public: diff --git a/src/fileFormats/sampledSetWriters/raw/rawSetWriterRunTime.C b/src/sampling/sampledSet/writers/raw/rawSetWriterRunTime.C similarity index 94% rename from src/fileFormats/sampledSetWriters/raw/rawSetWriterRunTime.C rename to src/sampling/sampledSet/writers/raw/rawSetWriterRunTime.C index 0ad2fdf4a0..5942955f42 100644 --- a/src/fileFormats/sampledSetWriters/raw/rawSetWriterRunTime.C +++ b/src/sampling/sampledSet/writers/raw/rawSetWriterRunTime.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "rawSetWriter.H" -#include "writers.H" +#include "setWriters.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fileFormats/sampledSetWriters/writer.C b/src/sampling/sampledSet/writers/setWriter.C similarity index 85% rename from src/fileFormats/sampledSetWriters/writer.C rename to src/sampling/sampledSet/writers/setWriter.C index 79c2bf2b85..a2c5ec8e9d 100644 --- a/src/fileFormats/sampledSetWriters/writer.C +++ b/src/sampling/sampledSet/writers/setWriter.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "writer.H" +#include "setWriter.H" #include "coordSet.H" #include "OFstream.H" #include "OSspecific.H" @@ -31,7 +31,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // template -Foam::autoPtr> Foam::writer::New +Foam::autoPtr> Foam::setWriter::New ( const word& writeType ) @@ -49,14 +49,14 @@ Foam::autoPtr> Foam::writer::New << exit(FatalError); } - return autoPtr>(cstrIter()()); + return autoPtr>(cstrIter()()); } // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // template -Foam::fileName Foam::writer::getBaseName +Foam::fileName Foam::setWriter::getBaseName ( const coordSet& points, const wordList& valueSets @@ -74,7 +74,7 @@ Foam::fileName Foam::writer::getBaseName template -void Foam::writer::writeCoord +void Foam::setWriter::writeCoord ( const coordSet& points, const label pointi, @@ -93,7 +93,7 @@ void Foam::writer::writeCoord template -void Foam::writer::writeTable +void Foam::setWriter::writeTable ( const coordSet& points, const List& values, @@ -111,7 +111,7 @@ void Foam::writer::writeTable template -void Foam::writer::writeTable +void Foam::setWriter::writeTable ( const coordSet& points, const List*>& valuesPtrList, @@ -137,21 +137,21 @@ void Foam::writer::writeTable // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::writer::writer() +Foam::setWriter::setWriter() {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template -Foam::writer::~writer() +Foam::setWriter::~setWriter() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void Foam::writer::write +void Foam::setWriter::write ( const coordSet& points, const wordList& valueSetNames, @@ -169,7 +169,7 @@ void Foam::writer::write template -Foam::Ostream& Foam::writer::write +Foam::Ostream& Foam::setWriter::write ( const scalar value, Ostream& os @@ -181,7 +181,7 @@ Foam::Ostream& Foam::writer::write template template -Foam::Ostream& Foam::writer::writeVS +Foam::Ostream& Foam::setWriter::writeVS ( const VSType& value, Ostream& os @@ -201,7 +201,7 @@ Foam::Ostream& Foam::writer::writeVS template -void Foam::writer::writeSeparator +void Foam::setWriter::writeSeparator ( Ostream& os ) const @@ -211,7 +211,7 @@ void Foam::writer::writeSeparator template -Foam::Ostream& Foam::writer::write +Foam::Ostream& Foam::setWriter::write ( const vector& value, Ostream& os @@ -222,7 +222,7 @@ Foam::Ostream& Foam::writer::write template -Foam::Ostream& Foam::writer::write +Foam::Ostream& Foam::setWriter::write ( const sphericalTensor& value, Ostream& os @@ -233,7 +233,7 @@ Foam::Ostream& Foam::writer::write template -Foam::Ostream& Foam::writer::write +Foam::Ostream& Foam::setWriter::write ( const symmTensor& value, Ostream& os @@ -244,7 +244,7 @@ Foam::Ostream& Foam::writer::write template -Foam::Ostream& Foam::writer::write +Foam::Ostream& Foam::setWriter::write ( const tensor& value, Ostream& os diff --git a/src/fileFormats/sampledSetWriters/writer.H b/src/sampling/sampledSet/writers/setWriter.H similarity index 91% rename from src/fileFormats/sampledSetWriters/writer.H rename to src/sampling/sampledSet/writers/setWriter.H index 00b0372070..a6d7bca2c6 100644 --- a/src/fileFormats/sampledSetWriters/writer.H +++ b/src/sampling/sampledSet/writers/setWriter.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::writer + Foam::setWriter Description Base class for graphics format writing. Entry points are @@ -34,8 +34,9 @@ Description Example: \verbatim - // Construct writer of xmgr type - autoPtr> scalarFormatter(writer::New("xmgr")); + // Construct setWriter of xmgr type + autoPtr> scalarFormatter = + setWriter::New("xmgr"); // Output list of points and corresponding values scalarFormatter().write @@ -47,12 +48,12 @@ Description \endverbatim SourceFiles - writer.C + setWriter.C \*---------------------------------------------------------------------------*/ -#ifndef writer_H -#define writer_H +#ifndef setWriter_H +#define setWriter_H #include "fileName.H" #include "wordList.H" @@ -72,11 +73,11 @@ namespace Foam class coordSet; /*---------------------------------------------------------------------------*\ - Class writer Declaration + Class setWriter Declaration \*---------------------------------------------------------------------------*/ template -class writer +class setWriter { protected: @@ -108,14 +109,14 @@ protected: public: //- Runtime type information - TypeName("writer"); + TypeName("setWriter"); // Declare run-time constructor selection table declareRunTimeSelectionTable ( autoPtr, - writer, + setWriter, word, (), () @@ -124,18 +125,18 @@ public: // Selectors - //- Return a reference to the selected writer - static autoPtr New(const word& writeFormat); + //- Return a reference to the selected setWriter + static autoPtr New(const word& writeFormat); // Constructors //- Construct null - writer(); + setWriter(); //- Destructor - virtual ~writer() = 0; + virtual ~setWriter() = 0; // Member Functions @@ -209,7 +210,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository - #include "writer.C" + #include "setWriter.C" #endif diff --git a/src/fileFormats/sampledSetWriters/writers.C b/src/sampling/sampledSet/writers/setWriters.C similarity index 87% rename from src/fileFormats/sampledSetWriters/writers.C rename to src/sampling/sampledSet/writers/setWriters.C index ce3ebbb14a..eaa2b65df6 100644 --- a/src/fileFormats/sampledSetWriters/writers.C +++ b/src/sampling/sampledSet/writers/setWriters.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "writers.H" +#include "setWriters.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -33,8 +33,8 @@ namespace Foam // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // #define defineSetWriterType(dataType) \ - defineNamedTemplateTypeNameAndDebug(writer, 0); \ - defineTemplatedRunTimeSelectionTable(writer, word, dataType); + defineNamedTemplateTypeNameAndDebug(setWriter, 0); \ + defineTemplatedRunTimeSelectionTable(setWriter, word, dataType); defineSetWriterType(scalar); defineSetWriterType(vector); diff --git a/src/fileFormats/sampledSetWriters/writers.H b/src/sampling/sampledSet/writers/setWriters.H similarity index 93% rename from src/fileFormats/sampledSetWriters/writers.H rename to src/sampling/sampledSet/writers/setWriters.H index 66b98b8483..51ddfcd051 100644 --- a/src/fileFormats/sampledSetWriters/writers.H +++ b/src/sampling/sampledSet/writers/setWriters.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,17 +22,17 @@ License along with OpenFOAM. If not, see . InClass - Foam::writer + Foam::setWriter SourceFiles - writers.C + setWriters.C \*---------------------------------------------------------------------------*/ -#ifndef writers_H -#define writers_H +#ifndef setWriters_H +#define setWriters_H -#include "writer.H" +#include "setWriter.H" #include "fieldTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,7 +58,7 @@ SourceFiles defineNamedTemplateTypeNameAndDebug(typeWriter, 0); \ addTemplatedToRunTimeSelectionTable \ ( \ - writer, typeWriter, dataType, word \ + setWriter, typeWriter, dataType, word \ ) diff --git a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.C b/src/sampling/sampledSet/writers/vtk/vtkSetWriter.C similarity index 96% rename from src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.C rename to src/sampling/sampledSet/writers/vtk/vtkSetWriter.C index 6095bc5e70..004d2bde9f 100644 --- a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.C +++ b/src/sampling/sampledSet/writers/vtk/vtkSetWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ License template Foam::vtkSetWriter::vtkSetWriter() : - writer() + setWriter() {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -102,7 +102,7 @@ void Foam::vtkSetWriter::write { os << ' '; } - writer::write(fld[pointi], os); + setWriter::write(fld[pointi], os); } os << nl; } @@ -190,7 +190,7 @@ void Foam::vtkSetWriter::write { os << ' '; } - writer::write(vals[j], os); + setWriter::write(vals[j], os); } os << nl; } diff --git a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.H b/src/sampling/sampledSet/writers/vtk/vtkSetWriter.H similarity index 96% rename from src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.H rename to src/sampling/sampledSet/writers/vtk/vtkSetWriter.H index 6767d51e56..7fda9684cc 100644 --- a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.H +++ b/src/sampling/sampledSet/writers/vtk/vtkSetWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ SourceFiles #ifndef vtkSetWriter_H #define vtkSetWriter_H -#include "writer.H" +#include "setWriter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +48,7 @@ namespace Foam template class vtkSetWriter : - public writer + public setWriter { public: diff --git a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriterRunTime.C b/src/sampling/sampledSet/writers/vtk/vtkSetWriterRunTime.C similarity index 94% rename from src/fileFormats/sampledSetWriters/vtk/vtkSetWriterRunTime.C rename to src/sampling/sampledSet/writers/vtk/vtkSetWriterRunTime.C index b63baaab3a..277a5e536f 100644 --- a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriterRunTime.C +++ b/src/sampling/sampledSet/writers/vtk/vtkSetWriterRunTime.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "vtkSetWriter.H" -#include "writers.H" +#include "setWriters.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.C b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.C similarity index 97% rename from src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.C rename to src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.C index 8703a759f4..53443636ac 100644 --- a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.C +++ b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ License template Foam::xmgraceSetWriter::xmgraceSetWriter() : - writer() + setWriter() {} diff --git a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.H b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.H similarity index 96% rename from src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.H rename to src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.H index 302fdfa3be..a47900c0df 100644 --- a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.H +++ b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ SourceFiles #ifndef xmgraceSetWriter_H #define xmgraceSetWriter_H -#include "writer.H" +#include "setWriter.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +48,7 @@ namespace Foam template class xmgraceSetWriter : - public writer + public setWriter { public: diff --git a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriterRunTime.C b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriterRunTime.C similarity index 94% rename from src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriterRunTime.C rename to src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriterRunTime.C index 4cc5e87ded..3226f48b9f 100644 --- a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriterRunTime.C +++ b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriterRunTime.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-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "xmgraceSetWriter.H" -#include "writers.H" +#include "setWriters.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //