MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Compartment.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment,
4 ** also known as GENESIS 3 base code.
5 ** copyright (C) 2003-2006 Upinder S. Bhalla. and NCBS
6 ** It is made available under the terms of the
7 ** GNU Lesser General Public License version 2.1
8 ** See the file COPYING.LIB for the full notice.
9 **********************************************************************/
10 
11 #ifndef _COMPARTMENT_H
12 #define _COMPARTMENT_H
13 
20 namespace moose
21 {
23 {
24 public:
25  Compartment();
26  virtual ~Compartment();
27 
28  // Value Field access function definitions.
29  virtual void vSetVm( const Eref& e, double Vm );
30  virtual double vGetVm( const Eref& e ) const;
31  virtual void vSetEm( const Eref& e, double Em );
32  virtual double vGetEm( const Eref& e ) const;
33  virtual void vSetCm( const Eref& e, double Cm );
34  virtual double vGetCm( const Eref& e ) const;
35  virtual void vSetRm( const Eref& e, double Rm );
36  virtual double vGetRm( const Eref& e ) const;
37  virtual void vSetRa( const Eref& e, double Ra );
38  virtual double vGetRa( const Eref& e ) const;
39  virtual double vGetIm( const Eref& e ) const;
40  virtual void vSetInject( const Eref& e, double Inject );
41  virtual double vGetInject( const Eref& e ) const;
42  virtual void vSetInitVm( const Eref& e, double initVm );
43  virtual double vGetInitVm( const Eref& e ) const;
44 
45  // Dest function definitions.
50  void vProcess( const Eref& e, ProcPtr p );
51 
55  void vReinit( const Eref& e, ProcPtr p );
56 
65  void vInitProc( const Eref& e, ProcPtr p );
66 
71  void vInitReinit( const Eref& e, ProcPtr p );
72 
77  void vHandleChannel( const Eref& e, double Gk, double Ek);
78 
82  void vHandleRaxial( double Ra, double Vm);
83 
87  void vHandleAxial( double Vm);
88 
96  void vInjectMsg( const Eref& e, double current);
97 
104  void vRandInject( const Eref& e, double prob, double current);
105 
110  void cable();
111 
112 
116  static const Cinfo* initCinfo();
117 
118 protected:
119  double Vm_;
120  double initVm_;
121  double Em_;
122  double Cm_;
123  double Rm_;
124  double Ra_;
125  double Im_;
126  double lastIm_;
127  double inject_;
128  double A_;
129  double B_;
130  double sumInject_;
131 
132 private:
133  double invRm_;
134  double dt_;
135  static const double EPSILON;
136 
137 };
138 }
139 
140 // Used by solver, readcell, etc.
141 
142 #endif // _COMPARTMENT_H
virtual void vSetInitVm(const Eref &e, double initVm)
virtual double vGetInject(const Eref &e) const
virtual double vGetInitVm(const Eref &e) const
void vHandleChannel(const Eref &e, double Gk, double Ek)
virtual void vSetRm(const Eref &e, double Rm)
void vReinit(const Eref &e, ProcPtr p)
static const Cinfo * initCinfo()
Definition: Compartment.cpp:26
static const double EPSILON
Definition: Compartment.h:135
virtual double vGetCm(const Eref &e) const
virtual void vSetVm(const Eref &e, double Vm)
Definition: Compartment.cpp:97
void vInitProc(const Eref &e, ProcPtr p)
void vInitReinit(const Eref &e, ProcPtr p)
void vHandleRaxial(double Ra, double Vm)
virtual void vSetInject(const Eref &e, double Inject)
virtual double vGetRa(const Eref &e) const
void vProcess(const Eref &e, ProcPtr p)
void vHandleAxial(double Vm)
virtual double vGetRm(const Eref &e) const
Definition: Eref.h:26
void vInjectMsg(const Eref &e, double current)
virtual double vGetIm(const Eref &e) const
void vRandInject(const Eref &e, double prob, double current)
virtual ~Compartment()
Definition: Compartment.cpp:91
virtual void vSetRa(const Eref &e, double Ra)
virtual double vGetVm(const Eref &e) const
virtual void vSetCm(const Eref &e, double Cm)
virtual double vGetEm(const Eref &e) const
Definition: Cinfo.h:18
virtual void vSetEm(const Eref &e, double Em)