setWriters: Added "none" set writer to disable writing

This commit is contained in:
Will Bainbridge
2022-01-27 12:50:12 +00:00
parent b668052a76
commit 27d2ec6d43
3 changed files with 141 additions and 0 deletions

View File

@ -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

View File

@ -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 <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#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()
{}
// ************************************************************************* //

View File

@ -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 <http://www.gnu.org/licenses/>.
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<const Field<Type>>& Type##ValueSets
FOR_ALL_FIELD_TYPES(TypeValueSetsConstArg)
#undef TypeValueSetsConstArg
) const
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //