writeCellVolumes.H
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) 2016 OpenFOAM Foundation
9  Copyright (C) 2016-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::functionObjects::writeCellVolumes
29 
30 Group
31  grpFieldFunctionObjects
32 
33 Description
34  Writes the cell-volumes \c volScalarField.
35 
36  Operands:
37  \table
38  Operand | Type | Location
39  input | - | -
40  output file | - | -
41  output field | volScalarField | $FOAM_CASE/<time>/V
42  \endtable
43 
44 Usage
45  Minimal example by using \c system/controlDict.functions:
46  \verbatim
47  writeCellVolumes
48  {
49  // Mandatory entries (unmodifiable)
50  type writeCellVolumes;
51  libs (fieldFunctionObjects);
52 
53  // Optional (inherited) entries
54  ...
55  }
56  \endverbatim
57 
58  where the entries mean:
59  \table
60  Property | Description | Type | Req'd | Dflt
61  type | Type name: writeCellVolumes | word | yes | -
62  libs | Library name: fieldFunctionObjects | word | yes | -
63  \endtable
64 
65  The inherited entries are elaborated in:
66  - \link functionObject.H \endlink
67 
68  Minimal example by using the \c postProcess utility:
69  \verbatim
70  postProcess -func writeCellVolumes
71  \endverbatim
72 
73 See also
74  - Foam::functionObject
75  - Foam::functionObjects::fvMeshFunctionObject
76  - ExtendedCodeGuide::functionObjects::field::writeCellVolumes
77 
78 SourceFiles
79  writeCellVolumes.C
80 
81 \*---------------------------------------------------------------------------*/
82 
83 #ifndef functionObjects_writeCellVolumes_H
84 #define functionObjects_writeCellVolumes_H
85 
86 #include "fvMeshFunctionObject.H"
87 
88 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89 
90 namespace Foam
91 {
92 namespace functionObjects
93 {
94 
95 /*---------------------------------------------------------------------------*\
96  Class writeCellVolumes Declaration
97 \*---------------------------------------------------------------------------*/
98 
99 class writeCellVolumes
100 :
101  public fvMeshFunctionObject
102 {
103 public:
104 
105  //- Runtime type information
106  TypeName("writeCellVolumes");
107 
108 
109  // Constructors
110 
111  //- Construct from Time and dictionary
113  (
114  const word& name,
115  const Time& runTime,
116  const dictionary& dict
117  );
118 
119  //- No copy construct
120  writeCellVolumes(const writeCellVolumes&) = delete;
121 
122  //- No copy assignment
123  void operator=(const writeCellVolumes&) = delete;
124 
125 
126  //- Destructor
127  virtual ~writeCellVolumes() = default;
129 
130  // Member Functions
131 
132  //- Read the cell-volume data
133  virtual bool read(const dictionary&);
134 
135  //- Do nothing
136  virtual bool execute();
137 
138  //- Write the cell-volume fields
139  virtual bool write();
140 };
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace functionObjects
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
void operator=(const writeCellVolumes &)=delete
No copy assignment.
engineTime & runTime
virtual bool write()
Write the cell-volume fields.
const word & name() const noexcept
Return the name of this functionObject.
virtual bool read(const dictionary &)
Read the cell-volume data.
TypeName("writeCellVolumes")
Runtime type information.
virtual bool execute()
Do nothing.
virtual ~writeCellVolumes()=default
Destructor.
writeCellVolumes(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Namespace for OpenFOAM.