nullSurfaceWriter.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2019 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "nullSurfaceWriter.H"
29 #include "surfaceWriterMethods.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 namespace surfaceWriters
37 {
38  defineTypeName(nullWriter);
39  addToRunTimeSelectionTable(surfaceWriter, nullWriter, word);
40  addToRunTimeSelectionTable(surfaceWriter, nullWriter, wordDict);
41 }
42 }
43 
44 
45 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 
48 :
50 {}
51 
52 
54 :
55  nullWriter()
56 {}
57 
58 
60 (
61  const meshedSurf& surf,
62  const fileName& outputPath,
63  bool parallel,
64  const dictionary& options
65 )
66 :
67  nullWriter()
68 {}
69 
70 
72 (
73  const pointField& points,
74  const faceList& faces,
75  const fileName& outputPath,
76  bool parallel,
77  const dictionary& options
78 )
79 :
80  nullWriter()
81 {}
82 
83 
84 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
85 
87 {
88  return false;
89 }
90 
91 
93 {
94  return true;
95 }
96 
97 
99 {
100  return false;
101 }
102 
103 
105 (
106  const meshedSurf& surf,
107  bool parallel
108 )
109 {}
110 
111 
113 (
114  const pointField& points,
115  const faceList& faces,
116  bool parallel
117 )
118 {}
119 
120 
122 {}
123 
124 
126 {
127  wroteGeom_ = true;
128  return fileName::null;
129 }
130 
131 
132 // Field writing methods
134 
135 
136 // ************************************************************************* //
defineSurfaceWriterWriteFields
defineSurfaceWriterWriteFields(Foam::surfaceWriters::nullWriter)
Foam::surfaceWriters::nullWriter::setSurface
virtual void setSurface(const meshedSurf &s, bool parallel)
Change association with a surface (no-op).
Definition: nullSurfaceWriter.C:105
Foam::surfaceWriter
Base class for surface writers.
Definition: surfaceWriter.H:114
Foam::fileName
A class for handling file names.
Definition: fileName.H:73
Foam::surfaceWriters::defineTypeName
defineTypeName(abaqusWriter)
Foam::meshedSurf
Abstract definition of a meshed surface defined by faces and points.
Definition: meshedSurf.H:49
nullSurfaceWriter.H
Foam::surfaceWriters::nullWriter::write
virtual fileName write()
Write separate surface geometry to file.
Definition: nullSurfaceWriter.C:125
surfaceWriterMethods.H
Convenience macros for instantiating surfaceWriter methods.
Foam::surfaceWriters::nullWriter::needsUpdate
virtual bool needsUpdate() const
False: never needs an update.
Definition: nullSurfaceWriter.C:86
Foam::surfaceWriters::nullWriter::nullWriter
nullWriter()
Default construct.
Definition: nullSurfaceWriter.C:47
Foam::surfaceWriters::nullWriter::nullWriter
nullWriter(const pointField &points, const faceList &faces, const fileName &outputPath, bool parallel=Pstream::parRun(), const dictionary &options=dictionary())
Construct from components.
Definition: nullSurfaceWriter.C:72
Foam::surfaceWriters::addToRunTimeSelectionTable
addToRunTimeSelectionTable(surfaceWriter, abaqusWriter, word)
Foam::Field< vector >
Foam::surfaceWriters::nullWriter
Suppresses output of geometry and fields.
Definition: nullSurfaceWriter.H:52
Foam::surfaceWriters::nullWriter::enabled
virtual bool enabled() const
Definition: nullSurfaceWriter.C:98
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::surfaceWriters::nullWriter::wroteData
virtual bool wroteData() const
True: like a /dev/null device.
Definition: nullSurfaceWriter.C:92
Foam::fileName::null
static const fileName null
An empty fileName.
Definition: fileName.H:101
Foam::List< face >
Foam::surfaceWriters::nullWriter::open
virtual void open(const fileName &outputPath)
Open for output on specified path, using existing surface (no-op)
Definition: nullSurfaceWriter.C:121
points
const pointField & points
Definition: gmvOutputHeader.H:1