functionObjects::timeControl: Corrected initialisation of executionIndex_
needed by the adjustableRunTime option for restarted cases.
This commit is contained in:
@ -126,6 +126,19 @@ void Foam::timeControl::read(const dictionary& dict)
|
|||||||
case timeControls::adjustableRunTime:
|
case timeControls::adjustableRunTime:
|
||||||
{
|
{
|
||||||
interval_ = time_.userTimeToTime(dict.lookup<scalar>(intervalName));
|
interval_ = time_.userTimeToTime(dict.lookup<scalar>(intervalName));
|
||||||
|
|
||||||
|
if (timeControl_ == timeControls::adjustableRunTime)
|
||||||
|
{
|
||||||
|
executionIndex_ = label
|
||||||
|
(
|
||||||
|
(
|
||||||
|
(time_.value() - time_.beginTime().value())
|
||||||
|
+ 0.5*time_.deltaTValue()
|
||||||
|
)
|
||||||
|
/interval_
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user