Public Member Functions | Protected Attributes
TimeState Class Reference

The time value with time-stepping information, user-defined remapping, etc. More...

Inheritance diagram for TimeState:
Inheritance graph
[legend]
Collaboration diagram for TimeState:
Collaboration graph
[legend]

Public Member Functions

 TimeState ()
 
virtual ~TimeState ()
 Destructor. More...
 
virtual scalar userTimeToTime (const scalar theta) const
 Convert the user-time (e.g. CA deg) to real-time (s). More...
 
virtual scalar timeToUserTime (const scalar t) const
 Convert the real-time (s) into user-time (e.g. CA deg) More...
 
scalar timeOutputValue () const
 Return current time value. More...
 
label timeIndex () const
 Return current time index. More...
 
scalar deltaTValue () const
 Return time step value. More...
 
scalar deltaT0Value () const
 Return old time step value. More...
 
dimensionedScalar deltaT () const
 Return time step. More...
 
dimensionedScalar deltaT0 () const
 Return old time step. More...
 
bool outputTime () const
 Return true if this is an output time (primary or secondary) More...
 
- Public Member Functions inherited from dimensioned
 dimensioned (const word &, const dimensionSet &, const Type)
 Construct given a name, a value and its dimensionSet. More...
 
 dimensioned (const word &, const dimensioned< Type > &)
 Construct from a dimensioned<Type> changing the name. More...
 
 dimensioned (const Type &t)
 Construct given a value (creates dimensionless value). More...
 
 dimensioned (Istream &)
 Construct from Istream. More...
 
 dimensioned (const word &, Istream &)
 Construct from an Istream with a given name. More...
 
 dimensioned (const word &, const dimensionSet &, Istream &)
 Construct from an Istream with a given name and dimensions. More...
 
 dimensioned (const word &, const dimensionSet &, const dictionary &)
 Construct from dictionary lookup with a given name and dimensions. More...
 
 dimensioned ()
 Null constructor. More...
 
const wordname () const
 Return const reference to name. More...
 
wordname ()
 Return non-const reference to name. More...
 
const dimensionSetdimensions () const
 Return const reference to dimensions. More...
 
dimensionSetdimensions ()
 Return non-const reference to dimensions. More...
 
const Type & value () const
 Return const reference to value. More...
 
Type & value ()
 Return non-const reference to value. More...
 
dimensioned< cmptTypecomponent (const direction) const
 Return a component as a dimensioned<cmptType> More...
 
void replace (const direction, const dimensioned< cmptType > &)
 Return a component with a dimensioned<cmptType> More...
 
dimensioned< Type > T () const
 Return transpose. More...
 
void read (const dictionary &)
 Update the value of dimensioned<Type> More...
 
bool readIfPresent (const dictionary &)
 Update the value of dimensioned<Type> if found in the dictionary. More...
 
Istreamread (Istream &is, const dictionary &)
 Read value from stream and units from dictionary. More...
 
Istreamread (Istream &is, const HashTable< dimensionedScalar > &)
 Read value from stream and units from table. More...
 
Istreamread (Istream &is)
 Read value from stream and units from system table. More...
 
dimensioned< cmptTypeoperator[] (const direction) const
 Return a component as a dimensioned<cmptType> More...
 
void operator+= (const dimensioned< Type > &)
 
void operator-= (const dimensioned< Type > &)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 

Protected Attributes

label timeIndex_
 
scalar deltaT_
 
scalar deltaTSave_
 
scalar deltaT0_
 
bool deltaTchanged_
 
label outputTimeIndex_
 
bool primaryOutputTime_
 Is outputTime because of primary? More...
 
label secondaryOutputTimeIndex_
 
bool secondaryOutputTime_
 Is outputTime because of secondary? More...
 
bool outputTime_
 

Additional Inherited Members

- Public Types inherited from dimensioned
typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 
- Static Public Member Functions inherited from dimensioned
static dimensioned< Type > lookupOrDefault (const word &, const dictionary &, const dimensionSet &dims=dimless, const Type &defaultValue=pTraits< Type >::zero)
 Construct from dictionary, with default dimensions and value. More...
 
static dimensioned< Type > lookupOrDefault (const word &, const dictionary &, const Type &defaultValue=pTraits< Type >::zero)
 Construct from dictionary dimensionless with value. More...
 
static dimensioned< Type > lookupOrAddToDict (const word &, dictionary &, const dimensionSet &dims=dimless, const Type &defaultValue=pTraits< Type >::zero)
 Construct from dictionary, with default value. More...
 
static dimensioned< Type > lookupOrAddToDict (const word &, dictionary &, const Type &defaultValue=pTraits< Type >::zero)
 Construct from dictionary, dimensionless with default value. More...
 

Detailed Description

The time value with time-stepping information, user-defined remapping, etc.

Source files

Definition at line 49 of file TimeState.H.

Constructor & Destructor Documentation

◆ TimeState()

TimeState ( )

Definition at line 31 of file TimeState.C.

◆ ~TimeState()

~TimeState ( )
virtual

Destructor.

Definition at line 49 of file TimeState.C.

Member Function Documentation

◆ userTimeToTime()

Foam::scalar userTimeToTime ( const scalar  theta) const
virtual

Convert the user-time (e.g. CA deg) to real-time (s).

Reimplemented in engineTime.

Definition at line 55 of file TimeState.C.

Referenced by PolynomialEntry::convertTimeBase(), and TableBase::convertTimeBase().

Here is the caller graph for this function:

◆ timeToUserTime()

Foam::scalar timeToUserTime ( const scalar  t) const
virtual

Convert the real-time (s) into user-time (e.g. CA deg)

Reimplemented in engineTime.

Definition at line 61 of file TimeState.C.

◆ timeOutputValue()

Foam::scalar timeOutputValue ( ) const

Return current time value.

Definition at line 67 of file TimeState.C.

Referenced by triSurface::triSurfInstance(), uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs(), and porousBafflePressureFvPatchField< Type >::updateCoeffs().

Here is the caller graph for this function:

◆ timeIndex()

Foam::label timeIndex ( ) const

◆ deltaTValue()

scalar deltaTValue ( ) const
inline

◆ deltaT0Value()

scalar deltaT0Value ( ) const
inline

Return old time step value.

Definition at line 106 of file TimeState.H.

References TimeState::deltaT0_.

Referenced by sixDoFRigidBodyMotionSolver::solve(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

Here is the caller graph for this function:

◆ deltaT()

Foam::dimensionedScalar deltaT ( ) const

◆ deltaT0()

Foam::dimensionedScalar deltaT0 ( ) const

Return old time step.

Definition at line 85 of file TimeState.C.

References Foam::dimTime.

◆ outputTime()

bool outputTime ( ) const

Return true if this is an output time (primary or secondary)

Definition at line 91 of file TimeState.C.

Referenced by contactAngleForce::correct(), thixotropicViscosity::correct(), and filmSubModelBase::outputTime().

Here is the caller graph for this function:

Field Documentation

◆ timeIndex_

label timeIndex_
protected

Definition at line 56 of file TimeState.H.

Referenced by Time::setTime().

◆ deltaT_

scalar deltaT_
protected

◆ deltaTSave_

scalar deltaTSave_
protected

Definition at line 58 of file TimeState.H.

◆ deltaT0_

scalar deltaT0_
protected

Definition at line 59 of file TimeState.H.

Referenced by TimeState::deltaT0Value().

◆ deltaTchanged_

bool deltaTchanged_
protected

Definition at line 60 of file TimeState.H.

Referenced by Time::readDict().

◆ outputTimeIndex_

label outputTimeIndex_
protected

Definition at line 62 of file TimeState.H.

Referenced by Time::adjustDeltaT(), and Time::readDict().

◆ primaryOutputTime_

bool primaryOutputTime_
protected

Is outputTime because of primary?

Definition at line 64 of file TimeState.H.

◆ secondaryOutputTimeIndex_

label secondaryOutputTimeIndex_
protected

Definition at line 66 of file TimeState.H.

Referenced by Time::adjustDeltaT(), and Time::readDict().

◆ secondaryOutputTime_

bool secondaryOutputTime_
protected

Is outputTime because of secondary?

Definition at line 68 of file TimeState.H.

◆ outputTime_

bool outputTime_
protected

Definition at line 70 of file TimeState.H.


The documentation for this class was generated from the following files: