adevs
Public Member Functions
adevs::linear_event_locator Class Reference

#include <adevs_linear_event_locator.h>

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

List of all members.

Public Member Functions

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

Detailed Description

This is a state event locator that uses linear interpolation on successively smaller intervals to pinpoint events in time.


Constructor & Destructor Documentation

adevs::linear_event_locator::linear_event_locator ( ode_system< X > *  sys,
double  err_tol 
)

The locator will attempt to pinpoint events within err_tol of zero for each state event function: i.e., an event occurs at time t if |z(t)| < err_tol, where z is a state event function.

References adevs::ode_system::numEvents().


Member Function Documentation

bool adevs::linear_event_locator::find_events ( bool *  events,
const double *  qstart,
double *  qend,
ode_solver< X > *  solver,
double &  h 
) [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.

Implements adevs::event_locator< X >.

References adevs::ode_solver::advance().


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