|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.numerics.dde_solvers.AbstractDiscreteTimeSolverInterpolator
public abstract class AbstractDiscreteTimeSolverInterpolator
Title: AbstractDiscreteTimeSolverInterpolator Description: Abstract class for a solver based on time discretization with state memory for interpolation
Nested Class Summary | |
---|---|
static class |
AbstractDiscreteTimeSolverInterpolator.WrapperDDE
|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final ODE getODE()
ODESolverInterpolator
getODE
in interface ODESolverInterpolator
public final void initialize(double stepSize)
ODESolverInterpolator
initialize
in interface ODESolverInterpolator
public void reinitialize(double[] state)
ODESolverInterpolator
reinitialize
in interface ODESolverInterpolator
state
- double[]public double[] getCurrentRate()
ODESolverInterpolator
getCurrentRate
in interface ODESolverInterpolator
public final void setStepSize(double stepSize)
ODESolverInterpolator
setStepSize
in interface ODESolverInterpolator
public void setMaximumStepSize(double stepSize)
ODESolverInterpolator
setMaximumStepSize
in interface ODESolverInterpolator
public final double getStepSize()
ODESolverInterpolator
getStepSize
in interface ODESolverInterpolator
public final double getInternalStepSize()
ODESolverInterpolator
getInternalStepSize
in interface ODESolverInterpolator
public void setEstimateFirstStep(boolean _estimate)
ODESolverInterpolator
setEstimateFirstStep
in interface ODESolverInterpolator
public void setTolerances(double absTol, double relTol)
ODESolverInterpolator
setTolerances
in interface ODESolverInterpolator
public final double getMaximumTime()
ODESolverInterpolator
getMaximumTime
in interface ODESolverInterpolator
public final double internalStep()
ODESolverInterpolator
internalStep
in interface ODESolverInterpolator
public final long getCounter()
ODESolverInterpolator
getCounter
in interface ODESolverInterpolator
public final void setMemoryLength(double length)
ODESolverInterpolator
setMemoryLength
in interface ODESolverInterpolator
public StateMemory getStateMemory()
ODESolverInterpolator
getStateMemory
in interface ODESolverInterpolator
public double[] interpolate(double time, boolean useLeftApproximation, double[] state)
ODESolverInterpolator
interpolate
in interface ODESolverInterpolator
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
public double[] bestInterpolate(double time, double[] state)
ODESolverInterpolator
bestInterpolate
in interface ODESolverInterpolator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |