mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
prevent outputIndex calculation upon subcycling
This commit is contained in:
@ -662,6 +662,8 @@ Foam::Time& Foam::Time::operator++()
|
||||
deltaTSave_ = deltaT_;
|
||||
setTime(value() + deltaT_, timeIndex_ + 1);
|
||||
|
||||
if (!subCycling_)
|
||||
{
|
||||
// If the time is very close to zero reset to zero
|
||||
if (mag(value()) < 10*SMALL*deltaT_)
|
||||
{
|
||||
@ -677,8 +679,11 @@ Foam::Time& Foam::Time::operator++()
|
||||
case wcRunTime:
|
||||
case wcAdjustableRunTime:
|
||||
{
|
||||
label outputIndex =
|
||||
label(((value() - startTime_) + 0.5*deltaT_)/writeInterval_);
|
||||
label outputIndex = label
|
||||
(
|
||||
((value() - startTime_) + 0.5*deltaT_)
|
||||
/ writeInterval_
|
||||
);
|
||||
|
||||
if (outputIndex > outputTimeIndex_)
|
||||
{
|
||||
@ -740,6 +745,7 @@ Foam::Time& Foam::Time::operator++()
|
||||
endTime_ = value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user