rklib icon indicating copy to clipboard operation
rklib copied to clipboard

possible issue in the relative step error computations in case of variable step-size integrators

Open princemahajan opened this issue 1 year ago • 2 comments

I am not 100% on this because you are using slightly different step size computation formulae. In step computation routine for each integrator (variable-step), you compute the step errors as this

xerr = sum (h*e(i)*F(i))

Then in step size computation routine (rklib_module.F90) , the max_err is computed like this

max_err = abs(xerr*h/tol)

So you are saying that step error for your integrators is O(h^2) and not O(h). Is that correct? Since you have included so many different algorithms so it may be you are using a different step size formulae than what is more typically used (esp. with DOP54 and DOP853). In case your formula is correct then you can close this issue.

princemahajan avatar Jan 06 '24 20:01 princemahajan

I need to look and see what I did... my idea was you could have different step size selection logic depending on the options you set.

jacobwilliams avatar Jan 07 '24 02:01 jacobwilliams

Yes you can. I just wanted to confirm that this is a correct local error computation formula that uses the second power of h and not first. Did you find this formula in some paper?

princemahajan avatar Jan 07 '24 02:01 princemahajan