writeCellCentres.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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::functionObjects::writeCellCentres
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Writes the cell-centres volVectorField and the three component fields as
35 \c volScalarFields.
36
37 Operands:
38 \table
39 Operand | Type | Location
40 input | - | -
41 output file | - | -
42 output field 1 | volVectorField | $FOAM_CASE/<time>/C
43 output field 2 | volScalarField | $FOAM_CASE/<time>/{Cx,Cy,Cz}
44 \endtable
45
46Usage
47 Minimal example by using \c system/controlDict.functions:
48 \verbatim
49 writeCellCentres
50 {
51 // Mandatory entries (unmodifiable)
52 type writeCellCentres;
53 libs (fieldFunctionObjects);
54
55 // Optional (inherited) entries
56 ...
57 }
58 \endverbatim
59
60 where the entries mean:
61 \table
62 Property | Description | Type | Req'd | Dflt
63 type | Type name: writeCellCentres | word | yes | -
64 libs | Library name: fieldFunctionObjects | word | yes | -
65 \endtable
66
67 The inherited entries are elaborated in:
68 - \link functionObject.H \endlink
69
70 Minimal example by using the \c postProcess utility:
71 \verbatim
72 postProcess -func writeCellCentres
73 \endverbatim
74
75See also
76 - Foam::functionObject
77 - Foam::functionObjects::fvMeshFunctionObject
78 - ExtendedCodeGuide::functionObjects::field::writeCellCentres
79
80SourceFiles
81 writeCellCentres.C
82
83\*---------------------------------------------------------------------------*/
84
85#ifndef functionObjects_writeCellCentres_H
86#define functionObjects_writeCellCentres_H
87
89
90// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91
92namespace Foam
93{
94namespace functionObjects
95{
96
97/*---------------------------------------------------------------------------*\
98 Class writeCellCentres Declaration
99\*---------------------------------------------------------------------------*/
100
101class writeCellCentres
102:
103 public fvMeshFunctionObject
104{
105public:
106
107 //- Runtime type information
108 TypeName("writeCellCentres");
109
110
111 // Constructors
112
113 //- Construct from Time and dictionary
115 (
116 const word& name,
117 const Time& runTime,
118 const dictionary& dict
119 );
120
121 //- No copy construct
122 writeCellCentres(const writeCellCentres&) = delete;
123
124 //- No copy assignment
125 void operator=(const writeCellCentres&) = delete;
126
127
128 //- Destructor
129 virtual ~writeCellCentres() = default;
130
131
132 // Member Functions
133
134 //- Read the cell-centre rate data
135 virtual bool read(const dictionary&);
136
137 //- Do nothing
138 virtual bool execute();
139
140 //- Write the cell-centre fields
141 virtual bool write();
142};
143
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147} // End namespace functionObjects
148} // End namespace Foam
149
150// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151
152#endif
153
154// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Writes the cell-centres volVectorField and the three component fields as volScalarFields.
void operator=(const writeCellCentres &)=delete
No copy assignment.
TypeName("writeCellCentres")
Runtime type information.
writeCellCentres(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual ~writeCellCentres()=default
Destructor.
writeCellCentres(const writeCellCentres &)=delete
No copy construct.
virtual bool write()
Write the cell-centre fields.
virtual bool read(const dictionary &)
Read the cell-centre rate data.
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73