TimeStateI.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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29 
30 inline Foam::scalar Foam::TimeState::timeOutputValue() const
31 {
32  return timeToUserTime(value());
33 }
34 
35 
36 inline Foam::label Foam::TimeState::timeIndex() const
37 {
38  return timeIndex_;
39 }
40 
41 
42 inline Foam::scalar Foam::TimeState::deltaTValue() const
43 {
44  return deltaT_;
45 }
46 
47 
48 inline Foam::scalar Foam::TimeState::deltaT0Value() const
49 {
50  return deltaT0_;
51 }
52 
53 
55 {
56  return dimensionedScalar("deltaT", dimTime, deltaT_);
57 }
58 
59 
61 {
62  return dimensionedScalar("deltaT0", dimTime, deltaT0_);
63 }
64 
65 
66 inline bool Foam::TimeState::writeTime() const
67 {
68  return writeTime_;
69 }
70 
71 
72 // ************************************************************************* //
Foam::TimeState::timeOutputValue
scalar timeOutputValue() const
Return current time value.
Definition: TimeStateI.H:30
Foam::TimeState::deltaT
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:54
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::writeTime
bool writeTime() const
Return true if this is a write time.
Definition: TimeStateI.H:66
Foam::TimeState::deltaT0
dimensionedScalar deltaT0() const
Return old time step.
Definition: TimeStateI.H:60
Foam::dimensioned< scalar >::value
const scalar & value() const
Return const reference to value.
Definition: dimensionedType.C:434
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:54
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
Foam::dimensioned< scalar >
Foam::TimeState::deltaT0Value
scalar deltaT0Value() const
Return old time step value.
Definition: TimeStateI.H:48
Foam::TimeState::deltaTValue
scalar deltaTValue() const
Return time step value.
Definition: TimeStateI.H:42
Foam::TimeState::timeIndex
label timeIndex() const
Return current time index.
Definition: TimeStateI.H:36