41 void alloc(
int start_index);
60 void dkres(
double* y,
double* yprime,
double* delta);
85 void dkmap(
double**
pv,
double** pvdot);
111 Node**
const nodes,
Vect*
const elayer,
112 void (*f_init)(
void*
data) =
NULL,
void*
const data =
NULL);
122 virtual void f_(
Vect& y,
Vect& yprime,
int size) = 0;
void init()
Initialize the dynamics.
void dkres(double *y, double *yprime, double *delta)
Compute the residual: .
void alloc(int start_index)
Allocate space for these dynamics in the overall system.
Vect yptmp_
temporary vector used for residual calculation.
Vect & y_
vector to store the state variables in
void v2y()
Transfer any voltage states to y_.
NrnDAEPtrList::const_iterator NrnDAEPtrListIterator
void rhs()
Compute the right side portion of .
Node ** nodes_
Pointers to voltage nodes used by the dynamics.
virtual ~NrnDAE()
Destructor.
void dkmap(double **pv, double **pvdot)
Setup the map between voltages and states in y_.
int extra_eqn_count()
Find the number of state variables introduced by this object.
int const size_t const size_t n
virtual void alloc_(int size, int start, int nnode, Node **nodes, int *elayer)
Additional allocation for subclasses.
void nrndae_register(NrnDAE *n)
Add a NrnDAE object to the system.
void * data_
Data to pass to f_init_.
std::list< NrnDAE * > NrnDAEPtrList
virtual void f_(Vect &y, Vect &yprime, int size)=0
The right-hand-side function.
virtual double jacobian_multiplier_()
int nnode_
Number of voltage nodes used by the dynamics.
int * bmap_
mapping between the states in y and the states in the whole system
void nrndae_deregister(NrnDAE *n)
Remove a NrnDAE object from the system.
void update()
Update states to reflect the changes over a time-step.
Vect * y0_
vector of initial conditions
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.
NEURON Differential Algebraic Equations.
int start_
the position of the first added equation (if any) in the global system
Vect cyp_
temporary vector used for residual calculation.
int * elayer_
Which voltage layers to read from.
virtual MatrixMap * jacobian_(Vect &y)=0
Compute the Jacobian.
Matrix * assumed_identity_
identity matrix if constructed with NULL; else NULL.
void(* f_init_)(void *data)
Function used for initializing the state variables.
void lhs()
Compute the left side portion of .
int size_
total number of states declared or modified in this object