integrators
Class CashKarpIntegrator
java.lang.Object
integrators.Integrator
integrators.CashKarpIntegrator
- public class CashKarpIntegrator
- extends Integrator
Fifth-order adaptive step-size Runga-Kutta.
see Numerical Recipes in C; pg 717
Method Summary |
float |
ckGetErrorEstimate(int index)
|
float |
getTimestep()
|
void |
init(Model model)
Any object planning to use an Integrator of any kind MUST call its
init(Model) method, which (among other things) is generally used to allocate
storage arrays for the intermediates in an integration method. |
float |
IntegrateOneStep()
Integrates across a single time step. |
void |
reset()
Should be called after the Integrator has crossed an entire interval. |
void |
setTimestep(float t)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CashKarpIntegrator
public CashKarpIntegrator()
init
public void init(Model model)
- Description copied from class:
Integrator
- Any object planning to use an Integrator of any kind MUST call its
init(Model) method, which (among other things) is generally used to allocate
storage arrays for the intermediates in an integration method. This method
does NOT do any numerics so does not depend on the state of the model, but
it DOES need to be called after the model has been properly populated with
Cells and Nodes, and needs to be called again if these change.
- Overrides:
init
in class Integrator
reset
public void reset()
- Description copied from class:
Integrator
- Should be called after the Integrator has crossed an entire interval.
The base class does nothing; typical subclasses will override Integrator.reset()
to reset the time step size to the default value. This method is NOT used to
reallocate storage; that requires a call to init().
- Overrides:
reset
in class Integrator
IntegrateOneStep
public float IntegrateOneStep()
- Description copied from class:
Integrator
- Integrates across a single time step. Return value is the size of the
timestep, which may differ from that specified by the calling method if the
Integrator subclass adapts the step size to match error requirements.
- Overrides:
IntegrateOneStep
in class Integrator
ckGetErrorEstimate
public float ckGetErrorEstimate(int index)
getTimestep
public float getTimestep()
setTimestep
public void setTimestep(float t)