|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.ode.AbstractStepInterpolator
org.apache.commons.math.ode.RungeKuttaStepInterpolator
abstract class RungeKuttaStepInterpolator
This class represents an interpolator over the last step during an ODE integration for Runge-Kutta and embedded Runge-Kutta integrators.
RungeKuttaIntegrator,
EmbeddedRungeKuttaIntegrator| Field Summary | |
|---|---|
protected FirstOrderDifferentialEquations |
equations
Reference to the differential equations beeing integrated. |
protected double[][] |
yDotK
Slopes at the intermediate points |
| Fields inherited from class org.apache.commons.math.ode.AbstractStepInterpolator |
|---|
currentState, currentTime, h, interpolatedState, interpolatedTime, previousTime |
| Constructor Summary | |
|---|---|
protected |
RungeKuttaStepInterpolator()
Simple constructor. |
|
RungeKuttaStepInterpolator(RungeKuttaStepInterpolator interpolator)
Copy constructor. |
| Method Summary | |
|---|---|
void |
readExternal(java.io.ObjectInput in)
Read the state of the instance. |
void |
reinitialize(FirstOrderDifferentialEquations equations,
double[] y,
double[][] yDotK,
boolean forward)
Reinitialize the instance |
void |
writeExternal(java.io.ObjectOutput out)
Save the state of the instance. |
| Methods inherited from class org.apache.commons.math.ode.AbstractStepInterpolator |
|---|
computeInterpolatedState, copy, doCopy, doFinalize, finalizeStep, getCurrentTime, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, shift, storeTime, writeBaseExternal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double[][] yDotK
protected FirstOrderDifferentialEquations equations
| Constructor Detail |
|---|
protected RungeKuttaStepInterpolator()
reinitialize(org.apache.commons.math.ode.FirstOrderDifferentialEquations, double[], 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. The RungeKuttaIntegrator and EmbeddedRungeKuttaIntegrator classes uses the prototyping design
pattern to create the step interpolators by cloning an
uninitialized model and latter initializing the copy.
public RungeKuttaStepInterpolator(RungeKuttaStepInterpolator interpolator)
The copied interpolator should have been finalized before the
copy, otherwise the copy will not be able to perform correctly any
interpolation and will throw a NullPointerException
later. Since we don't want this constructor to throw the
exceptions finalization may involve and since we don't want this
method to modify the state of the copied interpolator,
finalization is not done automatically, it
remains under user control.
The copy is a deep copy: its arrays are separated from the original arrays of the instance.
interpolator - interpolator to copy from.| Method Detail |
|---|
public void reinitialize(FirstOrderDifferentialEquations equations,
double[] y,
double[][] yDotK,
boolean forward)
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.
equations - set of differential equations being integratedy - reference to the integrator array holding the state at
the end of the stepyDotK - reference to the integrator array holding all the
intermediate slopesforward - integration direction indicator
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class AbstractStepInterpolatorout - stream where to save the state
java.io.IOException - in case of write error
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException
readExternal in interface java.io.ExternalizablereadExternal in class AbstractStepInterpolatorin - stream where to read the state from
java.io.IOException - in case of read error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||