package odeadapt; import Jama.*; /** * solve an ODE by giving the "next" value for x * generic version */ public abstract class ODESolver { // ode to solve protected ODE ode; // current values public double t; public Matrix x; /** * construct solver for a given ODE */ public ODESolver(ODE ode) { this.ode = ode; t = ode.t0; x = ode.x0.copy(); } /** * computes x(t+dt)<br> * returns number of steps needed */ public abstract int nextStep(double dt) throws StepsizeTooSmallException; }