public abstract class NumericalIntegrator extends Object implements Serializable
(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.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
NumericalIntegrator(double timeStep,
DifferentialEquationInterface equation)
constructs a new NumericalIntegrator
|
Modifier and Type | Method and Description |
---|---|
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) |
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
public NumericalIntegrator(double timeStep, DifferentialEquationInterface equation)
timeStep
- the timeStepequation
- the differentialEquationpublic static NumericalIntegrator resolve(short integrationMethod, double timeStep, DifferentialEquationInterface equation)
integrationMethod
- the type of integrator to createtimeStep
- the starting timestep to useequation
- the differential equationpublic abstract double[] next(double x, double[] y)
x
- the x value corresponding to the last y-value computedy
- the last y valueprotected double[] multiply(double constant, double[] vector)
constant
- the constantvector
- the vectorprotected double[] add(double[] a, double[] b)
a
- vector ab
- vector bprotected double[] add(double[] a, double[] b, double[] c)
a
- vector ab
- vector bc
- vector cprotected double[] add(double[] a, double[] b, double[] c, double[] d)
a
- vector ab
- vector bc
- vector cd
- vector dprotected double[] add(double[] a, double[] b, double[] c, double[] d, double[] e)
a
- vector ab
- vector bc
- vector cd
- vector de
- vector eprotected 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 fpublic double getTimeStep()
public void setTimeStep(double timeStep)
timeStep
- The timeStep to set.public double[] getError()
Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.