prevent outputIndex calculation upon subcycling

This commit is contained in:
mattijs
2009-11-25 14:40:36 +00:00
parent c3d4f8990a
commit c1d6f266fe

View File

@ -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;
}