|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.ode.sampling.AbstractStepInterpolator
org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator
org.apache.commons.math3.ode.nonstiff.DormandPrince54StepInterpolator
class DormandPrince54StepInterpolator
This class represents an interpolator over the last step during an ODE integration for the 5(4) Dormand-Prince integrator.
DormandPrince54Integrator
Field Summary | |
---|---|
private static double |
A70
Last row of the Butcher-array internal weights, element 0. |
private static double |
A72
Last row of the Butcher-array internal weights, element 2. |
private static double |
A73
Last row of the Butcher-array internal weights, element 3. |
private static double |
A74
Last row of the Butcher-array internal weights, element 4. |
private static double |
A75
Last row of the Butcher-array internal weights, element 5. |
private static double |
D0
Shampine (1986) Dense output, element 0. |
private static double |
D2
Shampine (1986) Dense output, element 2. |
private static double |
D3
Shampine (1986) Dense output, element 3. |
private static double |
D4
Shampine (1986) Dense output, element 4. |
private static double |
D5
Shampine (1986) Dense output, element 5. |
private static double |
D6
Shampine (1986) Dense output, element 6. |
private static long |
serialVersionUID
Serializable version identifier. |
private double[] |
v1
First vector for interpolation. |
private double[] |
v2
Second vector for interpolation. |
private double[] |
v3
Third vector for interpolation. |
private double[] |
v4
Fourth vector for interpolation. |
private boolean |
vectorsInitialized
Initialization indicator for the interpolation vectors. |
Fields inherited from class org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator |
---|
integrator, previousState, yDotK |
Fields inherited from class org.apache.commons.math3.ode.sampling.AbstractStepInterpolator |
---|
currentState, h, interpolatedDerivatives, interpolatedPrimaryDerivatives, interpolatedPrimaryState, interpolatedSecondaryDerivatives, interpolatedSecondaryState, interpolatedState, interpolatedTime |
Constructor Summary | |
---|---|
DormandPrince54StepInterpolator()
Simple constructor. |
|
DormandPrince54StepInterpolator(DormandPrince54StepInterpolator interpolator)
Copy constructor. |
Method Summary | |
---|---|
protected void |
computeInterpolatedStateAndDerivatives(double theta,
double oneMinusThetaH)
Compute the state and derivatives at the interpolated time. |
protected StepInterpolator |
doCopy()
Really copy the finalized instance. |
void |
reinitialize(AbstractIntegrator integrator,
double[] y,
double[][] yDotK,
boolean forward,
EquationsMapper primaryMapper,
EquationsMapper[] secondaryMappers)
Reinitialize the instance |
void |
storeTime(double t)
Store the current step time. |
Methods inherited from class org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator |
---|
readExternal, shift, writeExternal |
Methods inherited from class org.apache.commons.math3.ode.sampling.AbstractStepInterpolator |
---|
copy, doFinalize, finalizeStep, getCurrentTime, getGlobalCurrentTime, getGlobalPreviousTime, getInterpolatedDerivatives, getInterpolatedSecondaryDerivatives, getInterpolatedSecondaryState, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, setSoftCurrentTime, setSoftPreviousTime, 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 A70
private static final double A72
private static final double A73
private static final double A74
private static final double A75
private static final double D0
private static final double D2
private static final double D3
private static final double D4
private static final double D5
private static final double D6
private static final long serialVersionUID
private double[] v1
private double[] v2
private double[] v3
private double[] v4
private boolean vectorsInitialized
Constructor Detail |
---|
public DormandPrince54StepInterpolator()
reinitialize(org.apache.commons.math3.ode.AbstractIntegrator, double[], double[][], boolean, org.apache.commons.math3.ode.EquationsMapper, org.apache.commons.math3.ode.EquationsMapper[])
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 EmbeddedRungeKuttaIntegrator
uses the
prototyping design pattern to create the step interpolators by
cloning an uninitialized model and latter initializing the copy.
public DormandPrince54StepInterpolator(DormandPrince54StepInterpolator 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()
This method is called by AbstractStepInterpolator.copy()
after the
step has been finalized. It must perform a deep copy
to have an new instance completely independent for the
original instance.
doCopy
in class AbstractStepInterpolator
public void reinitialize(AbstractIntegrator integrator, double[] y, double[][] yDotK, boolean forward, EquationsMapper primaryMapper, EquationsMapper[] secondaryMappers)
Some Runge-Kutta integrators need fewer functions evaluations
than their counterpart step interpolators. So the interpolator
should perform the last evaluations they need by themselves. The
RungeKuttaIntegrator
and EmbeddedRungeKuttaIntegrator
abstract classes call this method in order to let the step
interpolator perform the evaluations it needs. These evaluations
will be performed during the call to doFinalize
if
any, i.e. only if the step handler either calls the finalizeStep
method or the
getInterpolatedState
method (for an interpolator which needs a
finalization) or if it clones the step interpolator.
reinitialize
in class RungeKuttaStepInterpolator
integrator
- integrator being usedy
- reference to the integrator array holding the state at
the end of the stepyDotK
- reference to the integrator array holding all the
intermediate slopesforward
- integration direction indicatorprimaryMapper
- equations mapper for the primary equations setsecondaryMappers
- equations mappers for the secondary equations setspublic void storeTime(double t)
storeTime
in class AbstractStepInterpolator
t
- current timeprotected void computeInterpolatedStateAndDerivatives(double theta, double oneMinusThetaH)
computeInterpolatedStateAndDerivatives
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |