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;
128 
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 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::functionObjects::writeCellVolumes::write
virtual bool write()
Write the cell-volume fields.
Definition: writeCellVolumes.C:74
fvMeshFunctionObject.H
Foam::functionObjects::writeCellVolumes::writeCellVolumes
writeCellVolumes(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: writeCellVolumes.C:48
Foam::functionObjects::writeCellVolumes::execute
virtual bool execute()
Do nothing.
Definition: writeCellVolumes.C:68
Foam::functionObjects::writeCellVolumes::operator=
void operator=(const writeCellVolumes &)=delete
No copy assignment.
Foam::functionObjects::fvMeshFunctionObject
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Definition: fvMeshFunctionObject.H:64
Foam::functionObjects::writeCellVolumes::TypeName
TypeName("writeCellVolumes")
Runtime type information.
Foam::functionObjects::writeCellVolumes::~writeCellVolumes
virtual ~writeCellVolumes()=default
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::functionObjects::writeCellVolumes
Writes the cell-volumes volScalarField.
Definition: writeCellVolumes.H:132
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::functionObject::name
const word & name() const noexcept
Return the name of this functionObject.
Definition: functionObject.C:143
Foam::functionObjects::writeCellVolumes::read
virtual bool read(const dictionary &)
Read the cell-volume data.
Definition: writeCellVolumes.C:62