OpenFOAM: API Guide
v2112
The open source CFD toolbox
TimeState.C
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) 2011-2016 OpenFOAM Foundation
9
Copyright (C) 2018 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
\*---------------------------------------------------------------------------*/
28
29
#include "
TimeState.H
"
30
#include "
Time.H
"
31
32
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
33
34
Foam::TimeState::TimeState
()
35
:
36
dimensionedScalar
(
Time
::
timeName
(0),
dimTime
, 0),
37
timeIndex_(0),
38
writeTimeIndex_(0),
39
deltaT_(0),
40
deltaT0_(0),
41
deltaTSave_(0),
42
deltaTchanged_(false),
43
writeTime_(false)
44
{}
45
46
47
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
48
49
Foam::scalar
Foam::TimeState::userTimeToTime
(
const
scalar theta)
const
50
{
51
return
theta;
52
}
53
54
55
Foam::scalar
Foam::TimeState::timeToUserTime
(
const
scalar t)
const
56
{
57
return
t;
58
}
59
60
61
// ************************************************************************* //
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition:
Time.H:73
Foam::TimeState::TimeState
TimeState()
Construct a zero time state, using the current time formatting.
Definition:
TimeState.C:34
Foam::TimeState::timeToUserTime
virtual scalar timeToUserTime(const scalar t) const
Convert the real-time (s) into user-time (e.g. CA deg)
Definition:
TimeState.C:55
Foam::TimeState::userTimeToTime
virtual scalar userTimeToTime(const scalar theta) const
Convert the user-time (e.g. CA deg) to real-time (s).
Definition:
TimeState.C:49
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition:
dimensionSets.H:53
timeName
word timeName
Definition:
getTimeIndex.H:3
Foam::dimensioned< scalar >
Time.H
TimeState.H
src
OpenFOAM
db
Time
TimeState.C
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.