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  Copyright (C) 2021 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 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
30 
31 inline Foam::scalar Foam::TimeState::timeOutputValue() const
32 {
34 }
35 
36 
37 inline const Foam::word& Foam::TimeState::timeName() const noexcept
38 {
39  return dimensionedScalar::name();
40 }
41 
42 
43 // FUTURE?
44 // inline Foam::scalar Foam::TimeState::timeValue() const noexcept
45 // {
46 // return dimensionedScalar::value();
47 // }
48 
49 
50 inline Foam::label Foam::TimeState::timeIndex() const noexcept
51 {
52  return timeIndex_;
53 }
54 
55 
56 inline Foam::scalar Foam::TimeState::deltaTValue() const noexcept
57 {
58  return deltaT_;
59 }
60 
61 
62 inline Foam::scalar Foam::TimeState::deltaT0Value() const noexcept
63 {
64  return deltaT0_;
65 }
66 
67 
69 {
70  return dimensionedScalar("deltaT", dimTime, deltaT_);
71 }
72 
73 
75 {
76  return dimensionedScalar("deltaT0", dimTime, deltaT0_);
77 }
78 
79 
80 inline bool Foam::TimeState::writeTime() const noexcept
81 {
82  return writeTime_;
83 }
84 
85 
86 // ************************************************************************* //
const scalar & value() const noexcept
Return const reference to value.
dimensionedScalar deltaT0() const
Return old time step.
Definition: TimeStateI.H:67
scalar deltaTValue() const noexcept
Return time step value.
Definition: TimeStateI.H:49
bool writeTime() const noexcept
True if this is a write interval.
Definition: TimeStateI.H:73
const word & timeName() const noexcept
Return the current time name.
Definition: TimeStateI.H:30
virtual scalar timeToUserTime(const scalar t) const
Convert the real-time (s) into user-time (e.g. CA deg)
Definition: TimeState.C:48
A class for handling words, derived from Foam::string.
Definition: word.H:63
label timeIndex() const noexcept
Return the current time index.
Definition: TimeStateI.H:43
const direction noexcept
Definition: Scalar.H:258
scalar deltaT0Value() const noexcept
Return old time step value.
Definition: TimeStateI.H:55
const word & name() const noexcept
Return const reference to name.
scalar timeOutputValue() const
Return the current user-time value. (ie, after applying any timeToUserTime() conversion) ...
Definition: TimeStateI.H:24
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:61