realTime.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) 2021-2026 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::userTimes::real
26 
27 Description
28  A simple userTime which simply returns the real-time is seconds.
29 
30 SourceFiles
31  realTime.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef realTime_H
36 #define realTime_H
37 
38 #include "userTime.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace userTimes
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class real Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class real
52 :
53  public userTime
54 {
55 public:
56 
57  //- Runtime type information
58  TypeName("real");
59 
60 
61  // Constructors
62 
63  //- Construct from controlDict
64  real(const dictionary& controlDict);
65 
66 
67  //- Destructor
68  virtual ~real();
69 
70 
71  // Member Functions
72 
73  //- Return tau (s)
74  virtual scalar userTimeToTime(const scalar tau) const;
75 
76  //- Return t (s)
77  virtual scalar timeToUserTime(const scalar t) const;
78 
79  //- Return real-time unit name (s)
80  virtual word unitName() const;
81 
82  //- Return the real-time unit conversion
83  virtual const unitSet& units() const;
84 
85  //- Read the controlDict and set all the parameters
86  virtual bool read(const dictionary& controlDict);
87 };
88 
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 } // End namespace userTimes
93 } // End namespace Foam
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 #endif
98 
99 // ************************************************************************* //
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
Definition: unitSet.H:68
A simple userTime which simply returns the real-time is seconds.
Definition: realTime.H:53
virtual scalar timeToUserTime(const scalar t) const
Return t (s)
Definition: realTime.C:63
real(const dictionary &controlDict)
Construct from controlDict.
Definition: realTime.C:43
virtual word unitName() const
Return real-time unit name (s)
Definition: realTime.C:69
virtual scalar userTimeToTime(const scalar tau) const
Return tau (s)
Definition: realTime.C:57
virtual ~real()
Destructor.
Definition: realTime.C:51
virtual bool read(const dictionary &controlDict)
Read the controlDict and set all the parameters.
Definition: realTime.C:82
TypeName("real")
Runtime type information.
virtual const unitSet & units() const
Return the real-time unit conversion.
Definition: realTime.C:75
A class for handling words, derived from string.
Definition: word.H:63
const vector tau
Namespace for OpenFOAM.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep