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 -------------------------------------------------------------------------------
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::writeCellCentres
29 
30 Group
31  grpFieldFunctionObjects
32 
33 Description
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 
46 Usage
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 
75 See also
76  - Foam::functionObject
77  - Foam::functionObjects::fvMeshFunctionObject
78  - ExtendedCodeGuide::functionObjects::field::writeCellCentres
79 
80 SourceFiles
81  writeCellCentres.C
82 
83 \*---------------------------------------------------------------------------*/
84 
85 #ifndef functionObjects_writeCellCentres_H
86 #define functionObjects_writeCellCentres_H
87 
88 #include "fvMeshFunctionObject.H"
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 namespace Foam
93 {
94 namespace functionObjects
95 {
96 
97 /*---------------------------------------------------------------------------*\
98  Class writeCellCentres Declaration
99 \*---------------------------------------------------------------------------*/
100 
101 class writeCellCentres
102 :
103  public fvMeshFunctionObject
104 {
105 public:
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 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::functionObjects::writeCellCentres::read
virtual bool read(const dictionary &)
Read the cell-centre rate data.
Definition: writeCellCentres.C:62
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
fvMeshFunctionObject.H
Foam::functionObjects::writeCellCentres::TypeName
TypeName("writeCellCentres")
Runtime type information.
Foam::functionObjects::writeCellCentres::writeCellCentres
writeCellCentres(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: writeCellCentres.C:48
Foam::functionObjects::fvMeshFunctionObject
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Definition: fvMeshFunctionObject.H:64
Foam::functionObjects::writeCellCentres
Writes the cell-centres volVectorField and the three component fields as volScalarFields.
Definition: writeCellCentres.H:138
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::writeCellCentres::execute
virtual bool execute()
Do nothing.
Definition: writeCellCentres.C:68
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::functionObjects::writeCellCentres::operator=
void operator=(const writeCellCentres &)=delete
No copy assignment.
Foam::functionObject::name
const word & name() const noexcept
Return the name of this functionObject.
Definition: functionObject.C:143
Foam::functionObjects::writeCellCentres::write
virtual bool write()
Write the cell-centre fields.
Definition: writeCellCentres.C:74
Foam::functionObjects::writeCellCentres::~writeCellCentres
virtual ~writeCellCentres()=default
Destructor.