All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
timeStepFunctionObject.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::functionObjects::timeStep
26 
27 Description
28  Writes the time step
29 
30  Example of function object specification:
31  \verbatim
32  timeStep
33  {
34  type timeStep;
35  writeControl timeStep;
36  writeInterval 1;
37  }
38  \endverbatim
39 
40  Output data is written to the dir postProcessing/timeStep/<timeDir>/
41 
42 See also
43  Foam::functionObject
44  Foam::functionObjects::regionFunctionObject
45  Foam::functionObjects::logFiles
46 
47 SourceFiles
48  timeStep.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef timeStepFunctionObject_H
53 #define timeStepFunctionObject_H
54 
55 #include "regionFunctionObject.H"
56 #include "logFiles.H"
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 namespace functionObjects
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class timeStep Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 class timeStep
70 :
71  public regionFunctionObject,
72  public logFiles
73 {
74 
75 protected:
76 
77  // Protected Member Functions
78 
79  //- Output file header information
80  virtual void writeFileHeader(const label i);
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("timeStep");
87 
88 
89  // Constructors
90 
91  //- Construct from Time and dictionary
92  timeStep
93  (
94  const word& name,
95  const Time& runTime,
96  const dictionary& dict
97  );
98 
99  //- Disallow default bitwise copy construction
100  timeStep(const timeStep&) = delete;
101 
102 
103  //- Destructor
104  virtual ~timeStep();
105 
106 
107  // Member Functions
108 
109  //- Read the controls
110  virtual bool read(const dictionary&);
111 
112  //- Execute, currently does nothing
113  virtual bool execute();
114 
115  //- Write the time step value
116  virtual bool write();
117 
118 
119  // Member Operators
120 
121  //- Disallow default bitwise assignment
122  void operator=(const timeStep&) = delete;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace functionObjects
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Specialisation of Foam::functionObject for a region and providing a reference to the region Foam::obj...
TypeName("timeStep")
Runtime type information.
dictionary dict
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
const word & name() const
Return the name of this functionObject.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
engineTime & runTime
virtual void writeFileHeader(const label i)
Output file header information.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
void operator=(const timeStep &)=delete
Disallow default bitwise assignment.
virtual bool write()
Write the time step value.
timeStep(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
A class for handling words, derived from string.
Definition: word.H:59
virtual bool execute()
Execute, currently does nothing.
virtual bool read(const dictionary &)
Read the controls.
Namespace for OpenFOAM.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
Definition: logFiles.H:57