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()
Empty constructor.
|
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.
|
boolean |
isIncoherentState(double[] currY)
Check if state is coherent.
|
void |
readExternal(ObjectInput oi) |
void |
reinitialize(AbstractIntegrator rkIntegrator,
double[] y,
double[][] yDotArray,
boolean forward,
EquationsMapper primaryMapper,
EquationsMapper[] secondaryMappers)
Reinitialize the instance
Some Runge-Kutta integrators need fewer functions evaluations than their counterpart step interpolators.
|
void |
shift()
Shift one step forward.
|
void |
writeExternal(ObjectOutput oo) |
copy, doFinalize, finalizeStep, getCurrentTime, getGlobalCurrentTime, getGlobalPreviousTime, getInterpolatedDerivatives, getInterpolatedSecondaryDerivatives, getInterpolatedSecondaryState, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, setSoftCurrentTime, setSoftPreviousTime, storeTime, writeBaseExternalprotected double[] previousState
protected double[][] yDotK
protected AbstractIntegrator integrator
public RungeKutta6StepInterpolator()
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 AbstractStepInterpolatorprotected void computeInterpolatedStateAndDerivatives(double theta,
double oneMinusThetaH)
computeInterpolatedStateAndDerivatives in class AbstractStepInterpolatortheta - 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 boolean isIncoherentState(double[] currY)
currY - current statepublic 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()
storeTimeshift in class AbstractStepInterpolatorpublic void writeExternal(ObjectOutput oo) throws IOException
writeExternal in interface ExternalizablewriteExternal in class AbstractStepInterpolatorIOExceptionpublic void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class AbstractStepInterpolatorIOExceptionClassNotFoundExceptionCopyright © 2024 CNES. All rights reserved.