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