You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I stumbled across a problem in CVode which seems to yield a wrong yout if h becomes zero.
After CVode: Internal t = 0 and h = 0 are such that t + h = t on the next step. The solver will continue anyway. and CVodeGetDky: Illegal value for t.t = 900 is not between tcur - hu = 0 and tcur = 0, CVode still returns CV_SUCCESS, but yout is not the correct value for tout, but for the time when h became zero.
The problem seems to be the multiplication with cv_mem->cv_h for checking whether tout was reached and subsequently ignoring the return value of CVodeGetDky (CV_BAD_T), here:
CVodeF leads to the same warnings, but returns CV_BAD_T. That is at least not CV_SUCCESS, but it is somewhat misleading, as CVodeGetDky should not have been called in the first place.
This happens in a more complex application and I am not sure I can easily provide a minimal reproducible example.
The text was updated successfully, but these errors were encountered:
Hi, I stumbled across a problem in
CVode
which seems to yield a wrongyout
ifh
becomes zero.After
CVode
:Internal t = 0 and h = 0 are such that t + h = t on the next step. The solver will continue anyway.
andCVodeGetDky
:Illegal value for t.t = 900 is not between tcur - hu = 0 and tcur = 0
,CVode
still returnsCV_SUCCESS
, butyout
is not the correct value fortout
, but for the time whenh
became zero.The problem seems to be the multiplication with
cv_mem->cv_h
for checking whethertout
was reached and subsequently ignoring the return value ofCVodeGetDky
(CV_BAD_T
), here:sundials/src/cvodes/cvodes.c
Lines 3298 to 3305 in a9bc74f
Similar checks exist in
CVodeF
here:sundials/src/cvodes/cvodea.c
Lines 560 to 561 in a9bc74f
and here:
sundials/src/cvodes/cvodea.c
Lines 472 to 473 in a9bc74f
CVodeF
leads to the same warnings, but returnsCV_BAD_T
. That is at least notCV_SUCCESS
, but it is somewhat misleading, asCVodeGetDky
should not have been called in the first place.This happens in a more complex application and I am not sure I can easily provide a minimal reproducible example.
The text was updated successfully, but these errors were encountered: