|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.ode.AbstractStepInterpolator
org.apache.commons.math.ode.RungeKuttaStepInterpolator
org.apache.commons.math.ode.GillStepInterpolator
class GillStepInterpolator
This class implements a step interpolator for the Gill fourth order Runge-Kutta integrator.
This interpolator allows to compute dense output inside the last step computed. The interpolation equation is consistent with the integration scheme :
y(t_n + theta h) = y (t_n + h) - (1 - theta) (h/6) [ (1 - theta) (1 - 4 theta) y'_1 + (1 - theta) (1 + 2 theta) ((2-q) y'_2 + (2+q) y'_3) + (1 + theta + 4 theta^2) y'_4 ]where theta belongs to [0 ; 1], q = sqrt(2) and where y'_1 to y'_4 are the four evaluations of the derivatives already computed during the step.
GillIntegrator
Field Summary | |
---|---|
private static long |
serialVersionUID
Serializable version identifier |
private static double |
tMq
First Gill coefficient. |
private static double |
tPq
Second Gill coefficient. |
Fields inherited from class org.apache.commons.math.ode.RungeKuttaStepInterpolator |
---|
equations, yDotK |
Fields inherited from class org.apache.commons.math.ode.AbstractStepInterpolator |
---|
currentState, currentTime, h, interpolatedState, interpolatedTime, previousTime |
Constructor Summary | |
---|---|
GillStepInterpolator()
Simple constructor. |
|
GillStepInterpolator(GillStepInterpolator interpolator)
Copy constructor. |
Method Summary | |
---|---|
protected void |
computeInterpolatedState(double theta,
double oneMinusThetaH)
Compute the state at the interpolated time. |
protected StepInterpolator |
doCopy()
Really copy the finalized instance. |
Methods inherited from class org.apache.commons.math.ode.RungeKuttaStepInterpolator |
---|
readExternal, reinitialize, writeExternal |
Methods inherited from class org.apache.commons.math.ode.AbstractStepInterpolator |
---|
copy, doFinalize, finalizeStep, getCurrentTime, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, shift, storeTime, writeBaseExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final double tMq
private static final double tPq
private static final long serialVersionUID
Constructor Detail |
---|
public GillStepInterpolator()
AbstractStepInterpolator.reinitialize(double[], boolean)
method should be called
before using the instance in order to initialize the internal arrays. This
constructor is used only in order to delay the initialization in
some cases. The RungeKuttaIntegrator
class uses the
prototyping design pattern to create the step interpolators by
cloning an uninitialized model and latter initializing the copy.
public GillStepInterpolator(GillStepInterpolator interpolator)
interpolator
- interpolator to copy from. The copy is a deep
copy: its arrays are separated from the original arrays of the
instanceMethod Detail |
---|
protected StepInterpolator doCopy()
doCopy
in class AbstractStepInterpolator
protected void computeInterpolatedState(double theta, double oneMinusThetaH) throws DerivativeException
computeInterpolatedState
in class AbstractStepInterpolator
theta
- normalized interpolation abscissa within the step
(theta is zero at the previous time step and one at the current time step)oneMinusThetaH
- time gap between the interpolated time and
the current time
DerivativeException
- this exception is propagated to the caller if the
underlying user function triggers one
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |