|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.numerics.ODEBisectionEventSolver
public class ODEBisectionEventSolver
ODEBisectionEventSolver is an ODEEventSolver that uses the bisection method for root finding.
| Field Summary | |
|---|---|
protected int |
errorCode
|
protected boolean |
eventHappened
|
protected java.util.Vector<StateEvent> |
eventList
|
protected java.util.Vector<StateEvent> |
happened
|
static int |
MAX
Maximum number of bisections allowed |
protected int |
size
|
protected ODESolver |
solver
|
protected double[] |
statea
|
protected org.opensourcephysics.numerics.TriggerODE |
triggerOde
|
| Fields inherited from interface org.opensourcephysics.numerics.ODEAdaptiveSolver |
|---|
BISECTION_EVENT_NOT_FOUND, DID_NOT_CONVERGE, NO_ERROR |
| Constructor Summary | |
|---|---|
ODEBisectionEventSolver(ODE ode,
java.lang.Class<?> solverClass)
Creates a new solver that uses the bisection method for finding the events. |
|
| Method Summary | |
|---|---|
void |
addEvent(StateEvent event)
Adds a StateEvent to the list of events |
int |
getErrorCode()
Gets the error code. |
boolean |
getEventHappened()
Gets the eventHappend flag. |
double |
getStepSize()
Gets the step size. |
double |
getTolerance()
Gets the tolerance of the adaptive ODE sovler. |
void |
initialize(double stepSize)
Initializes the ODE solver. |
void |
removeEvent(StateEvent event)
Removes a StateEvent from the list of events |
void |
setStepSize(double stepSize)
Sets the initial step size. |
void |
setTolerance(double tol)
Sets the tolerance of the adaptive ODE sovler. |
double |
step()
Advances the ODE as usual, except if an event takes place. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX
protected int size
protected double[] statea
protected ODESolver solver
protected org.opensourcephysics.numerics.TriggerODE triggerOde
protected java.util.Vector<StateEvent> eventList
protected java.util.Vector<StateEvent> happened
protected int errorCode
protected boolean eventHappened
| Constructor Detail |
|---|
public ODEBisectionEventSolver(ODE ode,
java.lang.Class<?> solverClass)
ode - The ode to solvesolverClass - The ODESolver class to use.| Method Detail |
|---|
public void addEvent(StateEvent event)
addEvent in interface ODEEventSolverevent - The event to be addedpublic void removeEvent(StateEvent event)
removeEvent in interface ODEEventSolverevent - The event to be removedpublic void initialize(double stepSize)
ODESolver
initialize in interface ODESolverpublic void setStepSize(double stepSize)
ODESolver
setStepSize in interface ODESolverpublic double getStepSize()
ODESolver
getStepSize in interface ODESolverpublic void setTolerance(double tol)
ODEAdaptiveSolver
setTolerance in interface ODEAdaptiveSolvertol - the tolerancepublic double getTolerance()
ODEAdaptiveSolver
getTolerance in interface ODEAdaptiveSolverpublic boolean getEventHappened()
public double step()
step in interface ODESolverpublic int getErrorCode()
getErrorCode in interface ODEAdaptiveSolver
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||