|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.math3.ode.sampling.AbstractStepInterpolator org.apache.commons.math3.ode.nonstiff.RungeKutta6StepInterpolator
public class RungeKutta6StepInterpolator
Interpolator for RungeKutta6Integrator
.
Warning: This interpolator currently performs a simple linear interpolation. As a result, resulting interpolated points may not be very accurate, particularly for high dynamics systems.
Field Summary | |
---|---|
protected AbstractIntegrator |
integrator
Reference to the integrator. |
protected double[] |
previousState
Previous state. |
protected double[][] |
yDotK
Slopes at the intermediate points |
Fields inherited from class org.apache.commons.math3.ode.sampling.AbstractStepInterpolator |
---|
currentState, h, interpolatedDerivatives, interpolatedPrimaryDerivatives, interpolatedPrimaryState, interpolatedSecondaryDerivatives, interpolatedSecondaryState, interpolatedState, interpolatedTime |
Constructor Summary | |
---|---|
RungeKutta6StepInterpolator()
Simple constructor. |
|
RungeKutta6StepInterpolator(RungeKutta6StepInterpolator 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 |
readExternal(ObjectInput in)
|
void |
reinitialize(AbstractIntegrator rkIntegrator,
double[] y,
double[][] yDotArray,
boolean forward,
EquationsMapper primaryMapper,
EquationsMapper[] secondaryMappers)
Reinitialize the instance |
void |
shift()
Shift one step forward. |
void |
writeExternal(ObjectOutput out)
|
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, storeTime, writeBaseExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double[] previousState
protected double[][] yDotK
protected AbstractIntegrator integrator
Constructor Detail |
---|
public RungeKutta6StepInterpolator()
RungeKuttaStepInterpolator.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 RungeKuttaIntegrator
class uses the prototyping design pattern to create the step
interpolators by cloning an uninitialized model and latter initializing
the copy.
public RungeKutta6StepInterpolator(RungeKutta6StepInterpolator 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
protected 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 timepublic void reinitialize(AbstractIntegrator rkIntegrator, double[] y, double[][] yDotArray, 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.
rkIntegrator
- integrator being usedy
- reference to the integrator array holding the state at
the end of the stepyDotArray
- 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 shift()
storeTime
shift
in class AbstractStepInterpolator
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class AbstractStepInterpolator
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class AbstractStepInterpolator
IOException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |