NEURON Differential Algebraic Equations.
More...
#include <nrndae.h>
|
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. More...
|
|
void | rhs () |
| Compute the right side portion of. More...
|
|
void | dkres (double *y, double *yprime, double *delta) |
| Compute the residual: More...
|
|
void | init () |
| Initialize the dynamics. More...
|
|
void | update () |
| Update states to reflect the changes over a time-step. More...
|
|
void | dkmap (std::vector< double * > &pv, std::vector< double * > &pvdot) |
| Setup the map between voltages and states in y_. More...
|
|
virtual | ~NrnDAE () |
| Destructor. More...
|
|
NEURON Differential Algebraic Equations.
Definition at line 27 of file nrndae.h.
◆ ~NrnDAE()
◆ NrnDAE()
NrnDAE::NrnDAE |
( |
Matrix * |
cmat, |
|
|
Vect *const |
yvec, |
|
|
Vect *const |
y0, |
|
|
int |
nnode, |
|
|
Node **const |
nodes, |
|
|
Vect *const |
elayer, |
|
|
void(*)(void *data) |
f_init = NULL , |
|
|
void *const |
data = NULL |
|
) |
| |
|
protected |
Constructor.
- Parameters
-
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 |
Definition at line 141 of file nrndae.cpp.
◆ alloc()
void NrnDAE::alloc |
( |
int |
start_index | ) |
|
Allocate space for these dynamics in the overall system.
- Parameters
-
start_index | starting index for new states |
Definition at line 108 of file nrndae.cpp.
◆ alloc_()
void NrnDAE::alloc_ |
( |
int |
size, |
|
|
int |
start, |
|
|
int |
nnode, |
|
|
Node ** |
nodes, |
|
|
int * |
elayer |
|
) |
| |
|
inlineprivatevirtual |
◆ dkmap()
void NrnDAE::dkmap |
( |
std::vector< double * > & |
pv, |
|
|
std::vector< double * > & |
pvdot |
|
) |
| |
Setup the map between voltages and states in y_.
- Parameters
-
pv | pointers to voltage nodes (set by this function) |
pvdot | pointers to voltage derivatives (set by this function) |
Definition at line 214 of file nrndae.cpp.
◆ dkres()
void NrnDAE::dkres |
( |
double * |
y, |
|
|
double * |
yprime, |
|
|
double * |
delta |
|
) |
| |
Compute the residual:
\[$f(y) - C \frac{dy}{dt}$\]
- Parameters
-
y | array of state variables |
yprime | array of derivatives of state variables |
delta | array to store the difference $f(y)-Cy'$ |
Definition at line 277 of file nrndae.cpp.
◆ extra_eqn_count()
int NrnDAE::extra_eqn_count |
( |
| ) |
|
Find the number of state variables introduced by this object.
- Returns
- The number of states added (not modified) by this instance.
Definition at line 207 of file nrndae.cpp.
◆ f_()
virtual void NrnDAE::f_ |
( |
Vect & |
y, |
|
|
Vect & |
yprime, |
|
|
int |
size |
|
) |
| |
|
privatepure virtual |
The right-hand-side function.
- Parameters
-
y | the state variables |
yprime | a vector to store the derivatives |
size | the number of state variables |
Implemented in LinearModelAddition.
◆ init()
Initialize the dynamics.
Definition at line 236 of file nrndae.cpp.
◆ jacobian_()
◆ jacobian_multiplier_()
virtual double NrnDAE::jacobian_multiplier_ |
( |
| ) |
|
|
inlineprivatevirtual |
◆ lhs()
Compute the left side portion of.
\[$(C - J) \frac{dy}{dt} = f(y)$\]
.
Definition at line 314 of file nrndae.cpp.
◆ rhs()
Compute the right side portion of.
\[$(C - J) \frac{dy}{dt} = f(y)$\]
.
Definition at line 305 of file nrndae.cpp.
◆ update()
Update states to reflect the changes over a time-step.
Definition at line 224 of file nrndae.cpp.
◆ v2y()
Transfer any voltage states to y_.
Definition at line 258 of file nrndae.cpp.
◆ assumed_identity_
Matrix* NrnDAE::assumed_identity_ |
|
private |
identity matrix if constructed with
\[$C$\]
NULL; else NULL.
Definition at line 165 of file nrndae.h.
◆ bmap_
mapping between the states in y and the states in the whole system
Definition at line 177 of file nrndae.h.
◆ c_
the matrix
\[$C$ in $C y' = f(y)$\]
Definition at line 162 of file nrndae.h.
◆ cyp_
temporary vector used for residual calculation.
Definition at line 189 of file nrndae.h.
◆ data_
◆ elayer_
Which voltage layers to read from.
Definition at line 201 of file nrndae.h.
◆ f_init_
void(* NrnDAE::f_init_) (void *data) |
|
private |
Function used for initializing the state variables.
Definition at line 144 of file nrndae.h.
◆ nnode_
Number of voltage nodes used by the dynamics.
Definition at line 180 of file nrndae.h.
◆ nodes_
Pointers to voltage nodes used by the dynamics.
Definition at line 183 of file nrndae.h.
◆ size_
total number of states declared or modified in this object
Definition at line 174 of file nrndae.h.
◆ start_
the position of the first added equation (if any) in the global system
Definition at line 186 of file nrndae.h.
◆ y0_
vector of initial conditions
Definition at line 168 of file nrndae.h.
◆ y_
vector to store the state variables in
Definition at line 171 of file nrndae.h.
◆ yptmp_
temporary vector used for residual calculation.
Definition at line 192 of file nrndae.h.
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/nrn/checkouts/3466/src/nrniv/nrndae.h
- /home/docs/checkouts/readthedocs.org/user_builds/nrn/checkouts/3466/src/nrniv/nrndae.cpp