MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
moose::IzhIF Class Reference

#include <IzhIF.h>

+ Inheritance diagram for moose::IzhIF:
+ Collaboration diagram for moose::IzhIF:

Public Member Functions

double getA (const Eref &e) const
 
double getA0 (const Eref &e) const
 
double getB (const Eref &e) const
 
double getB0 (const Eref &e) const
 
double getC0 (const Eref &e) const
 
double getD (const Eref &e) const
 
double getU (const Eref &e) const
 
double getUInit (const Eref &e) const
 
double getVPeak (const Eref &e) const
 
 IzhIF ()
 
void setA (const Eref &e, double val)
 
void setA0 (const Eref &e, double val)
 
void setB (const Eref &e, double val)
 
void setB0 (const Eref &e, double val)
 
void setC0 (const Eref &e, double val)
 
void setD (const Eref &e, double val)
 
void setU (const Eref &e, double val)
 
void setUInit (const Eref &e, double val)
 
void setVPeak (const Eref &e, double val)
 
void vProcess (const Eref &e, ProcPtr p)
 
void vReinit (const Eref &e, ProcPtr p)
 
virtual ~IzhIF ()
 
- Public Member Functions inherited from moose::IntFireBase
void activation (double val)
 
double getLastEventTime (const Eref &e) const
 
double getRefractoryPeriod (const Eref &e) const
 
double getThresh (const Eref &e) const
 
double getVReset (const Eref &e) const
 
bool hasFired (const Eref &e) const
 
 IntFireBase ()
 
void setRefractoryPeriod (const Eref &e, double val)
 
void setThresh (const Eref &e, double val)
 
void setVReset (const Eref &e, double val)
 
virtual ~IntFireBase ()
 
- Public Member Functions inherited from moose::Compartment
void cable ()
 
 Compartment ()
 
virtual double vGetCm (const Eref &e) const
 
virtual double vGetEm (const Eref &e) const
 
virtual double vGetIm (const Eref &e) const
 
virtual double vGetInitVm (const Eref &e) const
 
virtual double vGetInject (const Eref &e) const
 
virtual double vGetRa (const Eref &e) const
 
virtual double vGetRm (const Eref &e) const
 
virtual double vGetVm (const Eref &e) const
 
void vHandleAxial (double Vm)
 
void vHandleChannel (const Eref &e, double Gk, double Ek)
 
void vHandleRaxial (double Ra, double Vm)
 
void vInitProc (const Eref &e, ProcPtr p)
 
void vInitReinit (const Eref &e, ProcPtr p)
 
void vInjectMsg (const Eref &e, double current)
 
void vRandInject (const Eref &e, double prob, double current)
 
virtual void vSetCm (const Eref &e, double Cm)
 
virtual void vSetEm (const Eref &e, double Em)
 
virtual void vSetInitVm (const Eref &e, double initVm)
 
virtual void vSetInject (const Eref &e, double Inject)
 
virtual void vSetRa (const Eref &e, double Ra)
 
virtual void vSetRm (const Eref &e, double Rm)
 
virtual void vSetVm (const Eref &e, double Vm)
 
virtual ~Compartment ()
 
- Public Member Functions inherited from moose::CompartmentBase
void cable ()
 
 CompartmentBase ()
 
void displace (double dx, double dy, double dz)
 Displaces compartment by specified distance vector. More...
 
double getCm (const Eref &e) const
 
double getDiameter () const
 
double getEm (const Eref &e) const
 
double getIm (const Eref &e) const
 
double getInitVm (const Eref &e) const
 
double getInject (const Eref &e) const
 
double getLength () const
 
double getRa (const Eref &e) const
 
double getRm (const Eref &e) const
 
double getVm (const Eref &e) const
 
double getX () const
 
double getX0 () const
 
double getY () const
 
double getY0 () const
 
double getZ () const
 
double getZ0 () const
 
void handleAxial (double Vm)
 
void handleChannel (const Eref &e, double Gk, double Ek)
 
void handleRaxial (double Ra, double Vm)
 
void initProc (const Eref &e, ProcPtr p)
 
void initReinit (const Eref &e, ProcPtr p)
 
void injectMsg (const Eref &e, double current)
 
void process (const Eref &e, ProcPtr p)
 
void randInject (const Eref &e, double prob, double current)
 
bool rangeWarning (const string &field, double value)
 
void reinit (const Eref &e, ProcPtr p)
 
void setCm (const Eref &e, double Cm)
 
void setDiameter (double diameter)
 
void setEm (const Eref &e, double Em)
 
void setGeomAndElec (const Eref &e, double length, double dia)
 Scales electrical values along with setting length, dia. More...
 
void setInitVm (const Eref &e, double initVm)
 
void setInject (const Eref &e, double Inject)
 
void setLength (double length)
 
void setRa (const Eref &e, double Ra)
 
void setRm (const Eref &e, double Rm)
 
void setVm (const Eref &e, double Vm)
 
void setX (double value)
 
void setX0 (double value)
 
void setY (double value)
 
void setY0 (double value)
 
void setZ (double value)
 
void setZ0 (double value)
 
void updateLength ()
 
virtual void vSetSolver (const Eref &e, Id hsolve)
 
virtual ~CompartmentBase ()
 

Static Public Member Functions

static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from moose::IntFireBase
static const CinfoinitCinfo ()
 
static SrcFinfo1< double > * spikeOut ()
 Message src for outgoing spikes. More...
 
- Static Public Member Functions inherited from moose::Compartment
static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from moose::CompartmentBase
static const CinfoinitCinfo ()
 
static SrcFinfo1< double > * VmOut ()
 
static void zombify (Element *orig, const Cinfo *zClass, Id hsolve)
 

Private Attributes

double a0_
 
double a_
 
double b0_
 
double b_
 
double c0_
 
double d_
 
double u_
 
double uInit_
 
double vPeak_
 

Additional Inherited Members

- Protected Attributes inherited from moose::IntFireBase
double activation_
 
bool fired_
 
double lastEvent_
 
double refractT_
 
double threshold_
 
double vReset_
 
- Protected Attributes inherited from moose::Compartment
double A_
 
double B_
 
double Cm_
 
double Em_
 
double Im_
 
double initVm_
 
double inject_
 
double lastIm_
 
double Ra_
 
double Rm_
 
double sumInject_
 
double Vm_
 

Detailed Description

The IntFire class sets up an integrate-and-fire compartment.

Definition at line 19 of file IzhIF.h.

Constructor & Destructor Documentation

IzhIF::IzhIF ( )

Definition at line 134 of file IzhIF.cpp.

References a0_, a_, b0_, b_, c0_, d_, u_, uInit_, and vPeak_.

135 {
136 // by default, a0 = 0.04e6/V/s, b0 = 5e3/s, c0 = 140 V/s are set to SI units,
137 // so use SI consistently,
138 // or change a0, b0, c0 via python if you wish to use other units.
139 a0_ = 0.04e6; // V^-1 s^-1
140 b0_ = 5e3; // s^-1
141 c0_ = 140; // V/s
142 a_ = 0.0;
143 b_ = 0.0;
144 d_ = 0.0;
145 uInit_ = 0.0;
146 u_ = 0.0;
147 vPeak_ = 0.0;
148 }
double b0_
Definition: IzhIF.h:62
double u_
Definition: IzhIF.h:68
double a_
Definition: IzhIF.h:64
double a0_
Definition: IzhIF.h:61
double d_
Definition: IzhIF.h:66
double vPeak_
Definition: IzhIF.h:67
double b_
Definition: IzhIF.h:65
double uInit_
Definition: IzhIF.h:69
double c0_
Definition: IzhIF.h:63
IzhIF::~IzhIF ( )
virtual

Definition at line 150 of file IzhIF.cpp.

151 {;}

Member Function Documentation

double IzhIF::getA ( const Eref e) const

Definition at line 238 of file IzhIF.cpp.

References a_.

Referenced by initCinfo().

239 {
240  return a_;
241 }
double a_
Definition: IzhIF.h:64

+ Here is the caller graph for this function:

double IzhIF::getA0 ( const Eref e) const

Definition at line 208 of file IzhIF.cpp.

References a0_.

Referenced by initCinfo().

209 {
210  return a0_;
211 }
double a0_
Definition: IzhIF.h:61

+ Here is the caller graph for this function:

double IzhIF::getB ( const Eref e) const

Definition at line 248 of file IzhIF.cpp.

References b_.

Referenced by initCinfo().

249 {
250  return b_;
251 }
double b_
Definition: IzhIF.h:65

+ Here is the caller graph for this function:

double IzhIF::getB0 ( const Eref e) const

Definition at line 218 of file IzhIF.cpp.

References b0_.

Referenced by initCinfo().

219 {
220  return b0_;
221 }
double b0_
Definition: IzhIF.h:62

+ Here is the caller graph for this function:

double IzhIF::getC0 ( const Eref e) const

Definition at line 228 of file IzhIF.cpp.

References c0_.

Referenced by initCinfo().

229 {
230  return c0_;
231 }
double c0_
Definition: IzhIF.h:63

+ Here is the caller graph for this function:

double IzhIF::getD ( const Eref e) const

Definition at line 258 of file IzhIF.cpp.

References d_.

Referenced by initCinfo().

259 {
260  return d_;
261 }
double d_
Definition: IzhIF.h:66

+ Here is the caller graph for this function:

double IzhIF::getU ( const Eref e) const

Definition at line 278 of file IzhIF.cpp.

References u_.

Referenced by initCinfo().

279 {
280  return u_;
281 }
double u_
Definition: IzhIF.h:68

+ Here is the caller graph for this function:

double IzhIF::getUInit ( const Eref e) const

Definition at line 288 of file IzhIF.cpp.

References uInit_.

Referenced by initCinfo().

289 {
290  return uInit_;
291 }
double uInit_
Definition: IzhIF.h:69

+ Here is the caller graph for this function:

double IzhIF::getVPeak ( const Eref e) const

Definition at line 268 of file IzhIF.cpp.

References vPeak_.

Referenced by initCinfo().

269 {
270  return vPeak_;
271 }
double vPeak_
Definition: IzhIF.h:67

+ Here is the caller graph for this function:

const Cinfo * IzhIF::initCinfo ( )
static

Initializes the class info.

Definition at line 19 of file IzhIF.cpp.

References getA(), getA0(), getB(), getB0(), getC0(), getD(), getU(), getUInit(), getVPeak(), moose::IntFireBase::initCinfo(), IzhIFCinfo, setA(), setA0(), setB(), setB0(), setC0(), setD(), setU(), setUInit(), and setVPeak().

20 {
21  static string doc[] =
22  {
23  "Name", "IzhIF",
24  "Author", "Aditya Gilra",
25  "Description", "Izhikevich neuron (integrate and fire)."
26  "d Vm /dt = a0 * Vm^2 + b0 * Vm + c0 - u + I/Cm "
27  "d u / dt = a * ( b * Vm - u ) "
28  "at each spike, u -> u + d "
29  "by default, a0 = 0.04e6/V/s, b0 = 5e3/s, c0 = 140 V/s are set to SI units, "
30  "so use SI consistently, or change a0, b0, c0 also if you wish to use other units. "
31  "Rm, Em from Compartment are not used here, vReset is same as c in the usual formalism. "
32  "At rest, u0 = b V0, and V0 = ( -(-b0-b) +/- sqrt((b0-b)^2 - 4*a0*c0)) / (2*a0) "
33  "equivalently, to obtain resting Em, set b = (a0*Em^2 + b0*Em + c0)/Em"
34  };
35 
37  "a0",
38  "factor for Vm^2 term in evolution equation for Vm: "
39  "d Vm /dt = a0 * Vm^2 + b0 * Vm + c0 - u + I/Cm ",
40  &IzhIF::setA0,
42  );
43 
45  "b0",
46  "factor for Vm term in evolution equation for Vm: "
47  "d Vm /dt = a0 * Vm^2 + b0 * Vm + c0 - u + I/Cm ",
48  &IzhIF::setB0,
50  );
51 
53  "c0",
54  "constant term in evolution equation for Vm: "
55  "d Vm /dt = a0 * Vm^2 + b0 * Vm + c0 - u + I/Cm ",
56  &IzhIF::setC0,
58  );
59 
61  "a",
62  "a as in d u / dt = a * ( b * Vm - u ) ",
63  &IzhIF::setA,
65  );
66 
68  "b",
69  "b as in d u / dt = a * ( b * Vm - u ) ",
70  &IzhIF::setB,
72  );
73 
75  "d",
76  "u jumps by d at every spike",
77  &IzhIF::setD,
79  );
80 
82  "u",
83  "u is an adaptation variable",
84  &IzhIF::setU,
86  );
87 
89  "vPeak",
90  "Vm is reset when Vm > vPeak",
93  );
94 
96  "uInit",
97  "Initial value of u. It is reset at reinit()",
100  );
101 
102  static Finfo* IzhIFFinfos[] = {
103  &a0, // Value
104  &b0, // Value
105  &c0, // Value
106  &a, // Value
107  &b, // Value
108  &d, // Value
109  &u, // Value
110  &uInit, // Value
111  &vPeak, // Value
112  };
113 
114  static Dinfo< IzhIF > dinfo;
115  static Cinfo IzhIFCinfo(
116  "IzhIF",
118  IzhIFFinfos,
119  sizeof( IzhIFFinfos ) / sizeof (Finfo*),
120  &dinfo,
121  doc,
122  sizeof(doc)/sizeof(string)
123  );
124 
125  return &IzhIFCinfo;
126 }
void setB0(const Eref &e, double val)
Definition: IzhIF.cpp:213
void setA0(const Eref &e, double val)
Definition: IzhIF.cpp:203
void setUInit(const Eref &e, double val)
Definition: IzhIF.cpp:283
double getD(const Eref &e) const
Definition: IzhIF.cpp:258
Definition: Dinfo.h:60
void setD(const Eref &e, double val)
Definition: IzhIF.cpp:253
double getC0(const Eref &e) const
Definition: IzhIF.cpp:228
double getA(const Eref &e) const
Definition: IzhIF.cpp:238
double getA0(const Eref &e) const
Definition: IzhIF.cpp:208
void setU(const Eref &e, double val)
Definition: IzhIF.cpp:273
double getB0(const Eref &e) const
Definition: IzhIF.cpp:218
void setC0(const Eref &e, double val)
Definition: IzhIF.cpp:223
double getVPeak(const Eref &e) const
Definition: IzhIF.cpp:268
static const Cinfo * initCinfo()
Definition: IntFireBase.cpp:27
double getU(const Eref &e) const
Definition: IzhIF.cpp:278
void setA(const Eref &e, double val)
Definition: IzhIF.cpp:233
static const Cinfo * IzhIFCinfo
Definition: IzhIF.cpp:128
double getUInit(const Eref &e) const
Definition: IzhIF.cpp:288
double getB(const Eref &e) const
Definition: IzhIF.cpp:248
void setB(const Eref &e, double val)
Definition: IzhIF.cpp:243
Definition: Cinfo.h:18
Definition: Finfo.h:12
void setVPeak(const Eref &e, double val)
Definition: IzhIF.cpp:263

+ Here is the call graph for this function:

void IzhIF::setA ( const Eref e,
double  val 
)

Definition at line 233 of file IzhIF.cpp.

References a_.

Referenced by initCinfo().

