Public Member Functions | Protected Attributes | List of all members
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< scalar >
 dimensioned (const word &, const dimensionSet &, const scalar)
 Construct given a name, a value and its dimensionSet. More...
 
 dimensioned (const word &, const dimensioned< scalar > &)
 Construct from a dimensioned<Type> changing the name. More...
 
 dimensioned (const scalar &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 scalar & value () const
 Return const reference to value. More...
 
scalar & 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< scalar > T () const
 Return transpose. More...
 
void read (const dictionary &)
 Update the value of dimensioned<Type> 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...
 
bool readIfPresent (const dictionary &)
 Update the value of dimensioned<Type> if found in the dictionary. More...
 
dimensioned< cmptTypeoperator[] (const direction) const
 Return a component as a dimensioned<cmptType> More...
 
void operator+= (const dimensioned< scalar > &)
 
void operator-= (const dimensioned< scalar > &)
 
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< scalar >
typedef pTraits< scalar >::cmptType cmptType
 Component type. More...
 
- Static Public Member Functions inherited from dimensioned< scalar >
static dimensioned< scalar > lookupOrDefault (const word &, const dictionary &, const dimensionSet &dims=dimless, const scalar &defaultValue=pTraits< scalar >::zero)
 Construct from dictionary, with default dimensions and value. More...
 
static dimensioned< scalar > lookupOrDefault (const word &, const dictionary &, const scalar &defaultValue=pTraits< scalar >::zero)
 Construct from dictionary dimensionless with value. More...
 
static dimensioned< scalar > lookupOrAddToDict (const word &, dictionary &, const dimensionSet &dims=dimless, const scalar &defaultValue=pTraits< scalar >::zero)
 Construct from dictionary, with default value. More...
 
static dimensioned< scalar > lookupOrAddToDict (const word &, dictionary &, const scalar &defaultValue=pTraits< scalar >::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 ( )

Definition at line 31 of file TimeState.C.

~TimeState ( )
virtual

Destructor.

Definition at line 49 of file TimeState.C.

Member Function Documentation

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< Type >::convertTimeBase(), and TableBase< Type >::convertTimeBase().

Here is the caller graph for this function:

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.

Referenced by TimeState::timeOutputValue(), and Time::writeObject().

Here is the caller graph for this function:

Foam::scalar timeOutputValue ( ) const

Return current time value.

Definition at line 67 of file TimeState.C.

References TimeState::timeToUserTime(), and dimensioned< scalar >::value().

Referenced by edgeMeshFormatsCore::getLineNoComment(), surfaceFormatsCore::getLineNoComment(), triSurface::triSurfInstance(), and uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::label timeIndex ( ) const
scalar deltaTValue ( ) const
inline
scalar deltaT0Value ( ) const
inline

Return old time step value.

Definition at line 106 of file TimeState.H.

References TimeState::deltaT(), TimeState::deltaT0(), TimeState::deltaT0_, and TimeState::outputTime().

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

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::dimensionedScalar deltaT ( ) const
Foam::dimensionedScalar deltaT0 ( ) const

Return old time step.

Definition at line 85 of file TimeState.C.

References TimeState::deltaT0_, and Foam::dimTime.

Referenced by TimeState::deltaT0Value().

Here is the caller graph for this function:

bool outputTime ( ) const

Member Data Documentation

label timeIndex_
protected

Definition at line 56 of file TimeState.H.

Referenced by Time::setTime(), TimeState::timeIndex(), and Time::writeObject().

scalar deltaT_
protected
scalar deltaTSave_
protected

Definition at line 58 of file TimeState.H.

Referenced by engineTime::engineTime().

scalar deltaT0_
protected
bool deltaTchanged_
protected

Definition at line 60 of file TimeState.H.

Referenced by Time::readDict().

label outputTimeIndex_
protected

Definition at line 62 of file TimeState.H.

Referenced by Time::readDict().

bool primaryOutputTime_
protected

Is outputTime because of primary?

Definition at line 64 of file TimeState.H.

Referenced by Time::writeNow(), and Time::writeObject().

label secondaryOutputTimeIndex_
protected

Definition at line 66 of file TimeState.H.

Referenced by Time::readDict().

bool secondaryOutputTime_
protected

Is outputTime because of secondary?

Definition at line 68 of file TimeState.H.

Referenced by Time::writeObject().

bool outputTime_
protected

Definition at line 70 of file TimeState.H.

Referenced by TimeState::outputTime(), and Time::writeNow().


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