|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.numerics.ODEMultistepSolver
public class ODEMultistepSolver
ODEMultistepSolver performs multiple ODE steps so that a uniform step size is maintained.
Nested Class Summary | |
---|---|
protected class |
ODEMultistepSolver.InternalODE
A class that saves an internal state that may be different from the orginal ODE. |
Field Summary | |
---|---|
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
|
Fields inherited from interface org.opensourcephysics.numerics.ODEAdaptiveSolver |
---|
BISECTION_EVENT_NOT_FOUND, DID_NOT_CONVERGE, NO_ERROR |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public ODEMultistepSolver(ODE ode)
ode
- protected ODEMultistepSolver()
Method Detail |
---|
protected ODEMultistepSolver.InternalODE setODE(ODE ode)
ode
- ODE
public static ODEAdaptiveSolver MultistepRK45(ODE ode)
ode
- ODE
public void enableRuntimeExpecptions(boolean enable)
enable
- booleanpublic void setMaxIterations(int n)
n
- maximumpublic void setTolerance(double tol)
setTolerance
in interface ODEAdaptiveSolver
tol
- the tolerancepublic double getTolerance()
getTolerance
in interface ODEAdaptiveSolver
public int getErrorCode()
getErrorCode
in interface ODEAdaptiveSolver
public double step()
step
in interface ODESolver
public void initialize(double stepSize)
initialize
in interface ODESolver
stepSize
- public void setStepSize(double stepSize)
setStepSize
in interface ODESolver
stepSize
- public void setMaximumNumberOfErrorMessages(int n)
n
- intpublic double getStepSize()
getStepSize
in interface ODESolver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |