ODEAdaptiveSolver, ODESolverpublic class ODEMultistepSolver extends java.lang.Object implements ODEAdaptiveSolver
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
ODEMultistepSolver.InternalODE |
A class that saves an internal state that may be different from the orginal ODE.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected boolean |
enableExceptions |
|
protected int |
err_code |
|
protected java.lang.String |
err_msg |
|
protected double |
fixedStepSize |
|
protected ODEMultistepSolver.InternalODE |
internalODE |
|
protected int |
maxIterations |
|
protected ODEAdaptiveSolver |
odeEngine |
BISECTION_EVENT_NOT_FOUND, DID_NOT_CONVERGE, NO_ERROR| Modifier | Constructor | Description |
|---|---|---|
protected |
ODEMultistepSolver() |
Constructs a ODEMultistepSolver without an ODE so that a factory method
can create a custom solver.
|
|
ODEMultistepSolver(ODE ode) |
Constructs an ODEMultiStep ODE solver for a system of ordinary differential equations.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
enableRuntimeExpecptions(boolean enable) |
Enables runtime exceptions if the solver does not converge.
|
int |
getErrorCode() |
Gets the error code.
|
double |
getStepSize() |
Gets the step size.
|
double |
getTolerance() |
Gets the tolerance of the adaptive ODE solver.
|
void |
initialize(double stepSize) |
Initializes the ODE solver.
|
static ODEAdaptiveSolver |
MultistepRK45(ODE ode) |
A factory method that creates a multisetp solver using the RK45 engine.
|
void |
setMaximumNumberOfErrorMessages(int n) |
Sets the number of error messages if ODE solver did not converge.
|
void |
setMaxIterations(int n) |
Sets the maximum number of iterations.
|
protected ODEMultistepSolver.InternalODE |
setODE(ODE ode) |
Sets the ODE for this solver.
|
void |
setStepSize(double stepSize) |
Sets the fixed step size.
|
void |
setTolerance(double tol) |
Sets the tolerance of the adaptive ODE solver.
|
double |
step() |
Steps (advances) the differential equations by the stepSize.
|
protected int err_code
protected int maxIterations
protected boolean enableExceptions
protected java.lang.String err_msg
protected ODEAdaptiveSolver odeEngine
protected double fixedStepSize
protected ODEMultistepSolver.InternalODE internalODE
public ODEMultistepSolver(ODE ode)
ode - protected ODEMultistepSolver()
protected ODEMultistepSolver.InternalODE setODE(ODE ode)
ode - ODEpublic static ODEAdaptiveSolver MultistepRK45(ODE ode)
ode - ODEpublic void enableRuntimeExpecptions(boolean enable)
enable - booleanpublic void setMaxIterations(int n)
n - maximumpublic void setTolerance(double tol)
setTolerance in interface ODEAdaptiveSolvertol - the tolerancepublic double getTolerance()
getTolerance in interface ODEAdaptiveSolverpublic int getErrorCode()
getErrorCode in interface ODEAdaptiveSolverpublic double step()
public void initialize(double stepSize)
initialize in interface ODESolverstepSize - public void setStepSize(double stepSize)
setStepSize in interface ODESolverstepSize - public void setMaximumNumberOfErrorMessages(int n)
n - intpublic double getStepSize()
getStepSize in interface ODESolver