MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HSolve.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** copyright (C) 2003-2007 Upinder S. Bhalla, Niraj Dudani and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 
10 #ifndef _HSOLVE_H
11 #define _HSOLVE_H
12 #include <set>
16 class HSolve: public HSolveActive
17 {
18 public:
19  HSolve();
20  ~HSolve();
21 
22  void process( const Eref& hsolve, ProcPtr p );
23  void reinit( const Eref& hsolve, ProcPtr p );
24 
25  void setSeed( Id seed );
26  Id getSeed() const;
29  void setPath( const Eref& e, string path );
30  string getPath( const Eref& e ) const;
33  void setDt( double dt );
34  double getDt() const;
35 
36  void setCaAdvance( int caAdvance );
37  int getCaAdvance() const;
38 
39  void setVDiv( int vDiv );
40  int getVDiv() const;
41 
42  void setVMin( double vMin );
43  double getVMin() const;
44 
45  void setVMax( double vMax );
46  double getVMax() const;
47 
48  void setCaDiv( int caDiv );
49  int getCaDiv() const;
50 
51  void setCaMin( double caMin );
52  double getCaMin() const;
53 
54  void setCaMax( double caMax );
55  double getCaMax() const;
56 
57  // Interface functions defined in HSolveInterface.cpp
58  double getInitVm( Id id ) const;
59  void setInitVm( Id id, double value );
60 
61  double getVm( Id id ) const;
62  void setVm( Id id, double value );
63 
64  double getCm( Id id ) const;
65  void setCm( Id id, double value );
66 
67  double getEm( Id id ) const;
68  void setEm( Id id, double value );
69 
70  double getRm( Id id ) const;
71  void setRm( Id id, double value );
72 
73  double getRa( Id id ) const;
74  void setRa( Id id, double value );
75 
76  // Im is read-only
77  double getIm( Id id ) const;
78 
79  // Ia is read-only
80  double getIa( Id id ) const;
81 
82  double getInject( Id id ) const;
83  void setInject( Id id, double value );
84 
85  void addInject( Id id, double value );
86 
88  //~ const vector< Id >& getCompartments() const;
89 
90  void addGkEk( Id id, double v1, double v2 );
91  void addConc( Id id, double conc );
93  //~ const vector< Id >& getHHChannels() const;
94  void setPowers(
95  Id id,
96  double Xpower,
97  double Ypower,
98  double Zpower );
99 
100  int getInstant( Id id ) const;
101  void setInstant( Id id, int instant );
102 
103  double getHHChannelGbar( Id id ) const;
104  void setHHChannelGbar( Id id, double value );
105 
106  double getEk( Id id ) const;
107  void setEk( Id id, double value );
108 
109  double getGk( Id id ) const;
110  void setGk( Id id, double value );
111 
112  // Ik is read-only
113  double getIk( Id id ) const;
114 
115  double getX( Id id ) const;
116  void setX( Id id, double value );
117 
118  double getY( Id id ) const;
119  void setY( Id id, double value );
120 
121  double getZ( Id id ) const;
122  void setZ( Id id, double value );
123 
125  void setHHmodulation( Id id, double value );
126 
128  //~ const vector< Id >& getCaConcs() const;
129  double getCa( Id id ) const;
130  void setCa( Id id, double Ca );
131  void iCa( Id id, double iCa ); // Add incoming calcium current.
132 
133  double getCaBasal( Id id ) const;
134  void setCaBasal( Id id, double CaBasal );
135 
136  void setTauB( Id id, double tau, double B );
137 
138  double getCaCeiling( Id id ) const;
139  void setCaCeiling( Id id, double floor );
140 
141  double getCaFloor( Id id ) const;
142  void setCaFloor( Id id, double floor );
143 
145  //~ const vector< vector< Id > >& getExternalChannels() const;
146 
147  static const Cinfo* initCinfo();
148 
149  static const std::set<string>& handledClasses();
151  static void deleteIncomingMessages( Element * orig, const string finfo);
155 private:
156  static vector< Id > children( Id obj );
157  static Id deepSearchForCompartment( Id base );
158 
159  void setup( Eref hsolve );
160  void zombify( Eref hsolve ) const;
161  void unzombify() const;
162 
163  // Mapping global Id to local index. Defined in HSolveInterface.cpp.
164  void mapIds();
165  void mapIds( vector< Id > id );
166  unsigned int localIndex( Id id ) const;
167  map< Id, unsigned int > localIndex_;
168 
169  double dt_;
170  string path_;
172 };
173 
174 #endif // _HSOLVE_H
void setCaAdvance(int caAdvance)
Definition: HSolve.cpp:408
double getCaFloor(Id id) const
void setY(Id id, double value)
double getRm(Id id) const
static void deleteIncomingMessages(Element *orig, const string finfo)
Definition: HSolve.cpp:504
void setCa(Id id, double Ca)
void setTauB(Id id, double tau, double B)
uint32_t value
Definition: moosemodule.h:42
void addConc(Id id, double conc)
double getRa(Id id) const
double getVm(Id id) const
static vector< Id > children(Id obj)
Definition: HSolve.cpp:381
void process(const Eref &hsolve, ProcPtr p)
Definition: HSolve.cpp:206
void setVm(Id id, double value)
double getInitVm(Id id) const
Id seed_
Definition: HSolve.h:171
void setCaCeiling(Id id, double floor)
static const std::set< string > & handledClasses()
Definition: HSolve.cpp:484
~HSolve()
Definition: HSolve.cpp:196
double getCaBasal(Id id) const
double getGk(Id id) const
HSolve()
Definition: HSolve.cpp:190
void reinit(const Eref &hsolve, ProcPtr p)
Definition: HSolve.cpp:211
void setX(Id id, double value)
string path_
Definition: HSolve.h:170
void setVMin(double vMin)
Definition: HSolve.cpp:434
void setHHmodulation(Id id, double value)
Assign scale factor for HH channel conductance.
void setRa(Id id, double value)
string getPath(const Eref &e) const
Definition: HSolve.cpp:319
double getEm(Id id) const
void setCm(Id id, double value)
double getCm(Id id) const
void zombify(Eref hsolve) const
Definition: HSolve.cpp:217
void setup(Eref hsolve)
Definition: HSolve.cpp:268
void setDt(double dt)
Definition: HSolve.cpp:392
void addInject(Id id, double value)
double getHHChannelGbar(Id id) const
void setInitVm(Id id, double value)
void setCaFloor(Id id, double floor)
double getCaMax() const
Definition: HSolve.cpp:479
void setCaMax(double caMax)
Definition: HSolve.cpp:474
int getCaDiv() const
Definition: HSolve.cpp:459
void mapIds()
unsigned int localIndex(Id id) const
double getIm(Id id) const
Definition: HSolve.h:16
double getIk(Id id) const
double getDt() const
Definition: HSolve.cpp:403
void setGk(Id id, double value)
Definition: Eref.h:26
double getCaMin() const
Definition: HSolve.cpp:469
map< Id, unsigned int > localIndex_
Definition: HSolve.h:167
double getY(Id id) const
int getCaAdvance() const
Definition: HSolve.cpp:419
double getZ(Id id) const
void setRm(Id id, double value)
Id getSeed() const
Definition: HSolve.cpp:293
void setEk(Id id, double value)
void unzombify() const
Definition: HSolve.cpp:246
void addGkEk(Id id, double v1, double v2)
Interface to compartments.
void setCaBasal(Id id, double CaBasal)
double getEk(Id id) const
double getVMax() const
Definition: HSolve.cpp:449
void setZ(Id id, double value)
void setVDiv(int vDiv)
Definition: HSolve.cpp:424
int getInstant(Id id) const
void setPowers(Id id, double Xpower, double Ypower, double Zpower)
Interface to channels.
void setInstant(Id id, int instant)
void setPath(const Eref &e, string path)
Definition: HSolve.cpp:298
void setSeed(Id seed)
Definition: HSolve.cpp:281
void iCa(Id id, double iCa)
static const Cinfo * initCinfo()
Interface to external channels.
Definition: HSolve.cpp:30
double getInject(Id id) const
void setHHChannelGbar(Id id, double value)
double getVMin() const
Definition: HSolve.cpp:439
Definition: Id.h:17
double getX(Id id) const
int getVDiv() const
Definition: HSolve.cpp:429
double getCaCeiling(Id id) const
void setCaMin(double caMin)
Definition: HSolve.cpp:464
void setCaDiv(int caDiv)
Definition: HSolve.cpp:454
void setEm(Id id, double value)
static Id deepSearchForCompartment(Id base)
Definition: HSolve.cpp:329
double getIa(Id id) const
Definition: Cinfo.h:18
static char path[]
Definition: mfield.cpp:403
void setVMax(double vMax)
Definition: HSolve.cpp:444
double getCa(Id id) const
Interface to CaConc.
double dt_
Definition: HSolve.h:169
void setInject(Id id, double value)