NEURON
LinearModelAddition Class Reference

#include <linmod.h>

Inheritance diagram for LinearModelAddition:
NrnDAE

Public Member Functions

 LinearModelAddition (Matrix *c, Matrix *g, Vect *y, Vect *y0, Vect *b, int nnode=0, Node **nodes=NULL, Vect *elayer=NULL, Object *f_callable=NULL)
 
virtual ~LinearModelAddition ()
 
- Public Member Functions inherited from NrnDAE
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...
 

Private Member Functions

void f_ (Vect &y, Vect &yprime, int size)
 The right-hand-side function. More...
 
MatrixMapjacobian_ (Vect &y)
 Compute the Jacobian. More...
 
double jacobian_multiplier_ ()
 
void alloc_ (int size, int start, int nnode, Node **nodes, int *elayer)
 Additional allocation for subclasses. More...
 

Private Attributes

MatrixMapg_
 
Vectb_
 
Objectf_callable_
 

Additional Inherited Members

- Protected Member Functions inherited from NrnDAE
 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...
 

Detailed Description

Definition at line 10 of file linmod.h.

Constructor & Destructor Documentation

◆ LinearModelAddition()

LinearModelAddition::LinearModelAddition ( Matrix c,
Matrix g,
Vect y,
Vect y0,
Vect b,
int  nnode = 0,
Node **  nodes = NULL,
Vect elayer = NULL,
Object f_callable = NULL 
)

Definition at line 29 of file linmod.cpp.

◆ ~LinearModelAddition()

LinearModelAddition::~LinearModelAddition ( )
virtual

Definition at line 45 of file linmod.cpp.

Member Function Documentation

◆ alloc_()

void LinearModelAddition::alloc_ ( int  size,
int  start,
int  nnode,
Node **  nodes,
int *  elayer 
)
privatevirtual

Additional allocation for subclasses.

Remarks
Called during alloc(). Unless overriden, this function is empty.

Reimplemented from NrnDAE.

Definition at line 50 of file linmod.cpp.

◆ f_()

void LinearModelAddition::f_ ( Vect y,
Vect yprime,
int  size 
)
privatevirtual

The right-hand-side function.

Parameters
ythe state variables
yprimea vector to store the derivatives
sizethe number of state variables

Implements NrnDAE.

Definition at line 58 of file linmod.cpp.

◆ jacobian_()

MatrixMap * LinearModelAddition::jacobian_ ( Vect y)
privatevirtual

Compute the Jacobian.

Parameters
ythe state variables
Returns
Pointer to a MatrixMap containing the jacobian.
Remarks
The calling function will not delete this pointer.
It is occasionally easier to return the Jacobian divided by a constant factor. If so, have jacobian_multiplier_ return a number that should be multiplied by the matrix returned by this function to get the true Jacobian.

Implements NrnDAE.

Definition at line 82 of file linmod.cpp.

◆ jacobian_multiplier_()

double LinearModelAddition::jacobian_multiplier_ ( )
privatevirtual

Reimplemented from NrnDAE.

Definition at line 78 of file linmod.cpp.

Member Data Documentation

◆ b_

Vect& LinearModelAddition::b_
private

Definition at line 30 of file linmod.h.

◆ f_callable_

Object* LinearModelAddition::f_callable_
private

Definition at line 31 of file linmod.h.

◆ g_

MatrixMap* LinearModelAddition::g_
private

Definition at line 29 of file linmod.h.


The documentation for this class was generated from the following files: