|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.jstats.ode.integrators.NumericalIntegrator
public abstract class NumericalIntegrator
Provides basic methods for all numerical integration methods. They mostly include matrix computation.
(c) copyright 2002-2005 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Field Summary | |
---|---|
static short |
ADAMS
Adam's integration |
static short |
DEFAULT_INTEGRATOR
The default integrator |
protected DifferentialEquationInterface |
equation
the equation to integrate |
protected double[] |
error
the calculated error of the last step |
static short |
EULER
Euler's integration |
static short |
GILL
Gill's integration |
static short |
HEUN
Heun's integration |
static short |
MILNE
Milne's integration |
static short |
RUNGEKUTTA3
RungeKutta's (3rd level) integration |
static short |
RUNGEKUTTA4
RungeKutta's (4th level) integration |
static short |
RUNGEKUTTACASHCARP
Runge-Kutta-Cash-Carp integration |
static short |
RUNGEKUTTAFEHLBERG
Runge-Kutta-Fehlberg integration |
protected double |
timeStep
the timeStep to use |
Constructor Summary | |
---|---|
NumericalIntegrator(double timeStep,
DifferentialEquationInterface equation)
constructs a new NumericalIntegrator |
Method Summary | |
---|---|
protected double[] |
add(double[] a,
double[] b)
adds two vectors |
protected double[] |
add(double[] a,
double[] b,
double[] c)
adds a number of vectors |
protected double[] |
add(double[] a,
double[] b,
double[] c,
double[] d)
adds a number of vectors |
protected double[] |
add(double[] a,
double[] b,
double[] c,
double[] d,
double[] e)
adds a number of vectors |
protected double[] |
add(double[] a,
double[] b,
double[] c,
double[] d,
double[] e,
double[] f)
adds a number of vectors |
double[] |
getError()
|
double |
getTimeStep()
|
protected double[] |
multiply(double constant,
double[] vector)
multiplies a vector with a constant |
abstract double[] |
next(double x,
double[] y)
computes the next value |
static NumericalIntegrator |
resolve(short integrationMethod,
double timeStep,
DifferentialEquationInterface equation)
|
void |
setTimeStep(double timeStep)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short EULER
public static final short HEUN
public static final short RUNGEKUTTA3
public static final short RUNGEKUTTA4
public static final short ADAMS
public static final short GILL
public static final short MILNE
public static final short RUNGEKUTTAFEHLBERG
public static final short RUNGEKUTTACASHCARP
public static final short DEFAULT_INTEGRATOR
protected double timeStep
protected double[] error
protected DifferentialEquationInterface equation
Constructor Detail |
---|
public NumericalIntegrator(double timeStep, DifferentialEquationInterface equation)
timeStep
- the timeStepequation
- the differentialEquationMethod Detail |
---|
public static NumericalIntegrator resolve(short integrationMethod, double timeStep, DifferentialEquationInterface equation)
integrationMethod
- the type of integrator to createtimeStep
- the starting timestep to useequation
- the differential equation
public abstract double[] next(double x, double[] y)
x
- the x value corresponding to the last y-value computedy
- the last y value
protected double[] multiply(double constant, double[] vector)
constant
- the constantvector
- the vector
protected double[] add(double[] a, double[] b)
a
- vector ab
- vector b
protected double[] add(double[] a, double[] b, double[] c)
a
- vector ab
- vector bc
- vector c
protected double[] add(double[] a, double[] b, double[] c, double[] d)
a
- vector ab
- vector bc
- vector cd
- vector d
protected double[] add(double[] a, double[] b, double[] c, double[] d, double[] e)
a
- vector ab
- vector bc
- vector cd
- vector de
- vector e
protected double[] add(double[] a, double[] b, double[] c, double[] d, double[] e, double[] f)
a
- vector ab
- vector bc
- vector cd
- vector de
- vector ef
- vector f
public double getTimeStep()
public void setTimeStep(double timeStep)
timeStep
- The timeStep to set.public double[] getError()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |