|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.numeric.FirstOrderIntegratorAdapter
public class FirstOrderIntegratorAdapter
This class is a wrapper to Apache Commons Math. There is a subtle bug in Apache Commons Math (up to version 2.2 till now), namely if there are multiple event handlers that trigger simultaneously and one of them causes the integration to stop, then subsequent handlers will not be executed. An intrusive solution would be to modify the responsible code in Apache Commons Math, which seems to be in method acceptStep in AbstractIntegrator. A workaround is to simply always stop integration when an event triggers and handle events afterwards. This is what is implemented for now.
Field Summary | |
---|---|
static double |
CONVERGENCE
|
static double |
MAX_CHECK_INTERVAL
|
static int |
MAX_ITERATION_COUNT
|
Constructor Summary | |
---|---|
FirstOrderIntegratorAdapter(org.apache.commons.math.ode.FirstOrderIntegrator integrator)
|
Method Summary | |
---|---|
void |
integrate(ODE ode,
double t0,
double[] y0,
double t1,
double[] y)
Integrate ode from t0 to t1. |
void |
setMonitor(int n,
Monitor monitor)
Set monitor functions. |
void |
setOptions(java.util.Map options)
Set additional options for the integration process. |
void |
setTolerances(double[] absTol,
double[] relTol)
Set element-specific absolute and relative tolerance values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double CONVERGENCE
public static final double MAX_CHECK_INTERVAL
public static final int MAX_ITERATION_COUNT
Constructor Detail |
---|
public FirstOrderIntegratorAdapter(org.apache.commons.math.ode.FirstOrderIntegrator integrator)
Method Detail |
---|
public void integrate(ODE ode, double t0, double[] y0, double t1, double[] y) throws NumericException
Solver
integrate
in interface Solver
ode
- equationst0
- initial timey0
- initial statet1
- final timey
- memory to return state at t1, may refer to same object as y0
NumericException
public void setMonitor(int n, Monitor monitor)
Solver
setMonitor
in interface Solver
public void setOptions(java.util.Map options)
Solver
setOptions
in interface Solver
public void setTolerances(double[] absTol, double[] relTol)
Solver
setTolerances
in interface Solver
absTol
- element-specific absolute tolerance values, or nullrelTol
- element-specific relative tolerance values, or null
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |