I am using NDSolve to compute particles' trajectories. Typically, I get an error of the type:
NDSolve::ndsz: At t == 0.11880535502829011`, step size is effectively zero; singularity or stiff system suspected.
What I would like is not to get rid of the error, but to save the time at which the simulation encountered a problem, in this case t = 0.11880535502829011`.
How can I do it in an authomatic way?
U=NDSolveValue[... ]
you get the time value withU["Domain"]
. Please provide your code. $\endgroup$