Loading...
Searching...
No Matches
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 | <time>/C
43 output field 2 | volScalarField | <time>/{Cx,Cy,Cz}
44 \endtable
45
46Usage
47 Minimal example by using \c system/controlDict.functions:
48 \verbatim
49 writeCellCentresFO
50 {
51 // Mandatory entries
52 type writeCellCentres;
53 libs (fieldFunctionObjects);
54
55 // Inherited entries
56 ...
57 }
58 \endverbatim
59
60 where the entries mean:
61 \table
62 Property | Description | Type | Reqd | Deflt
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
70SourceFiles
71 writeCellCentres.C
72
73\*---------------------------------------------------------------------------*/
74
75#ifndef Foam_functionObjects_writeCellCentres_H
76#define Foam_functionObjects_writeCellCentres_H
77
79
80// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81
82namespace Foam
83{
84namespace functionObjects
85{
86
87/*---------------------------------------------------------------------------*\
88 Class writeCellCentres Declaration
89\*---------------------------------------------------------------------------*/
90
92:
94{
95public:
96
97 //- Runtime type information
98 TypeName("writeCellCentres");
99
100
101 // Constructors
102
103 //- Construct from name, Time and dictionary
105 (
106 const word& name,
107 const Time& runTime,
108 const dictionary& dict
109 );
110
111 //- No copy construct
112 writeCellCentres(const writeCellCentres&) = delete;
113
114 //- No copy assignment
115 void operator=(const writeCellCentres&) = delete;
116
117
118 //- Destructor
119 virtual ~writeCellCentres() = default;
120
121
122 // Member Functions
123
124 //- Read the function-object dictionary
125 virtual bool read(const dictionary& dict);
126
127 //- Execute the function-object operations
128 virtual bool execute();
129
130 //- Write the function-object results
131 virtual bool write();
132};
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace functionObjects
138} // End namespace Foam
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142#endif
143
144// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
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...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
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 name, Time and dictionary.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
virtual ~writeCellCentres()=default
Destructor.
writeCellCentres(const writeCellCentres &)=delete
No copy construct.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68