public class RungeKutta6StepInterpolator extends AbstractStepInterpolator
Interpolator for RungeKutta6Integrator
.
Warning: This interpolator currently performs a 2nd order interpolation issued from
article Dense output for strong stability preserving Runge–Kutta methods, D. Ketcheson,
2016.
Accuracy is however below 1m for standard timestep.
Modifier and Type | Field and Description |
---|---|
protected AbstractIntegrator |
integrator
Reference to the integrator.
|
protected double[] |
previousState
Previous state.
|
protected double[][] |
yDotK
Slopes at the intermediate points
|
currentState, h, interpolatedDerivatives, interpolatedPrimaryDerivatives, interpolatedPrimaryState, interpolatedSecondaryDerivatives, interpolatedSecondaryState, interpolatedState, interpolatedTime
Constructor and Description |
---|
RungeKutta6StepInterpolator(double[] bIn)
Simple constructor.
|
RungeKutta6StepInterpolator(RungeKutta6StepInterpolator interpolator)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
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) |
copy, doFinalize, finalizeStep, getCurrentTime, getGlobalCurrentTime, getGlobalPreviousTime, getInterpolatedDerivatives, getInterpolatedSecondaryDerivatives, getInterpolatedSecondaryState, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, setSoftCurrentTime, setSoftPreviousTime, storeTime, writeBaseExternal
protected double[] previousState
protected double[][] yDotK
protected AbstractIntegrator integrator
public RungeKutta6StepInterpolator(double[] bIn)
RungeKuttaStepInterpolator.reinitialize(fr.cnes.sirius.patrius.math.ode.AbstractIntegrator, double[], double[][], boolean, fr.cnes.sirius.patrius.math.ode.EquationsMapper, fr.cnes.sirius.patrius.math.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.bIn
- B butcher arraypublic RungeKutta6StepInterpolator(RungeKutta6StepInterpolator interpolator)
interpolator
- interpolator to copy from. The copy is a deep copy: its arrays are
separated from the original arrays of the instanceprotected 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
Copyright © 2018 CNES. All Rights Reserved.