|
MVT API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--math.numerics.ODE1
The ODE1 class contains all the methods for solving first-order Ordinary Differential Equations numerically.
Constructor Summary | |
ODE1()
|
Method Summary | |
java.awt.geom.Point2D.Double[] |
adaptRK45()
Solves the ODE numerically using an adaptive 4th and 5th order Runge-Kutta schemes. |
java.awt.geom.Point2D.Double[] |
euler()
Solves the ODE numerically using forward Euler's method. |
double |
getDepIC()
gets the initial condition for the dependent variable |
Variable |
getDepVar()
gets the dependent variable for this class |
Function |
getFunction()
gets the Function for this class |
double |
getIndIC()
gets the initial condition for the independent variable |
double |
getIndMax()
gets the max. |
Variable |
getIndVar()
gets the independent variable for this class |
double |
getNumSteps()
Gets the number of steps used for the solver |
double |
getStepSize()
gets the step size for this class |
java.awt.geom.Point2D.Double[] |
huenmethod()
Solves the ODE numerically using a Runge-Kutta 2nd order method. |
java.awt.geom.Point2D.Double[] |
rungeKutta4()
Solves the ODE numerically using the standard fourth-order Runge-Kutta method. |
void |
setDepIC(double ic)
sets the initial condition for the dependent variable |
void |
setDepVar(Variable var)
sets the dependent variable for this class |
void |
setFunction(Function f)
sets the Function for this class |
void |
setIndIC(double ic)
sets the initial condition for the independent variable |
void |
setIndMax(double max)
sets the max. |
void |
setIndVar(Variable var)
sets the independent variable for this class |
void |
setNumSteps(int num)
Sets the number of steps used for the solver |
void |
setStepSize(double s)
sets the step size for this class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ODE1()
Method Detail |
public java.awt.geom.Point2D.Double[] euler() throws VariableUndefinedException, UnacceptableVariableException, InfinityException
VariableUndefinedException
- thrown if the independent
variable or dependent variable is not one of the variables of
the function.
UnacceptableVariableException
- thrown if one of the
variables is not of the proper form
InfinityException
- thrown if the dependent variable
reaches infinity or negative infinity within the domain of the
independent variable.public java.awt.geom.Point2D.Double[] huenmethod() throws VariableUndefinedException, UnacceptableVariableException, InfinityException
VariableUndefinedException
- thrown if the independent
variable or dependent variable is not one of the variables of
the function.
UnacceptableVariableException
- thrown if one of the
variables is not of the proper form
InfinityException
- thrown if the dependent variable
reaches infinity or negative infinity within the domain of the
independent variable.public java.awt.geom.Point2D.Double[] rungeKutta4() throws VariableUndefinedException, UnacceptableVariableException, InfinityException
VariableUndefinedException
- thrown if the independent
variable or dependent variable is not one of the variables of
the function.
UnacceptableVariableException
- thrown if one of the
variables is not of the proper form
InfinityException
- thrown if the dependent variable
reaches infinity or negative infinity within the domain of the
independent variable.public java.awt.geom.Point2D.Double[] adaptRK45() throws VariableUndefinedException, UnacceptableVariableException, InfinityException, MinimumStepSizeException
VariableUndefinedException
- thrown if the independent
variable or dependent variable is not one of the variables of
the function.
UnacceptableVariableException
- thrown if one of the
variables is not of the proper form
InfinityException
- thrown if the dependent variable
reaches infinity or negative infinity within the domain of the
independent variable.
MinimumStepSizeException
public void setFunction(Function f)
f
- -- a Function objectpublic Function getFunction()
public void setStepSize(double s)
s
- -- a double representing the step sizepublic double getStepSize()
public Variable getIndVar()
public void setIndVar(Variable var)
var
- -- A variable representing the Independent variablepublic Variable getDepVar()
public void setDepVar(Variable var)
var
- -- A variable representing the dependent variablepublic double getIndIC()
public void setIndIC(double ic)
public void setDepIC(double ic)
ic
- -- the initial conditionpublic double getDepIC()
public double getIndMax()
public void setIndMax(double max)
max
- -- the maximum value of the domainpublic void setNumSteps(int num)
public double getNumSteps()
|
MVT API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |