How to access optional input functions in sundials.jl IDA solver


I am using IDA to solve a system of stiff differential equations. I know that this particular system of equations is singular. However, I am trying to understand the singularity better.

It seems that at some point the adaptive time step (h in IDA) is going to zero. I would like to make dtmin = 0.01. When I tried to use dtmin = 0.01 and force_dtmin = true together, I got an error message: The dtmin argument is ignored by IDA...

Finally, I receive the error message [IDAS ERROR] IDASolve At t = 0.116722 and h = 1.85659e-07, the corrector convergence failed repeatedly or with |h| = hmin.

In the Sundials manual, I saw that IDA allows the user to provide various input functions. For example, there is this main solver optional input function called IDASetMinStep(). This takes the default value zero. How can I change this (say, for example, I want to make it 1e-2)?

A more general question would be: How can I pass other input functions from the Sundials manual (other than the ones supported by Sundials.jl – e.g., max_order, max_error_test_failures etcetra) to IDA()?

It appears the reason Sundials.jl doesn’t support dtmin is that it didn’t exist until pretty recently (Sundials 6.2). Hooking it up now that it exists should be pretty easy.

Thanks Oscar!

Is there a way for me to make the change right away, or do I have to wait until the Sundials.jl package is updated?

Step one is Sundials.jl needs to support Sundials 6 (see [WIP] Refreshing the wrappers for Sundials 6.6 by ViralBShah · Pull Request #415 · SciML/Sundials.jl · GitHub)

Thanks very much again for the information.

Inside IDA(), I decreased max_order, max_error_test_failures, max_nonlinear_iters, and max_convergence_failures from their default values. This has seemed to have done the trick for now, I think…