|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.numerics.AbstractODESolver org.opensourcephysics.numerics.Euler
public class Euler
Euler implements an Euler method ODE solver. The Euler method is unstable for many systems. It is included as an example of how to use the ODE and ODESolver interface.
Field Summary | |
---|---|
protected double[] |
rate
|
Fields inherited from class org.opensourcephysics.numerics.AbstractODESolver |
---|
numEqn, ode, stepSize |
Constructor Summary | |
---|---|
Euler(ODE ode)
Constructs the Euler ODESolver for a system of ordinary differential equations. |
Method Summary | |
---|---|
void |
initialize(double stepSize)
Initializes the ODE solver and allocates the rate array. |
double |
step()
Steps (advances) the differential equations by the stepSize. |
Methods inherited from class org.opensourcephysics.numerics.AbstractODESolver |
---|
getStepSize, setStepSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double[] rate
Constructor Detail |
---|
public Euler(ODE ode)
ode
- the system of differential equations.Method Detail |
---|
public void initialize(double stepSize)
initialize
in interface ODESolver
initialize
in class AbstractODESolver
stepSize
- public double step()
step
in interface ODESolver
step
in class AbstractODESolver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |