org.opensourcephysics.numerics
Interface GeneralStateEvent

All Superinterfaces:
MultiVarFunction, StateEvent

public interface GeneralStateEvent
extends StateEvent

GeneralStateEvent is an extension of the older StateEvents which allows for other types of zero-crossing of the evaluate function, f. An event consists now in that a given numeric value crosses zero (from any direction in croossing events, from positive to negative in the other cases). In crossing and positive events, zeros must be appropriately separated for the solver to find them. Hence, crossing and positive events are NOT appropriated for simultaneous events (an event action triggers another event which was at zero). For this cases use a state event. *

Author:
Francisco Esquembre. November 2007

Field Summary
static int BISECTION
          Root finding method using bisection
static int CROSSING_EVENT
           
static int POSITIVE_EVENT
           
static int SECANT
          Root finding method using a line
static int STATE_EVENT
           
 
Method Summary
 int getMaxIterations()
          Returns the maximum number of iterations allowed when locating the event.
 int getRootFindingMethod()
          Returns the method used to locate the exact point of the event.
 int getTypeOfEvent()
          Returns the type of event.
 
Methods inherited from interface org.opensourcephysics.numerics.StateEvent
action, evaluate, getTolerance
 

Field Detail

STATE_EVENT

static final int STATE_EVENT
See Also:
Constant Field Values

POSITIVE_EVENT

static final int POSITIVE_EVENT
See Also:
Constant Field Values

CROSSING_EVENT

static final int CROSSING_EVENT
See Also:
Constant Field Values

BISECTION

static final int BISECTION
Root finding method using bisection

See Also:
Constant Field Values

SECANT

static final int SECANT
Root finding method using a line

See Also:
Constant Field Values
Method Detail

getTypeOfEvent

int getTypeOfEvent()
Returns the type of event. One of: Differently to normal StateEvents, in positive and crossing events, negative values of the function are considered legal states. This implies that zeroes must be appropriately separated (by positive or negative states) for the solver to find them. Hence, positive and crossing events are NOT appropriated for simultaneous events (an event action triggers another event which was at zero).

Returns:

getRootFindingMethod

int getRootFindingMethod()
Returns the method used to locate the exact point of the event. One of:

Returns:

getMaxIterations

int getMaxIterations()
Returns the maximum number of iterations allowed when locating the event.

Returns: