integrators
Class HuenIntegrator

java.lang.Object
  extended byintegrators.Integrator
      extended byintegrators.HuenIntegrator

public class HuenIntegrator
extends Integrator

Simple predictor-corrector with simple-minded adaptive stepsizing... probably unstable and rather inefficient, and shouldn't be used for any real work, but maybe for igniting a better multistep method... or maybe with methods that use extrapolation to zero stepsize. Basically it makes an estimate of y(t+h) by first making such an estimate with the forward Euler step y(t+h) = y(t) + hf(y(t)), then using that estimate to calculate the backward Euler step y(t+h) = y(t) + hf(y(t+h)), then averaging the two estimates. Because of the averaging, and because no iteration is performed on the correction step, this is not really an implicit method.


Nested Class Summary
 
Nested classes inherited from class integrators.Integrator
Integrator.NVmatrix, Integrator.NVvector
 
Constructor Summary
HuenIntegrator()
          Deprecated. no-argument constructor allows instantiating a HuenIntegrator generically from its name alone, with default minimum step size of 10E-5 and with step size adaptation turned ON.
 
Method Summary
 void init(Model model)
          Deprecated. Other than allocating the necessary storage arrays, HuenIntegrator.init() also sets the error tolerance to 10E-4 and minimum step size to 10E-5.
 float IntegrateOneStep()
          Deprecated. Integrates across a single time step.
 void reset()
          Deprecated. Resets timestep to default, and cleans up various internal flags; call before starting a new run.
 void setAdaptiveStepsizing(boolean b)
          Deprecated. Turn on or off the recursion this simple-minded method uses to try and make the error estimate acceptable.
 void setMinStepSize(float ts)
          Deprecated. Set the minimum timestep.
 void setStepSize(float ts)
          Deprecated. HuenIntegrator overrides Integrator.setStepSize(float) to enforce the minimum time step.
 
Methods inherited from class integrators.Integrator
copyNVarray, getCurrentValues, getDerivatives, getErrorEstimate, isType, setDefaultStepSize, setErrorTolerance, setFinalValues, setIntegrationValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HuenIntegrator

public HuenIntegrator()
Deprecated. 
no-argument constructor allows instantiating a HuenIntegrator generically from its name alone, with default minimum step size of 10E-5 and with step size adaptation turned ON.

Method Detail

init

public void init(Model model)
Deprecated. 
Other than allocating the necessary storage arrays, HuenIntegrator.init() also sets the error tolerance to 10E-4 and minimum step size to 10E-5. To override these defaults, follow init() with a call to Integrator.setErrorTolerance(float), then call HuenIntegrator.setMinStepSize(float). The minimum step size should probably be about one tenth of the error tolerance.

Overrides:
init in class Integrator

reset

public void reset()
Deprecated. 
Resets timestep to default, and cleans up various internal flags; call before starting a new run. Does NOT affect the error estimate (which is overwritten each step anyway), the default time step size, the minimum step size, or whether the method adapts the step size.

Overrides:
reset in class Integrator

IntegrateOneStep

public float IntegrateOneStep()
Deprecated. 
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

setAdaptiveStepsizing

public void setAdaptiveStepsizing(boolean b)
Deprecated. 
Turn on or off the recursion this simple-minded method uses to try and make the error estimate acceptable. Turn it off if this method is being used as a subsidiary for another method, or if exact step sizes are required.


setMinStepSize

public void setMinStepSize(float ts)
Deprecated. 
Set the minimum timestep. If the method has to use this minimum size, it will belch a warning and just let the errors accumulate, rather than recurse further with a smaller step. The warning is issued to System.out only once each time the floor is hit (I hope), so multiple warnings mean the Integrator is bouncing off the floor set by the minimum time step.


setStepSize

public void setStepSize(float ts)
Deprecated. 
HuenIntegrator overrides Integrator.setStepSize(float) to enforce the minimum time step. Use setMinStepSize(float) first if you need to.

Overrides:
setStepSize in class Integrator