|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.numerics.qss.Qss
public class Qss
An abstract class for Solvers based on QSS method
Constructor Summary | |
---|---|
Qss(ODE ode)
|
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. |
double[] |
interpolate(double time,
boolean useLeftApproximation,
double[] state,
int beginIndex,
int length)
|
double |
interpolate(double time,
boolean useLeftApproximation,
int index)
|
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)
Does nothing |
void |
setMemoryLength(double length)
Sets the length of the memory requested to the solver. |
void |
setStepSize(double _stepSize)
Changes the internal step size. |
void |
setToleranceArray(double[] absTol,
double[] relTol)
Sets a possibly different tolerance for each state |
void |
setTolerances(double absTol,
double relTol)
Sets the same relative and absolute tolerances for all states |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Qss(ODE ode)
Method Detail |
---|
public final ODE getODE()
ODESolverInterpolator
getODE
in interface ODESolverInterpolator
public final double[] getCurrentRate()
ODESolverInterpolator
getCurrentRate
in interface ODESolverInterpolator
public final void setEstimateFirstStep(boolean _estimate)
ODESolverInterpolator
setEstimateFirstStep
in interface ODESolverInterpolator
public final double getStepSize()
ODESolverInterpolator
getStepSize
in interface ODESolverInterpolator
public final void setStepSize(double _stepSize)
ODESolverInterpolator
setStepSize
in interface ODESolverInterpolator
public void setMaximumStepSize(double stepSize)
setMaximumStepSize
in interface ODESolverInterpolator
public void initialize(double _stepSize)
ODESolverInterpolator
initialize
in interface ODESolverInterpolator
public void reinitialize(double[] state)
ODESolverInterpolator
reinitialize
in interface ODESolverInterpolator
state
- double[]public double getMaximumTime()
ODESolverInterpolator
getMaximumTime
in interface ODESolverInterpolator
public double getInternalStepSize()
ODESolverInterpolator
getInternalStepSize
in interface ODESolverInterpolator
public double internalStep()
ODESolverInterpolator
internalStep
in interface ODESolverInterpolator
public 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[] interpolate(double time, boolean useLeftApproximation, double[] state, int beginIndex, int length)
public double interpolate(double time, boolean useLeftApproximation, int index)
public double[] bestInterpolate(double _time, double[] _state)
ODESolverInterpolator
bestInterpolate
in interface ODESolverInterpolator
public final void setTolerances(double absTol, double relTol)
setTolerances
in interface ODESolverInterpolator
tol
- doublepublic void setToleranceArray(double[] absTol, double[] relTol)
tol
- double[]public long getCounter()
ODESolverInterpolator
getCounter
in interface ODESolverInterpolator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |