The time value with time-stepping information, user-defined remapping, etc. More...
Public Member Functions | |
TimeState () | |
Construct a zero time state, using the current time formatting. More... | |
virtual | ~TimeState ()=default |
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 the current user-time value. (ie, after applying any timeToUserTime() conversion) More... | |
const word & | timeName () const noexcept |
Return the current time name. More... | |
label | timeIndex () const noexcept |
Return the current time index. More... | |
scalar | deltaTValue () const noexcept |
Return time step value. More... | |
scalar | deltaT0Value () const noexcept |
Return old time step value. More... | |
dimensionedScalar | deltaT () const |
Return time step. More... | |
dimensionedScalar | deltaT0 () const |
Return old time step. More... | |
bool | writeTime () const noexcept |
True if this is a write interval. More... | |
bool | outputTime () const noexcept |
Deprecated(2016-05) return true if this is a write time. More... | |
Public Member Functions inherited from dimensioned< scalar > | |
dimensioned () | |
A dimensionless Zero, named "0". More... | |
dimensioned (const dimensionSet &dims) | |
A dimensioned Zero, named "0". More... | |
dimensioned (const dimensionSet &dims, const Foam::zero) | |
A dimensioned Zero, named "0". More... | |
dimensioned (const dimensionSet &dims, const Foam::one) | |
A dimensioned pTraits::one, named "1". More... | |
dimensioned (const scalar &val) | |
Implicit construct dimensionless from given value. More... | |
dimensioned (const dimensionSet &dims, const scalar &val) | |
Construct dimensioned from given value. More... | |
dimensioned (const word &name, const dimensionSet &dims, const scalar &val) | |
Construct from components (name, dimensions, value). More... | |
dimensioned (const word &name, const dimensioned< scalar > &dt) | |
Copy construct dimensioned Type with a new name. More... | |
dimensioned (const primitiveEntry &e) | |
Construct from primitive entry with given name. More... | |
dimensioned (const primitiveEntry &e, const dimensionSet &dims) | |
Construct from primitive entry with given name and dimensions. More... | |
dimensioned (const word &name, const dictionary &dict) | |
Construct from dictionary lookup with a given name. More... | |
dimensioned (const word &name, const dimensionSet &dims, const dictionary &dict) | |
Construct from dictionary lookup with a given name and dimensions. More... | |
dimensioned (const word &name, const dimensionSet &dims, const dictionary &dict, const word &entryName) | |
Construct from dictionary lookup with a given name and dimensions. More... | |
dimensioned (const word &name, const dimensionSet &dims, const scalar &val, const dictionary &dict) | |
Construct from components (name, dimensions, value) with optional dictionary override. More... | |
dimensioned (Istream &is) | |
Deprecated(2018-11) Construct from Istream (expects name, dimensions, value) More... | |
dimensioned (const word &name, Istream &is) | |
Deprecated(2018-11) Construct from Istream with given name (expects dimensions, value) More... | |
dimensioned (const word &name, const dimensionSet &dims, Istream &is) | |
Deprecated(2018-11) Construct from Istream with given name and expected dimensions. More... | |
const word & | name () const noexcept |
Return const reference to name. More... | |
word & | name () noexcept |
Return non-const reference to name. More... | |
const dimensionSet & | dimensions () const noexcept |
Return const reference to dimensions. More... | |
dimensionSet & | dimensions () noexcept |
Return non-const reference to dimensions. More... | |
const scalar & | value () const noexcept |
Return const reference to value. More... | |
scalar & | value () noexcept |
Return non-const reference to value. More... | |
dimensioned< cmptType > | component (const direction d) const |
Return a component as a dimensioned<cmptType> More... | |
void | replace (const direction d, const dimensioned< cmptType > &dc) |
Return a component with a dimensioned<cmptType> More... | |
dimensioned< scalar > | T () const |
Return transpose. More... | |
bool | read (const dictionary &dict) |
Update the value of dimensioned<Type>, lookup in dictionary with the name(). More... | |
bool | read (const word &entryName, const dictionary &dict) |
Update the value of dimensioned<Type>, using an alternative entry name. More... | |
Istream & | read (Istream &is, const bool readName=true) |
Read (name, dimensions, value) from stream, using units from system table. More... | |
Istream & | read (Istream &is, const dictionary &readSet) |
Read (name, dimensions, value) from stream, using units from dictionary. More... | |
Istream & | read (Istream &is, const HashTable< dimensionedScalar > &readSet) |
Read (name, dimensions, value) from stream, using units from table. More... | |
bool | readIfPresent (const dictionary &dict) |
Update the value of dimensioned<Type> if found in the dictionary, lookup in dictionary with the name(). More... | |
bool | readIfPresent (const word &entryName, const dictionary &dict) |
Update the value of dimensioned<Type> if found in the dictionary, using an alternative entry name. More... | |
void | writeEntry (const word &keyword, Ostream &os) const |
Write as a dictionary entry with keyword. More... | |
dimensioned< cmptType > | operator[] (const direction d) const |
Return a component as a dimensioned<cmptType> More... | |
void | operator+= (const dimensioned< scalar > &dt) |
void | operator-= (const dimensioned< scalar > &dt) |
void | operator*= (const scalar s) |
void | operator/= (const scalar s) |
Protected Member Functions | |
void | resetTimeState (const word &newName, const scalar newValue, const label newIndex) |
Reset some of TimeState (name, value, index) More... | |
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. More... | |
typedef pTraits< scalar >::cmptType | cmptType |
Component type. More... | |
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. More... | |
static dimensioned< scalar > | getOrDefault (const word &name, const dictionary &dict, const scalar &deflt=scalar(Zero)) |
Construct dimensionless from dictionary, with default value. More... | |
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. More... | |
static dimensioned< scalar > | getOrAddToDict (const word &name, dictionary &dict, const scalar &deflt=scalar(Zero)) |
Construct dimensionless from dictionary, with default value. More... | |
static dimensioned< scalar > | lookupOrDefault (const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const scalar &deflt=scalar(Zero)) |
Same as getOrDefault() More... | |
static dimensioned< scalar > | lookupOrDefault (const word &name, const dictionary &dict, const scalar &deflt=scalar(Zero)) |
Same as getOrDefault() More... | |
static dimensioned< scalar > | lookupOrAddToDict (const word &name, dictionary &dict, const dimensionSet &dims=dimless, const scalar &deflt=scalar(Zero)) |
Same as getOrAddToDict() More... | |
static dimensioned< scalar > | lookupOrAddToDict (const word &name, dictionary &dict, const scalar &deflt=scalar(Zero)) |
Same as getOrAddToDict() More... | |
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.
|
virtualdefault |
Destructor.
|
inlineprotected |
Reset some of TimeState (name, value, index)
Definition at line 81 of file TimeState.H.
References dimensioned< scalar >::name(), TimeState::timeIndex_, and dimensioned< scalar >::value().
|
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(), equationInitialResidualCondition::equationInitialResidualCondition(), InflationInjection< CloudType >::InflationInjection(), PatchFlowRateInjection< CloudType >::PatchFlowRateInjection(), PatchInjection< CloudType >::PatchInjection(), TableBase< Type >::userTimeToTime(), Polynomial< Type >::userTimeToTime(), ramp::userTimeToTime(), and Sine< 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 maxDurationCondition::apply(), and TimeState::timeOutputValue().
|
inline |
Return the current user-time value. (ie, after applying any timeToUserTime() conversion)
Definition at line 24 of file TimeStateI.H.
References TimeState::timeToUserTime(), and dimensioned< scalar >::value().
Referenced by objectiveTopOSolidVolume::addColumnValues(), objectiveTopOVolume::addColumnValues(), velocityDampingConstraint::addDamping(), setTimeStepFunctionObject::adjustTimeStep(), axis::constrainRotation(), smoothHeaviside::derivative(), sinhInterpolation::derivative(), sigmoidalHeaviside::derivative(), SIMPInterpolation::derivative(), invBP::derivative(), BorrvallPeterssonInterpolation::derivative(), atmBoundaryLayer::epsilon(), atmBoundaryLayer::flowDir(), objectiveTopOSolidVolume::J(), objectiveTopOVolume::J(), atmBoundaryLayer::k(), atmBoundaryLayer::omega(), linearSpringDamper::restrain(), triSurface::triSurfInstance(), atmBoundaryLayer::U(), objectiveTopOSolidVolume::update_dJdb(), objectiveTopOVolume::update_dJdb(), uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs(), atmTurbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs(), porousBafflePressureFvPatchField::updateCoeffs(), atmBoundaryLayer::Ustar(), betaMaxStepRamp::value(), and atmBoundaryLayer::zDir().
|
inlinenoexcept |
Return the current time name.
Definition at line 30 of file TimeStateI.H.
References dimensioned< scalar >::name().
Referenced by Time::globalTimePath(), writeFile::newFileAtTime(), Time::readDict(), faceSetOption::setArea(), cellSetOption::setVol(), Time::timePath(), and writeFile::writeCurrentTime().
|
inlinenoexcept |
Return the current time index.
Definition at line 43 of file TimeStateI.H.
Referenced by setTimeStepFaRegionsFunctionObject::adjustTimeStep(), setTimeStepFunctionObject::adjustTimeStep(), equationMaxIterCondition::apply(), surfaceFieldWriter::beginFile(), DarcyForchheimer::calcTransformModelData(), layerAdditionRemoval::changeTopology(), exprDriver::fill_random(), optimisationManager::lineSearchUpdate(), sampledInterface::needsUpdate(), sampledThresholdCellFaces::needsUpdate(), sampledIsoSurface::needsUpdate(), exprResultGlobals::New(), optionList::readOptions(), Time::setTime(), multiphaseSystem::solve(), interfaceTrackingFvMesh::update(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), velocityFilmShellFvPatchVectorField::updateCoeffs(), pressurePIDControlInletVelocityFvPatchVectorField::updateCoeffs(), subCycleField< GeometricField >::updateTimeIndex(), and subCycleField< GeometricField >::~subCycleField().
|
inlinenoexcept |
Return time step value.
Definition at line 49 of file TimeStateI.H.
Referenced by objective::accumulateJMean(), setTimeStepFaRegionsFunctionObject::adjustTimeStep(), timeControl::adjustTimeStep(), minTimeStepCondition::apply(), cellCoBlended< Type >::blendingFactor(), fieldAverageItem::calculateMeanField(), fieldAverageItem::calculatePrime2MeanField(), SIMPLEControlSingleRun::checkEndTime(), liquidFilmBase::CourantNumber(), kinematicSingleLayer::CourantNumber(), moleculeCloud::evolve(), fieldAverageItem::evolve(), DSMCParcel< ParcelType >::hitWallPatch(), phaseChangeModel::info(), SIMPLEControlOpt::loop(), solidParticleCloud::move(), liquidFilmModel::preEvolveRegion(), SIMPLEControlOpt::resetDeltaT(), fvGeometryScheme::setMeshPhi(), thermoSingleLayer::Sh(), reactingOneDim::solidRegionDiffNo(), sixDoFRigidBodyMotionSolver::solve(), rigidBodyMeshMotionSolver::solve(), rigidBodyMeshMotion::solve(), thermoSingleLayer::Srho(), particle< Type >::stepFractionSpan(), thermoSingleLayer::transferPrimaryRegionSourceFields(), kinematicSingleLayer::transferPrimaryRegionSourceFields(), interfaceTrackingFvMesh::update(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), surfaceDisplacementPointPatchVectorField::updateCoeffs(), plenumPressureFvPatchScalarField::updateCoeffs(), humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs(), thermoSingleLayer::updateSubmodels(), fvMesh::Vsc(), and fvMesh::Vsc0().
|
inlinenoexcept |
Return old time step value.
Definition at line 55 of file TimeStateI.H.
Referenced by sixDoFRigidBodyMotionSolver::solve(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().
|
inline |
Return time step.
Definition at line 61 of file TimeStateI.H.
References Foam::dimTime.
Referenced by CoBlended< Type >::blendingFactor(), reactingOneDim::calculateMassTransfer(), kinematicSingleLayer::deltaMass(), isoAdvection::getRhoPhi(), continuousGasKEqn< BasicTurbulenceModel >::phaseTransferCoeff(), NicenoKEqn< BasicTurbulenceModel >::phaseTransferCoeff(), multiphaseSystem::solve(), reactingOneDim::solveContinuity(), and kinematicSingleLayer::updateSubmodels().
|
inline |
|
inlinenoexcept |
True if this is a write interval.
Definition at line 73 of file TimeStateI.H.
Referenced by DarcyForchheimer::calcTransformModelData(), contactAngleForce::correct(), TimeState::outputTime(), VollerPrakash::S(), incompressiblePrimalSolver::write(), incompressibleAdjointSolver::write(), levelSetDesignVariables::writeDesignVars(), SIMPLEControlSingleRun::writeNow(), and filmSubModelBase::writeTime().
|
inlinenoexcept |
Deprecated(2016-05) return true if this is a write time.
Definition at line 175 of file TimeState.H.
References TimeState::writeTime().
|
protected |
Definition at line 64 of file TimeState.H.
Referenced by TimeState::resetTimeState().
|
protected |
Definition at line 65 of file TimeState.H.
Referenced by Time::adjustDeltaT(), and Time::readDict().
|
protected |
Definition at line 67 of file TimeState.H.
Referenced by Time::adjustDeltaT(), and Time::readDict().
|
protected |
Definition at line 68 of file TimeState.H.
|
protected |
Definition at line 69 of file TimeState.H.
|
protected |
Definition at line 71 of file TimeState.H.
Referenced by Time::readDict().
|
protected |
Definition at line 72 of file TimeState.H.