|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ODESolverInterpolator
ODESolverInterpolator is an interface for objects which use an ODESolver to keep a set of internal states that are used to interpolate values of the ODE solution to create a so-called dense output. Typically, this scheme is used with adaptive solvers that can step much further than the prescribed step size set by the user without loosing precision. But also for fixed-step methods whose state can be read more frequently than it is computed. An ODESolverInterpolator can keep a memory of the states in past values of time. This memory can be used to retrieve those past values when needed. For instance, when solvinf Delay Differential Equations, or when plotting values already computed.
ODEInterpolatorEventSolver
Method Summary | |
---|---|
double[] |
bestInterpolate(double time,
double[] state)
Similar to interpolate(), but using the best estimate the algorith can provide and only between the current time and getMaximumTime(). |
long |
getCounter()
Returns the number of function evaluations required by the method to reach the tolerance |
double[] |
getCurrentRate()
Returns the rate of the current state |
double |
getInternalStepSize()
Returns the actual internal step size |
double |
getMaximumTime()
Returns the maximum time forward in time (or minimum, if the step is negative) for which the solver can interpolate without doing any internal step. |
ODE |
getODE()
Returns the ODE with which it was created. |
StateMemory |
getStateMemory()
Provides access to the internal StateMemory responsible for interpolations. |
double |
getStepSize()
Returns the current step size |
void |
initialize(double stepSize)
Initializes the interpolator and clears the memory. |
double |
internalStep()
Steps the internal step as much as possible (respecting the step size and the tolerance, if any). |
double[] |
interpolate(double time,
boolean useLeftApproximation,
double[] state)
Returns the value of the ODE's state[] at the given time in the provided state[] array. |
void |
reinitialize(double[] state)
Does the minimum (soft) initialization of the solver to a given state. |
void |
setEstimateFirstStep(boolean _estimate)
Makes adaptive steps estimate the best initial step after reinitialize(). |
void |
setMaximumStepSize(double stepSize)
Sets a maximum step size for variable step solvers. |
void |
setMemoryLength(double length)
Sets the length of the memory requested to the solver. |
void |
setStepSize(double stepSize)
Changes the internal step size. |
void |
setTolerances(double absTol,
double relTol)
The preferred absolute and relative tolerance desired for the solution if the underlying solver supports it. |
Method Detail |
---|
ODE getODE()
void initialize(double stepSize)
void reinitialize(double[] state)
state
- double[]double[] getCurrentRate()
void setStepSize(double stepSize)
stepSize
- void setMaximumStepSize(double stepSize)
stepSize
- double getStepSize()
double getInternalStepSize()
void setEstimateFirstStep(boolean _estimate)
_estimate
- void setTolerances(double absTol, double relTol)
tol
- double getMaximumTime()
double internalStep()
long getCounter()
void setMemoryLength(double length)
length
- StateMemory getStateMemory()
double[] interpolate(double time, boolean useLeftApproximation, double[] state)
time
- the time for the interpolation desireduseLeftApproximation
- In case of doubt, approximate the value from the left (this is important if the state has a discontinuity at that instant of time, such as for DDEs)state
- placeholder for the returned state
double[] bestInterpolate(double time, double[] state)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |