Open maysam-gholampour opened 1 day ago
Just for your information, in my case, I increased the max_num_subintervals
to 4000 and the solver returned the retcode
as Success
. There was a very small difference between the results for default value 3000 and 4000. I mean the results for 3000 was acceptable for me.
Warning users about the maximum number of subintervals being exceeded sounds good to me, also there should be some warnings about the large defect, I can add that
Is your feature request related to a problem? Please describe.
Yes, I ran my code to solve a two-poimt BVP system with different inputs using
FIRK
solver, and for some cases, the return code wasFailure
. However, when I increased themax_num_subintervals
, it returnedSuccess
as the return code. I reviewed the source code and noticed that for all solvers with defect control (in my case,RadauIIa7
), there is anif
condition:if 2 * (length(cache.mesh) - 1) > cache.alg.max_num_subintervals
This condition sets the return code toFailure
. MRE: https://github.com/SciML/BoundaryValueDiffEq.jl/issues/242Describe the solution you’d like
I believe adding a warning with a recommendation would be helpful in this case. In the SciMLBase documentation, it is mentioned that if the solver is Julia-based solver, an issue can be opened. https://docs.sciml.ai/SciMLBase/stable/interfaces/Solutions/#SciMLBase.ReturnCode.Failure
Describe alternatives you’ve considered
I believe adding a warning with a recommendation would be helpful in this case. The warning should mention not only the failure condition but also indicate that the solver still returns results, which might not be reliable.
Additional context
The code line can be modified for FIRK