![]() |
NEURON
|
NEURON Differential Algebraic Equations. More...
#include <nrndae.h>
Public Member Functions | |
| int | extra_eqn_count () |
| Find the number of state variables introduced by this object. More... | |
| void | alloc (int start_index) |
| Allocate space for these dynamics in the overall system. More... | |
| void | lhs () |
| Compute the left side portion of \[$(C - J) \frac{dy}{dt} = f(y)$\] . More... | |
| void | rhs () |
| Compute the right side portion of \[$(C - J) \frac{dy}{dt} = f(y)$\] . More... | |
| void | dkres (double *y, double *yprime, double *delta) |
| Compute the residual: \[$f(y) - C \frac{dy}{dt}$\] . More... | |
| void | init () |
| Initialize the dynamics. More... | |
| void | update () |
| Update states to reflect the changes over a time-step. More... | |
| void | dkmap (double **pv, double **pvdot) |
| Setup the map between voltages and states in y_. More... | |
| virtual | ~NrnDAE () |
| Destructor. More... | |
Protected Member Functions | |
| NrnDAE (Matrix *cmat, Vect *const yvec, Vect *const y0, int nnode, Node **const nodes, Vect *const elayer, void(*f_init)(void *data)=NULL, void *const data=NULL) | |
| Constructor. More... | |
Private Member Functions | |
| virtual void | f_ (Vect &y, Vect &yprime, int size)=0 |
| The right-hand-side function. More... | |
| virtual MatrixMap * | jacobian_ (Vect &y)=0 |
| Compute the Jacobian. More... | |
| virtual double | jacobian_multiplier_ () |
| virtual void | alloc_ (int size, int start, int nnode, Node **nodes, int *elayer) |
| Additional allocation for subclasses. More... | |
| void | v2y () |
| Transfer any voltage states to y_. More... | |
Private Attributes | |
| void(* | f_init_ )(void *data) |
| Function used for initializing the state variables. More... | |
| void * | data_ |
| Data to pass to f_init_. More... | |
| MatrixMap * | c_ |
| the matrix \[$C$ in $C y' = f(y)$\] More... | |
| Matrix * | assumed_identity_ |
| identity matrix if constructed with \[$C$\] NULL; else NULL. More... | |
| Vect * | y0_ |
| vector of initial conditions More... | |
| Vect & | y_ |
| vector to store the state variables in More... | |
| int | size_ |
| total number of states declared or modified in this object More... | |
| int * | bmap_ |
| mapping between the states in y and the states in the whole system More... | |
| int | nnode_ |
| Number of voltage nodes used by the dynamics. More... | |
| Node ** | nodes_ |
| Pointers to voltage nodes used by the dynamics. More... | |
| int | start_ |
| the position of the first added equation (if any) in the global system More... | |
| Vect | cyp_ |
| temporary vector used for residual calculation. More... | |
| Vect | yptmp_ |
| temporary vector used for residual calculation. More... | |
| int * | elayer_ |
| Which voltage layers to read from. More... | |
NEURON Differential Algebraic Equations.
|
virtual |
Destructor.
Definition at line 175 of file nrndae.cpp.
|
protected |
Constructor.
| cmat | the matrix \[$C$\] in\[$Cy'=f(y)$\] . |
| yvec | vector to store the state variables in |
| y0 | initial conditions |
| nnode | number of voltage equations to modify |
| nodes | pointers to voltage nodes |
| elayer | which potential layer to use for each voltage node |
| f_init | function to call during an finitialize |
| data | data to pass to f_init |
\[$C$\]
is the identity matrix.Definition at line 135 of file nrndae.cpp.
Allocate space for these dynamics in the overall system.
| start_index | starting index for new states |
Definition at line 103 of file nrndae.cpp.
|
inlineprivatevirtual |
Additional allocation for subclasses.
Reimplemented in LinearModelAddition.
Definition at line 100 of file nrndae.cpp.
| void NrnDAE::dkmap | ( | double ** | pv, |
| double ** | pvdot | ||
| ) |
Setup the map between voltages and states in y_.
| pv | pointers to voltage nodes (set by this function) |
| pvdot | pointers to voltage derivatives (set by this function) |
Definition at line 196 of file nrndae.cpp.
| void NrnDAE::dkres | ( | double * | y, |
| double * | yprime, | ||
| double * | delta | ||
| ) |
Compute the residual:
\[$f(y) - C \frac{dy}{dt}$\]
.
| y | array of state variables |
| yprime | array of derivatives of state variables |
| delta | array to store the difference $f(y)-Cy'$ |
Definition at line 259 of file nrndae.cpp.
| int NrnDAE::extra_eqn_count | ( | ) |
Find the number of state variables introduced by this object.
Definition at line 190 of file nrndae.cpp.
The right-hand-side function.
| y | the state variables |
| yprime | a vector to store the derivatives |
| size | the number of state variables |
Implemented in LinearModelAddition.
| void NrnDAE::init | ( | ) |
Initialize the dynamics.
Definition at line 217 of file nrndae.cpp.
Compute the Jacobian.
| y | the state variables |
Implemented in LinearModelAddition.
|
inlineprivatevirtual |
Reimplemented in LinearModelAddition.
| void NrnDAE::lhs | ( | ) |
Compute the left side portion of
\[$(C - J) \frac{dy}{dt} = f(y)$\]
.
Definition at line 296 of file nrndae.cpp.
| void NrnDAE::rhs | ( | ) |
Compute the right side portion of
\[$(C - J) \frac{dy}{dt} = f(y)$\]
.
Definition at line 287 of file nrndae.cpp.
| void NrnDAE::update | ( | ) |
Update states to reflect the changes over a time-step.
Definition at line 206 of file nrndae.cpp.
|
private |
Transfer any voltage states to y_.
Definition at line 239 of file nrndae.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |