diff --git a/src/sampling/Make/files b/src/sampling/Make/files index b468012038..693e16d7ec 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -32,6 +32,7 @@ $(setWriters)/raw/rawSetWriter.C $(setWriters)/vtk/vtkSetWriter.C $(setWriters)/csv/csvSetWriter.C $(setWriters)/gnuplot/gnuplotSetWriter.C +$(setWriters)/none/noSetWriter.C cuttingPlane/cuttingPlane.C diff --git a/src/sampling/sampledSet/writers/none/noSetWriter.C b/src/sampling/sampledSet/writers/none/noSetWriter.C new file mode 100644 index 0000000000..5e9f756511 --- /dev/null +++ b/src/sampling/sampledSet/writers/none/noSetWriter.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 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 "noSetWriter.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(noSetWriter, 0); + addToRunTimeSelectionTable(setWriter, noSetWriter, word); + addToRunTimeSelectionTable(setWriter, noSetWriter, dict); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::noSetWriter::~noSetWriter() +{} + + +// ************************************************************************* // diff --git a/src/sampling/sampledSet/writers/none/noSetWriter.H b/src/sampling/sampledSet/writers/none/noSetWriter.H new file mode 100644 index 0000000000..d59b1bbdf9 --- /dev/null +++ b/src/sampling/sampledSet/writers/none/noSetWriter.H @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 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::noSetWriter + +Descr + A dummy setWriter selected to disable surface writing. + +SourceFiles + noSetWriter.C + +\*---------------------------------------------------------------------------*/ + +#ifndef noSetWriter_H +#define noSetWriter_H + +#include "setWriter.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class noSetWriter Declaration +\*---------------------------------------------------------------------------*/ + +class noSetWriter +: + public setWriter +{ +public: + + //- Runtime type information + TypeName("none"); + + + // Constructors + + //- Inherit constructors + using setWriter::setWriter; + + + //- Destructor + virtual ~noSetWriter(); + + + // Member Functions + + //- Write a coordSet and associated data + virtual void write + ( + const fileName& outputDir, + const fileName& setName, + const coordSet& set, + const wordList& valueSetNames + #define TypeValueSetsConstArg(Type, nullArg) \ + , const UPtrList>& Type##ValueSets + FOR_ALL_FIELD_TYPES(TypeValueSetsConstArg) + #undef TypeValueSetsConstArg + ) const + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //