Skip to content

Failed ODE does not return the expected retcode #283

@gustavoheiden

Description

@gustavoheiden

Although my ODE is failing by "Error test failures occurred too many times during one internal time step", the integrator.retcode still returned "Success".

After some debugging I found that in if block (line 1477) the integrator.flag is changing from -3 to 0 after evaluating line

integrator(integrator.u, integrator.t, Val{1})

In my local code, I performed this change in order to get the correct retcode from my failed ODE:
if integrator.opts.save_end && (isempty(integrator.sol.t) || integrator.sol.t[end] != integrator.t) && integrator.flag == 0

I hope that helps returning a more accurate error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions