mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Function objects - updated to enable user time emtries, e.g. if using engineTime. Fixes #437
This commit is contained in:
@ -126,7 +126,8 @@ void Foam::timeControl::read(const dictionary& dict)
|
||||
case ocCpuTime:
|
||||
case ocAdjustableRunTime:
|
||||
{
|
||||
interval_ = readScalar(dict.lookup(intervalName));
|
||||
const scalar userTime = readScalar(dict.lookup(intervalName));
|
||||
interval_ = time_.userTimeToTime(userTime);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -43,8 +43,15 @@ namespace functionObjects
|
||||
|
||||
void Foam::functionObjects::timeControl::readControls()
|
||||
{
|
||||
dict_.readIfPresent("timeStart", timeStart_);
|
||||
dict_.readIfPresent("timeEnd", timeEnd_);
|
||||
if (dict_.readIfPresent("timeStart", timeStart_))
|
||||
{
|
||||
timeStart_ = time_.userTimeToTime(timeStart_);
|
||||
}
|
||||
if (dict_.readIfPresent("timeEnd", timeEnd_))
|
||||
{
|
||||
timeEnd_ = time_.userTimeToTime(timeEnd_);
|
||||
}
|
||||
|
||||
dict_.readIfPresent("nStepsToStartTimeChange", nStepsToStartTimeChange_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user