234 {
235  a_ = val;
236 }
double a_
Definition: IzhIF.h:64

+ Here is the caller graph for this function:

void IzhIF::setA0 ( const Eref e,
double  val 
)

Definition at line 203 of file IzhIF.cpp.

References a0_.

Referenced by initCinfo().

204 {
205  a0_ = val;
206 }
double a0_
Definition: IzhIF.h:61

+ Here is the caller graph for this function:

void IzhIF::setB ( const Eref e,
double  val 
)

Definition at line 243 of file IzhIF.cpp.

References b_.

Referenced by initCinfo().

244 {
245  b_ = val;
246 }
double b_
Definition: IzhIF.h:65

+ Here is the caller graph for this function:

void IzhIF::setB0 ( const Eref e,
double  val 
)

Definition at line 213 of file IzhIF.cpp.

References b0_.

Referenced by initCinfo().

214 {
215  b0_ = val;
216 }
double b0_
Definition: IzhIF.h:62

+ Here is the caller graph for this function:

void IzhIF::setC0 ( const Eref e,
double  val 
)

Definition at line 223 of file IzhIF.cpp.

References c0_.

Referenced by initCinfo().

224 {
225  c0_ = val;
226 }
double c0_
Definition: IzhIF.h:63

+ Here is the caller graph for this function:

void IzhIF::setD ( const Eref e,
double  val 
)

Definition at line 253 of file IzhIF.cpp.

References d_.

Referenced by initCinfo().

254 {
255  d_ = val;
256 }
double d_
Definition: IzhIF.h:66

+ Here is the caller graph for this function:

void IzhIF::setU ( const Eref e,
double  val 
)

Definition at line 273 of file IzhIF.cpp.

References u_.

Referenced by initCinfo().

274 {
275  u_ = val;
276 }
double u_
Definition: IzhIF.h:68

+ Here is the caller graph for this function:

void IzhIF::setUInit ( const Eref e,
double  val 
)

Definition at line 283 of file IzhIF.cpp.

References uInit_.

Referenced by initCinfo().

284 {
285  uInit_ = val;
286 }
double uInit_
Definition: IzhIF.h:69

+ Here is the caller graph for this function:

void IzhIF::setVPeak ( const Eref e,
double  val 
)

Definition at line 263 of file IzhIF.cpp.

References vPeak_.

Referenced by initCinfo().

264 {
265  vPeak_ = val;
266 }
double vPeak_
Definition: IzhIF.h:67

+ Here is the caller graph for this function:

void IzhIF::vProcess ( const Eref e,
ProcPtr  p 
)
virtual

The process function does the object updating and sends out messages to channels, nernsts, and so on.

Implements moose::IntFireBase.

Definition at line 157 of file IzhIF.cpp.

References a0_, a_, moose::IntFireBase::activation_, b0_, b_, c0_, moose::Compartment::Cm_, ProcInfo::currTime, d_, ProcInfo::dt, moose::IntFireBase::fired_, moose::Compartment::Im_, moose::Compartment::inject_, moose::IntFireBase::lastEvent_, moose::Compartment::lastIm_, moose::IntFireBase::refractT_, moose::IntFireBase::spikeOut(), moose::Compartment::sumInject_, u_, moose::Compartment::Vm_, moose::CompartmentBase::VmOut(), vPeak_, and moose::IntFireBase::vReset_.

158 {
159  // fully taking over Compartment's vProcess due to quadratic term in Vm
160  // we no longer care about A and B
161  fired_ = false;
162  if ( p->currTime < lastEvent_ + refractT_ ) {
163  Vm_ = vReset_;
164  sumInject_ = 0.0;
165  VmOut()->send( e, Vm_ );
166  } else {
167  // activation can be a continous variable (graded synapse).
168  // So integrate it at every time step, thus *dt.
169  // For a delta-fn synapse, SynHandler-s divide by dt and send activation.
170  // See: http://www.genesis-sim.org/GENESIS/Hyperdoc/Manual-26.html#synchan
171  // for this continuous definition of activation.
172  Vm_ += activation_ * p->dt;
173  activation_ = 0.0;
174  if ( Vm_ > vPeak_ ) {
175  Vm_ = vReset_;
176  u_ += d_;
177  lastEvent_ = p->currTime;
178  fired_ = true;
179  spikeOut()->send( e, p->currTime );
180  VmOut()->send( e, Vm_ );
181  } else {
182  Vm_ += ( (inject_+sumInject_) / Cm_
183  + a0_*pow(Vm_,2.0) + b0_*Vm_ + c0_ - u_ ) * p->dt;
184  u_ += a_ * (b_*Vm_ - u_) * p->dt;
185  lastIm_ = Im_;
186  Im_ = 0.0;
187  sumInject_ = 0.0;
188  // Send out Vm to channels, SpikeGens, etc.
189  VmOut()->send( e, Vm_ );
190  }
191  }
192 }
double b0_
Definition: IzhIF.h:62
double currTime
Definition: ProcInfo.h:19
double u_
Definition: IzhIF.h:68
double a_
Definition: IzhIF.h:64
double a0_
Definition: IzhIF.h:61
double d_
Definition: IzhIF.h:66
double dt
Definition: ProcInfo.h:18
static SrcFinfo1< double > * spikeOut()
Message src for outgoing spikes.
Definition: IntFireBase.cpp:17
double vPeak_
Definition: IzhIF.h:67
double b_
Definition: IzhIF.h:65
static SrcFinfo1< double > * VmOut()
double c0_
Definition: IzhIF.h:63

+ Here is the call graph for this function:

void IzhIF::vReinit ( const Eref e,
ProcPtr  p 
)
virtual

The reinit function reinitializes all fields.

Implements moose::IntFireBase.

Definition at line 194 of file IzhIF.cpp.

References moose::IntFireBase::activation_, moose::IntFireBase::fired_, moose::IntFireBase::lastEvent_, moose::IntFireBase::refractT_, u_, uInit_, and moose::Compartment::vReinit().

195 {
196  activation_ = 0.0;
197  u_ = uInit_;
198  fired_ = false;
199  lastEvent_ = -refractT_; // Allow it to fire right away.
200  Compartment::vReinit( e, p );
201 }
void vReinit(const Eref &e, ProcPtr p)
double u_
Definition: IzhIF.h:68
double uInit_
Definition: IzhIF.h:69

+ Here is the call graph for this function:

Member Data Documentation

double moose::IzhIF::a0_
private

Definition at line 61 of file IzhIF.h.

Referenced by getA0(), IzhIF(), setA0(), and vProcess().

double moose::IzhIF::a_
private

Definition at line 64 of file IzhIF.h.

Referenced by getA(), IzhIF(), setA(), and vProcess().

double moose::IzhIF::b0_
private

Definition at line 62 of file IzhIF.h.

Referenced by getB0(), IzhIF(), setB0(), and vProcess().

double moose::IzhIF::b_
private

Definition at line 65 of file IzhIF.h.

Referenced by getB(), IzhIF(), setB(), and vProcess().

double moose::IzhIF::c0_
private

Definition at line 63 of file IzhIF.h.

Referenced by getC0(), IzhIF(), setC0(), and vProcess().

double moose::IzhIF::d_
private

Definition at line 66 of file IzhIF.h.

Referenced by getD(), IzhIF(), setD(), and vProcess().

double moose::IzhIF::u_
private

Definition at line 68 of file IzhIF.h.

Referenced by getU(), IzhIF(), setU(), vProcess(), and vReinit().

double moose::IzhIF::uInit_
private

Definition at line 69 of file IzhIF.h.

Referenced by getUInit(), IzhIF(), setUInit(), and vReinit().

double moose::IzhIF::vPeak_
private

Definition at line 67 of file IzhIF.h.

Referenced by getVPeak(), IzhIF(), setVPeak(), and vProcess().


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