|
| dae_se1_system (int N_vars, int M_event_funcs, int A_alg_vars, double err_tol=1E-10, int max_iters=30, double alpha=-1.0) |
|
int | numAlgVars () const |
| Get the number of algebraic variables.
|
|
double | getAlgVar (int i) const |
| Get the algebraic variables.
|
|
virtual void | init (double *q, double *a)=0 |
|
virtual void | alg_func (const double *q, const double *a, double *af)=0 |
|
virtual void | der_func (const double *q, const double *a, double *dq)=0 |
|
virtual void | state_event_func (const double *q, const double *a, double *z)=0 |
|
virtual double | time_event_func (const double *q, const double *a)=0 |
| Compute the time event function using state q and algebraic variables a.
|
|
virtual void | postStep (double *q, double *a)=0 |
|
virtual void | internal_event (double *q, double *a, const bool *state_event)=0 |
| The internal transition function.
|
|
virtual void | external_event (double *q, double *a, double e, const Bag< X > &xb)=0 |
| The external transition function.
|
|
virtual void | confluent_event (double *q, double *a, const bool *state_event, const Bag< X > &xb)=0 |
| The confluent transition function.
|
|
virtual void | output_func (const double *q, const double *a, const bool *state_event, Bag< X > &yb)=0 |
| The output function.
|
|
virtual | ~dae_se1_system () |
| Destructor.
|
|
int | getIterFailCount () const |
|
double | getWorseError () const |
|
void | init (double *q) |
| Do not override.
|
|
void | der_func (const double *q, double *dq) |
| Do not override.
|
|
void | state_event_func (const double *q, double *z) |
| Override only if you have no state event functions.
|
|
double | time_event_func (const double *q) |
| Override only if you have no time events.
|
|
void | postStep (double *q) |
| Do not override.
|
|
void | internal_event (double *q, const bool *state_event) |
| Do not override.
|
|
void | external_event (double *q, double e, const Bag< X > &xb) |
| Do not override.
|
|
void | confluent_event (double *q, const bool *state_event, const Bag< X > &xb) |
| Do not override.
|
|
void | output_func (const double *q, const bool *state_event, Bag< X > &yb) |
| Do not override.
|
|
| ode_system (int N_vars, int M_event_funcs) |
| Make a system with N state variables and M state event functions.
|
|
int | numVars () const |
| Get the number of state variables.
|
|
int | numEvents () const |
| Get the number of state events.
|
|
virtual void | gc_output (Bag< X > &gb)=0 |
| Garbage collection function. This works just like the Atomic gc_output method.
|
|
virtual | ~ode_system () |
| Destructor.
|
|
template<typename X>
class adevs::dae_se1_system< X >
This extension of the ode_system provides for modeling some semi-explicit DAEs of index 1, specifically those in the form dx/dt = f(x,y), y = g(x,y). The solution to y=g(x,y) is found by iteration on y. See "The Numerical Solution of Differential-Algebraic Systems by Runge-Kutta
Methods" by Ernst Hairer, Michel Roche and Christian Lubich, published by Springer as Lecture Notes in Mathematics, Volum 1409, c. 1989. The section on Half-explicit methods (starting pg. 20 of my copy) describes the procedure.
Only the methods that include the algebraic variables should be overriden. Any explicit, single step ODE solver can be used to generate trajectories for this object (e.g., the Runge-Kutta methods included with adevs will work).