Class NordsieckStepInterpolator
- java.lang.Object
- 
- org.apache.commons.math.ode.sampling.AbstractStepInterpolator
- 
- org.apache.commons.math.ode.sampling.NordsieckStepInterpolator
 
 
- 
- All Implemented Interfaces:
- java.io.Externalizable,- java.io.Serializable,- StepInterpolator
 
 public class NordsieckStepInterpolator extends AbstractStepInterpolator This class implements an interpolator for integrators using Nordsieck representation.This interpolator computes dense output around the current point. The interpolation equation is based on Taylor series formulas. - Since:
- 2.0
- Version:
- $Revision: 1073158 $ $Date: 2011-02-21 22:46:52 +0100 (lun. 21 févr. 2011) $
- See Also:
- AdamsBashforthIntegrator,- AdamsMoultonIntegrator, Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected double[]stateVariationState variation.- 
Fields inherited from class org.apache.commons.math.ode.sampling.AbstractStepInterpolatorcurrentState, h, interpolatedDerivatives, interpolatedState, interpolatedTime
 
- 
 - 
Constructor SummaryConstructors Constructor Description NordsieckStepInterpolator()Simple constructor.NordsieckStepInterpolator(NordsieckStepInterpolator interpolator)Copy constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputeInterpolatedStateAndDerivatives(double theta, double oneMinusThetaH)Compute the state and derivatives at the interpolated time.protected StepInterpolatordoCopy()Really copy the finalized instance.double[]getInterpolatedStateVariation()Get the state vector variation from current to interpolated state.voidreadExternal(java.io.ObjectInput in)voidreinitialize(double[] y, boolean forward)Reinitialize the instance.voidreinitialize(double time, double stepSize, double[] scaledDerivative, Array2DRowRealMatrix nordsieckVector)Reinitialize the instance.voidrescale(double stepSize)Rescale the instance.voidwriteExternal(java.io.ObjectOutput out)- 
Methods inherited from class org.apache.commons.math.ode.sampling.AbstractStepInterpolatorcopy, doFinalize, finalizeStep, getCurrentTime, getGlobalCurrentTime, getGlobalPreviousTime, getInterpolatedDerivatives, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, setInterpolatedTime, setSoftCurrentTime, setSoftPreviousTime, shift, storeTime, writeBaseExternal
 
- 
 
- 
- 
- 
Constructor Detail- 
NordsieckStepInterpolatorpublic NordsieckStepInterpolator() Simple constructor. This constructor builds an instance that is not usable yet, theAbstractStepInterpolator.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.
 - 
NordsieckStepInterpolatorpublic NordsieckStepInterpolator(NordsieckStepInterpolator interpolator) Copy constructor.- Parameters:
- interpolator- interpolator to copy from. The copy is a deep copy: its arrays are separated from the original arrays of the instance
 
 
- 
 - 
Method Detail- 
doCopyprotected StepInterpolator doCopy() Really copy the finalized instance.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.- Specified by:
- doCopyin class- AbstractStepInterpolator
- Returns:
- a copy of the finalized instance
 
 - 
reinitializepublic void reinitialize(double[] y, boolean forward)Reinitialize the instance.Beware that all arrays must be references to integrator arrays, in order to ensure proper update without copy. - Overrides:
- reinitializein class- AbstractStepInterpolator
- Parameters:
- y- reference to the integrator array holding the state at the end of the step
- forward- integration direction indicator
 
 - 
reinitializepublic void reinitialize(double time, double stepSize, double[] scaledDerivative, Array2DRowRealMatrix nordsieckVector)Reinitialize the instance.Beware that all arrays must be references to integrator arrays, in order to ensure proper update without copy. - Parameters:
- time- time at which all arrays are defined
- stepSize- step size used in the scaled and nordsieck arrays
- scaledDerivative- reference to the integrator array holding the first scaled derivative
- nordsieckVector- reference to the integrator matrix holding the nordsieck vector
 
 - 
rescalepublic void rescale(double stepSize) Rescale the instance.Since the scaled and Nordiseck arrays are shared with the caller, this method has the side effect of rescaling this arrays in the caller too. - Parameters:
- stepSize- new step size to use in the scaled and nordsieck arrays
 
 - 
getInterpolatedStateVariationpublic double[] getInterpolatedStateVariation() throws DerivativeExceptionGet the state vector variation from current to interpolated state.This method is aimed at computing y(tinterpolation) -y(tcurrent) accurately by avoiding the cancellation errors that would occur if the subtraction were performed explicitly. The returned vector is a reference to a reused array, so it should not be modified and it should be copied if it needs to be preserved across several calls. - Returns:
- state vector at time AbstractStepInterpolator.getInterpolatedTime()
- Throws:
- DerivativeException- if this call induces an automatic step finalization that throws one
- See Also:
- AbstractStepInterpolator.getInterpolatedDerivatives()
 
 - 
computeInterpolatedStateAndDerivativesprotected void computeInterpolatedStateAndDerivatives(double theta, double oneMinusThetaH)Compute the state and derivatives at the interpolated time. This is the main processing method that should be implemented by the derived classes to perform the interpolation.- Specified by:
- computeInterpolatedStateAndDerivativesin class- AbstractStepInterpolator
- Parameters:
- 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
 
 - 
writeExternalpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
- writeExternalin interface- java.io.Externalizable
- Specified by:
- writeExternalin class- AbstractStepInterpolator
- Throws:
- java.io.IOException
 
 - 
readExternalpublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
- readExternalin interface- java.io.Externalizable
- Specified by:
- readExternalin class- AbstractStepInterpolator
- Throws:
- java.io.IOException
- java.lang.ClassNotFoundException
 
 
- 
 
-