|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcpsim.ode.DifferentialEquations
public class DifferentialEquations
Superclass for all differential equations
| Nested Class Summary | |
|---|---|
static class |
DifferentialEquations.Method
|
| Field Summary | |
|---|---|
DifferentialEquation[] |
de
|
double |
dtused
|
int |
n
|
Tasks[] |
st
|
int |
taskN
|
| Constructor Summary | |
|---|---|
DifferentialEquations(double t,
double dt,
DifferentialEquations.Method method)
|
|
| Method Summary | |
|---|---|
DifferentialEquation |
add(DifferentialEquation eq)
|
java.util.List<DifferentialEquation> |
add(java.util.List<DifferentialEquation> list)
|
Tasks |
addTasks(Tasks st)
|
void |
after()
|
void |
before()
|
double |
getDt()
Gets proposed value for next time step. |
double |
getDtmax()
Gets biggest allowed time step (default: initial dt). |
double |
getDtmin()
Gets lowest allowed time step (default: initial dt * 0.000001). |
double |
getDttiny()
Gets time distance before curve break (default: initial dt * 0.0001). |
double |
getDtused()
Gets value used for last time step. |
double |
getEps()
Gets error tolerance level (default: 0.000001). |
double |
getNextStepsize()
Can be overridden. |
double |
getT()
Gets the actual simulation time. |
boolean |
remove(DifferentialEquation eq)
|
boolean |
removeTasks(Tasks st)
|
void |
setDt(double x)
Sets proposed value for next time step. |
void |
setDtmax(double x)
Sets biggest allowed time step (default: initial dt). |
void |
setDtmin(double x)
Sets lowest allowed time step (default: initial dt * 0.000001). |
void |
setDttiny(double x)
Sets time distance before curve break (default: initial dt * 0.0001). |
void |
setEps(double x)
Sets error tolerance level (default: 0.000001). |
void |
setInitialValues()
Sets all state variables to their initial value at start time. |
void |
setMethod(DifferentialEquations.Method m)
Sets the integration method. |
void |
setNextStepsize(double dt)
|
void |
setT(double t)
|
void |
setValues(double t)
Is called just before (#link dxdt). |
void |
step_Euler()
The simplest integration method (should only be used for testing purposes). |
void |
step_RungeKutta4()
Implements the fourth-order Runge-Kutta algorithm. |
void |
step_RungeKutta45()
performs one integration step with variable stepsize computes: dtused = value just used for last step dt = proposed value for next step |
void |
step()
|
void |
stepDelta(double delta)
|
void |
stepUntil(double until)
Should be called often enough to achieve smooth animations (ca. 10 Hz). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public double dtused
public int n
public DifferentialEquation[] de
public int taskN
public Tasks[] st
| Constructor Detail |
|---|
public DifferentialEquations(double t,
double dt,
DifferentialEquations.Method method)
t - start timedt - initial (and maximum) stepsize (delta t)method - integration method| Method Detail |
|---|
public void setMethod(DifferentialEquations.Method m)
public double getT()
public void setT(double t)
public void setDt(double x)
public double getDt()
public double getDtused()
public void setDtmax(double x)
public double getDtmax()
public void setDtmin(double x)
public double getDtmin()
public void setDttiny(double x)
DifferentialEquation.dxdt(double))
public double getDttiny()
DifferentialEquation.dxdt(double))
public void setEps(double x)
public double getEps()
public void before()
public void after()
public DifferentialEquation add(DifferentialEquation eq)
public java.util.List<DifferentialEquation> add(java.util.List<DifferentialEquation> list)
public boolean remove(DifferentialEquation eq)
public Tasks addTasks(Tasks st)
public boolean removeTasks(Tasks st)
public void setInitialValues()
public void setValues(double t)
t - the actual timepublic double getNextStepsize()
0: time to next break
Integration algorithms with variable stepsize
(like step_RungeKutta45()) will set their stepsize
so that no step will jump over the break in the curves.
public void setNextStepsize(double dt)
public void step()
public void stepUntil(double until)
public void stepDelta(double delta)
public void step_Euler()
dt
public void step_RungeKutta4()
public void step_RungeKutta45()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||