The time value with time-stepping information, user-defined remapping, etc. More...
#include <TimeState.H>


Public Member Functions | |
| TimeState () | |
| Construct a zero time state, using the current time formatting. | |
| virtual | ~TimeState ()=default |
| Destructor. | |
| virtual scalar | userTimeToTime (const scalar theta) const |
| Convert the user-time (e.g. CA deg) to real-time (s). | |
| virtual scalar | timeToUserTime (const scalar t) const |
| Convert the real-time (s) into user-time (e.g. CA deg). | |
| scalar | timeOutputValue () const |
| Return the current user-time value. (ie, after applying any timeToUserTime() conversion). | |
| const word & | timeName () const noexcept |
| Return the current time name. | |
| label | timeIndex () const noexcept |
| Return the current time index. | |
| scalar | deltaTValue () const noexcept |
| Return time step value. | |
| scalar | deltaT0Value () const noexcept |
| Return old time step value. | |
| dimensionedScalar | deltaT () const |
| Return time step. | |
| dimensionedScalar | deltaT0 () const |
| Return old time step. | |
| bool | writeTime () const noexcept |
| True if this is a write interval. | |
| bool | outputTime () const noexcept |
| Deprecated(2016-05) return true if this is a write time. | |
| Public Member Functions inherited from dimensioned< scalar > | |
| dimensioned () | |
| A dimensionless Zero, named "0". | |
| dimensioned (const dimensionSet &dims) | |
| A dimensioned Zero, named "0". | |
| dimensioned (const dimensionSet &dims, const Foam::zero) | |
| A dimensioned Zero, named "0". | |
| dimensioned (const dimensionSet &dims, const Foam::one) | |
| A dimensioned pTraits::one, named "1". | |
| dimensioned (const scalar &val) | |
| Implicit construct dimensionless from given value. | |
| dimensioned (const dimensionSet &dims, const scalar &val) | |
| Construct dimensioned from given value. | |
| dimensioned (const word &name, const dimensionSet &dims, const scalar &val) | |
| Construct from components (name, dimensions, value). | |
| dimensioned (const word &name, const dimensioned< scalar > &dt) | |
| Copy construct dimensioned Type with a new name. | |
| dimensioned (const primitiveEntry &e) | |
| Construct from primitive entry with given name. | |
| dimensioned (const primitiveEntry &e, const dimensionSet &dims) | |
| Construct from primitive entry with given name and dimensions. | |
| dimensioned (const word &name, const dictionary &dict) | |
| Construct from dictionary lookup with a given name. | |
| dimensioned (const word &name, const dimensionSet &dims, const dictionary &dict) | |
| Construct from dictionary lookup with a given name and dimensions. | |
| dimensioned (const word &name, const dimensionSet &dims, const dictionary &dict, const word &entryName) | |
| Construct from dictionary lookup with a given name and dimensions. | |
| dimensioned (const word &name, const dimensionSet &dims, const scalar &val, const dictionary &dict) | |
| Construct from components (name, dimensions, value) with optional dictionary override. | |
| const word & | name () const noexcept |
| Return const reference to name. | |
| word & | name () noexcept |
| Return non-const reference to name. | |
| const dimensionSet & | dimensions () const noexcept |
| Return const reference to dimensions. | |
| dimensionSet & | dimensions () noexcept |
| Return non-const reference to dimensions. | |
| const scalar & | value () const noexcept |
| Return const reference to value. | |
| scalar & | value () noexcept |
| Return non-const reference to value. | |
| dimensioned< cmptType > | component (const direction d) const |
| Return a component as a dimensioned<cmptType>. | |
| void | replace (const direction d, const dimensioned< cmptType > &dc) |
| Return a component with a dimensioned<cmptType>. | |
| dimensioned< scalar > | T () const |
| Return transpose. | |
| bool | read (const dictionary &dict) |
| Update the value of dimensioned<Type>, lookup in dictionary with the name(). | |
| bool | readIfPresent (const dictionary &dict) |
| Update the value of dimensioned<Type> if found in the dictionary, lookup in dictionary with the name(). | |
| bool | read (const word &entryName, const dictionary &dict) |
| Update the value of dimensioned<Type>, using an alternative entry name. | |
| bool | readIfPresent (const word &entryName, const dictionary &dict) |
| Update the value of dimensioned<Type> if found in the dictionary, using an alternative entry name. | |
| Istream & | read (Istream &is, const bool readName=true) |
| Read (name, dimensions, value) from stream, using units from system table. | |
| Istream & | read (Istream &is, const dictionary &readSet) |
| Read (name, dimensions, value) from stream, using units from dictionary. | |
| Istream & | read (Istream &is, const HashTable< dimensionedScalar > &readSet) |
| Read (name, dimensions, value) from stream, using units from table. | |
| void | writeEntry (const word &keyword, Ostream &os) const |
| Write as a dictionary entry with keyword. | |
| dimensioned< cmptType > | operator[] (const direction d) const |
| Return a component as a dimensioned<cmptType>. | |
| void | operator+= (const dimensioned< scalar > &dt) |
| void | operator-= (const dimensioned< scalar > &dt) |
| void | operator*= (const scalar s) |
| void | operator/= (const scalar s) |
| dimensioned (Istream &is) | |
| Deprecated(2018-11) Construct from Istream (expects name, dimensions, value). | |
| dimensioned (const word &name, Istream &is) | |
| Deprecated(2018-11) Construct from Istream with given name (expects dimensions, value). | |
| dimensioned (const word &name, const dimensionSet &dims, Istream &is) | |
| Deprecated(2018-11) Construct from Istream with given name and expected dimensions. | |
| auto | expr (const label size) const |
| Wrap value as constant-value List expression. | |
| auto | expr (const GeoField &fld) const |
| Wrap value as constant-value GeometricField expression. Supplied. | |
Protected Member Functions | |
| void | resetTimeState (const word &newName, const scalar newValue, const label newIndex) |
| Reset some of TimeState (name, value, index). | |
Protected Attributes | |
| label | timeIndex_ |
| label | writeTimeIndex_ |
| scalar | deltaT_ |
| scalar | deltaT0_ |
| scalar | deltaTSave_ |
| bool | deltaTchanged_ |
| bool | writeTime_ |
Additional Inherited Members | |
| Public Types inherited from dimensioned< scalar > | |
| typedef scalar | value_type |
| The underlying data type. | |
| typedef pTraits< scalar >::cmptType | cmptType |
| Component type. | |
| Static Public Member Functions inherited from dimensioned< scalar > | |
| static dimensioned< scalar > | getOrDefault (const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const scalar &deflt=scalar(Zero)) |
| Construct dimensioned from dictionary, with default value. | |
| static dimensioned< scalar > | getOrDefault (const word &name, const dictionary &dict, const scalar &deflt=scalar(Zero)) |
| Construct dimensionless from dictionary, with default value. | |
| static dimensioned< scalar > | getOrAddToDict (const word &name, dictionary &dict, const dimensionSet &dims=dimless, const scalar &deflt=scalar(Zero)) |
| Construct dimensioned from dictionary, with default value. | |
| static dimensioned< scalar > | getOrAddToDict (const word &name, dictionary &dict, const scalar &deflt=scalar(Zero)) |
| Construct dimensionless from dictionary, with default value. | |
| static dimensioned< scalar > | lookupOrDefault (const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const scalar &deflt=scalar(Zero)) |
| Same as getOrDefault(). | |
| static dimensioned< scalar > | lookupOrDefault (const word &name, const dictionary &dict, const scalar &deflt=scalar(Zero)) |
| Same as getOrDefault(). | |
| static dimensioned< scalar > | lookupOrAddToDict (const word &name, dictionary &dict, const dimensionSet &dims=dimless, const scalar &deflt=scalar(Zero)) |
| Same as getOrAddToDict(). | |
| static dimensioned< scalar > | lookupOrAddToDict (const word &name, dictionary &dict, const scalar &deflt=scalar(Zero)) |
| Same as getOrAddToDict(). | |
The time value with time-stepping information, user-defined remapping, etc.
Definition at line 47 of file TimeState.H.
| TimeState | ( | ) |
Construct a zero time state, using the current time formatting.
Definition at line 27 of file TimeState.C.
References deltaT0_, deltaT_, deltaTchanged_, deltaTSave_, Foam::dimTime, timeIndex_, timeName(), writeTime_, and writeTimeIndex_.
Referenced by Time::prevTimeState(), and Time::subCycle().


|
virtualdefault |
Destructor.
References deltaT(), deltaT0(), deltaT0Value(), deltaTValue(), Foam::noexcept, timeIndex(), and writeTime().

|
inlineprotected |
Reset some of TimeState (name, value, index).
Definition at line 80 of file TimeState.H.
References dimensioned< scalar >::name(), timeIndex_, and dimensioned< scalar >::value().
Referenced by Time::setTime(), Time::setTime(), and Time::setTime().


|
virtual |
Convert the user-time (e.g. CA deg) to real-time (s).
Reimplemented in crankConRod.
Definition at line 42 of file TimeState.C.
Referenced by ConeInjection< CloudType >::ConeInjection(), ConeNozzleInjection< CloudType >::ConeNozzleInjection(), InflationInjection< CloudType >::InflationInjection(), PatchFlowRateInjection< CloudType >::PatchFlowRateInjection(), PatchInjection< CloudType >::PatchInjection(), Polynomial< Type >::userTimeToTime(), ramp::userTimeToTime(), Sine< Type >::userTimeToTime(), and TableBase< Type >::userTimeToTime().

|
virtual |
Convert the real-time (s) into user-time (e.g. CA deg).
Reimplemented in crankConRod.
Definition at line 48 of file TimeState.C.
Referenced by Time::operator++(), Time::setTime(), timeOutputValue(), and Time::writeTimeDict().

|
inline |
Return the current user-time value. (ie, after applying any timeToUserTime() conversion).
Definition at line 24 of file TimeStateI.H.
References timeToUserTime(), and dimensioned< scalar >::value().
Referenced by atmEpsilonWallFunctionFvPatchScalarField::calculate(), atmOmegaWallFunctionFvPatchScalarField::calculate(), Time::findInstance(), linearSpringDamper::restrain(), triSurface::triSurfInstance(), and uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs().


|
inlinenoexcept |
Return the current time name.
Definition at line 30 of file TimeStateI.H.
References dimensioned< scalar >::name(), and Foam::noexcept.
Referenced by Time::globalTimePath(), Time::timePath(), Time::timePath(), TimeState(), and Time::TypeName().


|
inlinenoexcept |
Return the current time index.
Definition at line 43 of file TimeStateI.H.
References Foam::noexcept, and timeIndex_.
Referenced by externalFileSource::addSup(), exprDriver::fill_random(), exprResultGlobals::New(), meshState::setSolverPerformance(), Time::setTime(), interfaceTrackingFvMesh::update(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), velocityFilmShellFvPatchVectorField::updateCoeffs(), and ~TimeState().

|
inlinenoexcept |
Return time step value.
Definition at line 49 of file TimeStateI.H.
References deltaT_, and Foam::noexcept.
Referenced by fieldAverageItem::calculateMeanField(), fieldAverageItem::calculatePrime2MeanField(), liquidFilmBase::CourantNumber(), crankConRod::deltaTheta(), freePiston::deltaTheta(), fieldAverageItem::evolve(), DSMCParcel< ParcelType >::hitWallPatch(), engineTime::pistonSpeed(), liquidFilmModel::preEvolveRegion(), reactingOneDim::solidRegionDiffNo(), rigidBodyMeshMotion::solve(), rigidBodyMeshMotionSolver::solve(), sixDoFRigidBodyMotionSolver::solve(), thermoSingleLayer::Srho(), particle< Type >::stepFractionSpan(), interfaceTrackingFvMesh::update(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), edgeSlipDisplacementPointPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), pointAttractionDisplacementPointPatchVectorField::updateCoeffs(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), fvMesh::Vsc(), fvMesh::Vsc0(), and ~TimeState().

|
inlinenoexcept |
Return old time step value.
Definition at line 55 of file TimeStateI.H.
References deltaT0_, and Foam::noexcept.
Referenced by sixDoFRigidBodyMotionSolver::solve(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and ~TimeState().

|
inline |
Return time step.
Definition at line 61 of file TimeStateI.H.
References deltaT_, and Foam::dimTime.
Referenced by kinematicSingleLayer::deltaMass(), boundedBackwardFaDdtScheme::facDdt(), boundedBackwardFaDdtScheme::facDdt(), boundedBackwardFaDdtScheme::facDdt(), boundedBackwardFaDdtScheme::facDdt(), boundedBackwardFaDdtScheme::facDdt0(), boundedBackwardFaDdtScheme::facDdt0(), boundedBackwardFaDdtScheme::facDdt0(), boundedBackwardFaDdtScheme::facDdt0(), Time::operator+=(), Time::operator+=(), Time::setDeltaT(), Time::setDeltaT(), Time::subCycle(), kinematicSingleLayer::updateSubmodels(), and ~TimeState().

|
inline |
Return old time step.
Definition at line 67 of file TimeStateI.H.
References deltaT0_, and Foam::dimTime.
Referenced by ~TimeState().

|
inlinenoexcept |
True if this is a write interval.
Definition at line 73 of file TimeStateI.H.
References Foam::noexcept, and writeTime_.
Referenced by outputTime(), Time::writeObject(), and ~TimeState().

|
inlinenoexcept |
Deprecated(2016-05) return true if this is a write time.
Definition at line 175 of file TimeState.H.
References Foam::noexcept, outputTime(), and writeTime().
Referenced by outputTime().


|
protected |
Definition at line 64 of file TimeState.H.
Referenced by Time::operator++(), resetTimeState(), Time::run(), Time::setControls(), Time::setTime(), timeIndex(), TimeState(), and Time::writeTimeDict().
|
protected |
Definition at line 65 of file TimeState.H.
Referenced by Time::adjustDeltaT(), Time::operator++(), Time::readDict(), and TimeState().
|
protected |
Definition at line 67 of file TimeState.H.
Referenced by Time::adjustDeltaT(), crankConRod::crankConRod(), deltaT(), deltaTValue(), Time::end(), Time::operator++(), Time::readDict(), Time::run(), Time::setControls(), Time::setDeltaT(), Time::setTime(), Time::subCycle(), TimeState(), and Time::writeTimeDict().
|
protected |
Definition at line 68 of file TimeState.H.
Referenced by crankConRod::crankConRod(), deltaT0(), deltaT0Value(), Time::operator++(), Time::setControls(), Time::setTime(), Time::subCycle(), TimeState(), and Time::writeTimeDict().
|
protected |
Definition at line 69 of file TimeState.H.
Referenced by crankConRod::crankConRod(), Time::operator++(), Time::setControls(), Time::subCycle(), and TimeState().
|
protected |
Definition at line 71 of file TimeState.H.
Referenced by Time::readDict(), Time::setDeltaT(), and TimeState().
|
protected |
Definition at line 72 of file TimeState.H.
Referenced by Time::operator++(), TimeState(), Time::writeNow(), Time::writeObject(), and writeTime().