public class CashKarp45 extends java.lang.Object implements ODEAdaptiveSolver
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enableExceptions |
protected double |
tol |
BISECTION_EVENT_NOT_FOUND, DID_NOT_CONVERGE, NO_ERROR| Constructor and Description |
|---|
CashKarp45(ODE _ode)
Constructs the CashKarp45 ODESolver for a system of ordinary differential equations.
|
| Modifier and Type | Method and 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()
Method getTolerance
|
void |
initialize(double _stepSize)
Initializes the ODE solver.
|
void |
setStepSize(double stepSize)
Sets the step size.
|
void |
setTolerance(double _tol)
Method setTolerance
|
double |
step()
Steps (advances) the differential equations by the stepSize.
|
public CashKarp45(ODE _ode)
_ode - the system of differential equations.public void initialize(double _stepSize)
initialize in interface ODESolver_stepSize - public double step()
public void enableRuntimeExpecptions(boolean enable)
enable - booleanpublic void setStepSize(double stepSize)
setStepSize in interface ODESolverstepSize - public double getStepSize()
getStepSize in interface ODESolverpublic void setTolerance(double _tol)
setTolerance in interface ODEAdaptiveSolver_tol - public double getTolerance()
getTolerance in interface ODEAdaptiveSolverpublic int getErrorCode()
getErrorCode in interface ODEAdaptiveSolver