Package odesolver
Interface StepStopCondition
public interface StepStopCondition
A per-accepted-step stopping test for
LSODA.
WHY THIS EXISTS RATHER THAN A StepHandler. LSODA implements
FirstOrderIntegrator, so it carries addStepHandler and
addEventHandler -- and both are EMPTY STUBS that accept a handler and
discard it. Code registering one compiles, runs, and is silently never
called. This interface is the honest hook: LSODA consults it at the
point it records an accepted step, which is the same instant MATLAB's
OutputFcn and the native-Python step loop test at, so the four codebases stop
on the same condition at the same place.
THE STATE IS 1-INDEXED. LSODA carries its solution in
y[1..n] with y[0] unused, the Fortran convention the
translation kept; an implementation must read from index 1, not 0.
-
Method Summary
-
Method Details
-
stop
boolean stop(double t, double[] y) - Parameters:
t- the time of the accepted stepy- the state att, 1-indexed: the coordinates arey[1] .. y[n]andy[0]is unused- Returns:
- true to end the integration here, reporting
tas the window's end
-