Class DummyStepInterpolator
java.lang.Object
org.apache.commons.math.ode.sampling.AbstractStepInterpolator
org.apache.commons.math.ode.sampling.DummyStepInterpolator
- All Implemented Interfaces:
Externalizable
,Serializable
,StepInterpolator
This class is a step interpolator that does nothing.
This class is used when the "step handler"
set up by the user does not need step interpolation. It does not
recompute the state when setInterpolatedTime
is called. This implies the interpolated state
is always the state at the end of the current step.
- Since:
- 1.2
- Version:
- $Revision: 1037327 $ $Date: 2010-11-20 21:57:37 +0100 (sam. 20 nov. 2010) $
- See Also:
-
Field Summary
Fields inherited from class org.apache.commons.math.ode.sampling.AbstractStepInterpolator
currentState, h, interpolatedDerivatives, interpolatedState, interpolatedTime
-
Constructor Summary
ConstructorsConstructorDescriptionSimple constructor.DummyStepInterpolator
(double[] y, double[] yDot, boolean forward) Simple constructor.DummyStepInterpolator
(DummyStepInterpolator interpolator) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
computeInterpolatedStateAndDerivatives
(double theta, double oneMinusThetaH) Compute the state at the interpolated time.protected StepInterpolator
doCopy()
Really copy the finalized instance.void
Read the instance from an input channel.void
Write the instance to an output channel.Methods inherited from class org.apache.commons.math.ode.sampling.AbstractStepInterpolator
copy, doFinalize, finalizeStep, getCurrentTime, getGlobalCurrentTime, getGlobalPreviousTime, getInterpolatedDerivatives, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, setSoftCurrentTime, setSoftPreviousTime, shift, storeTime, writeBaseExternal
-
Constructor Details
-
DummyStepInterpolator
public DummyStepInterpolator()Simple constructor. This constructor builds an instance that is not usable yet, theAbstractStepInterpolator.reinitialize
protected 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. As an example, theEmbeddedRungeKuttaIntegrator
uses the prototyping design pattern to create the step interpolators by cloning an uninitialized model and latter initializing the copy. -
DummyStepInterpolator
public DummyStepInterpolator(double[] y, double[] yDot, boolean forward) Simple constructor.- Parameters:
y
- reference to the integrator array holding the state at the end of the stepyDot
- reference to the integrator array holding the state derivative at some arbitrary point within the stepforward
- integration direction indicator
-
DummyStepInterpolator
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 Details
-
doCopy
Really copy the finalized instance.- Specified by:
doCopy
in classAbstractStepInterpolator
- Returns:
- a copy of the finalized instance
-
computeInterpolatedStateAndDerivatives
protected void computeInterpolatedStateAndDerivatives(double theta, double oneMinusThetaH) Compute the state at the interpolated time. In this class, this method does nothing: the interpolated state is always the state at the end of the current step.- Specified by:
computeInterpolatedStateAndDerivatives
in classAbstractStepInterpolator
- 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
-
writeExternal
Write the instance to an output channel.- Specified by:
writeExternal
in interfaceExternalizable
- Specified by:
writeExternal
in classAbstractStepInterpolator
- Parameters:
out
- output channel- Throws:
IOException
- if the instance cannot be written
-
readExternal
Read the instance from an input channel.- Specified by:
readExternal
in interfaceExternalizable
- Specified by:
readExternal
in classAbstractStepInterpolator
- Parameters:
in
- input channel- Throws:
IOException
- if the instance cannot be read
-