adevs::event_locator_impl< X > Class Template Reference

#include <adevs_event_locators.h>

Inheritance diagram for adevs::event_locator_impl< X >:
adevs::event_locator< X > adevs::bisection_event_locator< X > adevs::linear_event_locator< X >

List of all members.

Public Types

enum  Mode { INTERPOLATE, BISECTION }

Public Member Functions

 event_locator_impl (ode_system< X > *sys, double err_tol, Mode mode)
bool find_events (bool *events, const double *qstart, double *qend, ode_solver< X > *solver, double &h)

Detailed Description

template<typename X>
class adevs::event_locator_impl< X >

This is a state event locator that uses either bisection or linear interpolation to pinpoints events in time.


Member Enumeration Documentation

template<typename X >
enum adevs::event_locator_impl::Mode

The locator will attempt to pinpoint events within err_tol of zero for each state event function; i.e., an event occurs at the first instant t' >= t where z(t)*z(t') <= 0 and |z(t')| < err_tol.


Member Function Documentation

template<typename X >
bool adevs::event_locator_impl< X >::find_events ( bool *  events,
const double *  qstart,
double *  qend,
ode_solver< X > *  solver,
double &  h 
) [inline, virtual]

Find the first state event in the interval [0,h] starting from state qstart. The method returns true if an event is found, setting the events flags to true if the corresponding z entry in the state_event_func above triggered the event. The value of h is overwritten with the event time, and the state of the model at that time is copied to qend. The event finding method should select an instant of time when the zero crossing function is zero or has changed sign to trigger an event.

Implements adevs::event_locator< X >.

References adevs::ode_solver< X >::advance().


The documentation for this class was generated from the following file:

Generated on 3 Jul 2013 for adevs by  doxygen 1.6.1