Top Description Methods
org.apache.commons.math3.ode.sampling

public Interface FixedStepHandler


This interface represents a handler that should be called after each successful fixed step.

This interface should be implemented by anyone who is interested in getting the solution of an ordinary differential equation at fixed time steps. Objects implementing this interface should be wrapped within an instance of StepNormalizer that itself is used as the general StepHandler by the integrator. The StepNormalizer object is called according to the integrator internal algorithms and it calls objects implementing this interface as necessary at fixed time steps.

Since
1.2
See Also
StepHandler, StepNormalizer

Method Summary

Modifier and TypeMethod and Description
public void
handleStep(double
time of the current step
t
,
double[]
state vector at t. For efficiency purposes, the StepNormalizer class reuses the same array on each call, so if the instance wants to keep it across all calls (for example to provide at the end of the integration a complete array of all steps), it should build a local copy store this copy.
y
,
double[]
derivatives of the state vector state vector at t. For efficiency purposes, the StepNormalizer class reuses the same array on each call, so if the instance wants to keep it across all calls (for example to provide at the end of the integration a complete array of all steps), it should build a local copy store this copy.
yDot
,
boolean
true if the step is the last one
isLast
)

Handle the last accepted step

public void
init(double
start value of the independent time variable
t0
,
double[]
array containing the start value of the state vector
y0
,
double
target time for the integration
t
)

Initialize step handler at the start of an ODE integration.

Method Detail

handleStepback to summary
public void handleStep(double t, double[] y, double[] yDot, boolean isLast)

Handle the last accepted step

Parameters
t:double

time of the current step

y:double[]

state vector at t. For efficiency purposes, the StepNormalizer class reuses the same array on each call, so if the instance wants to keep it across all calls (for example to provide at the end of the integration a complete array of all steps), it should build a local copy store this copy.

yDot:double[]

derivatives of the state vector state vector at t. For efficiency purposes, the StepNormalizer class reuses the same array on each call, so if the instance wants to keep it across all calls (for example to provide at the end of the integration a complete array of all steps), it should build a local copy store this copy.

isLast:boolean

true if the step is the last one

initback to summary
public void init(double t0, double[] y0, double t)

Initialize step handler at the start of an ODE integration.

This method is called once at the start of the integration. It may be used by the step handler to initialize some internal data if needed.

Parameters
t0:double

start value of the independent time variable

y0:double[]

array containing the start value of the state vector

t:double

target time for the integration