setWriters: Added "none" set writer to disable writing
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
45
src/sampling/sampledSet/writers/none/noSetWriter.C
Normal file
45
src/sampling/sampledSet/writers/none/noSetWriter.C
Normal 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()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
95
src/sampling/sampledSet/writers/none/noSetWriter.H
Normal file
95
src/sampling/sampledSet/writers/none/noSetWriter.H
Normal 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
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user