public abstract class CachingNumericalIntegrator extends NumericalIntegrator
Modifier and Type | Field and Description |
---|---|
protected NumericalIntegrator |
startingIntegrator
the primer integrator
|
protected int |
startingSubSteps
the substeps to use when starting the integrator
|
ADAMS, DEFAULT_INTEGRATOR, equation, error, EULER, GILL, HEUN, MILNE, RUNGEKUTTA3, RUNGEKUTTA4, RUNGEKUTTACASHCARP, RUNGEKUTTAFEHLBERG, timeStep
Constructor and Description |
---|
CachingNumericalIntegrator(double timeStep,
DifferentialEquationInterface equation,
int cachePlaces,
short integrationMethod,
int startingSubSteps)
constructs a new CachingNumericalIntegrator with a fixed number of cache
places.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getDY(int numberDown)
get a cached dY-value,
|
double[] |
getY(int numberDown)
get a cached Y-value,
|
abstract double[] |
next(double x)
The integrators that extend the CachingNumericalIntegrator calculate the
value of y(x+timeStep) just based on the x-value.
|
double[] |
next(double x,
double[] y)
computes the next value
|
void |
setTimeStep(double timeStep) |
add, add, add, add, add, getError, getTimeStep, multiply, resolve
protected NumericalIntegrator startingIntegrator
protected int startingSubSteps
public CachingNumericalIntegrator(double timeStep, DifferentialEquationInterface equation, int cachePlaces, short integrationMethod, int startingSubSteps)
timeStep
- the timeStepequation
- the differentialEquationcachePlaces
- the number of cache places to storeintegrationMethod
- the primer integrator to usestartingSubSteps
- the number of substeps per timestep during
starting of the integratorpublic void setTimeStep(double timeStep)
setTimeStep
in class NumericalIntegrator
timeStep
- The timeStep to set.NumericalIntegrator.setTimeStep(double)
public double[] next(double x, double[] y)
NumericalIntegrator
next
in class NumericalIntegrator
x
- the x value corresponding to the last y-value computedy
- the last y valueNumericalIntegrator.next(double,
double[])
public double[] getY(int numberDown)
numberDown
- the number of the previous value we wantpublic double[] getDY(int numberDown)
numberDown
- the number of the previous value we wantpublic abstract double[] next(double x)
x
- the x-value to use in the calculationCopyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.