27 map< Id, unsigned int >::const_iterator i;
40 for (
unsigned int i = 0; i <
id.size(); ++i )
70 assert( index <
V_.size() );
77 assert( index <
V_.size() );
84 assert( index <
tree_.size() );
85 return tree_[ index ].Cm;
91 assert( index <
tree_.size() );
99 assert( index <
tree_.size() );
100 return tree_[ index ].Em;
106 assert( index <
tree_.size() );
114 assert( index <
tree_.size() );
115 return tree_[ index ].Rm;
121 assert( index <
tree_.size() );
129 assert( index <
tree_.size() );
130 return tree_[ index ].Ra;
136 assert( index <
tree_.size() );
143 assert( index <
tree_.size() );
144 return tree_[ index ].initVm;
150 assert( index <
tree_.size() );
163 vector< CurrentStruct >::const_iterator icurrent;
171 Im += ( icurrent->Ek -
V_[ index ] ) * icurrent->Gk;
188 map< unsigned int, InjectStruct >::const_iterator i;
192 return i->second.injectBasal;
243 externalCurrent_[ 2 * index + 1 ] += Gk * Ek;
262 channel_[ index ].setPowers( Xpower, Ypower, Zpower );
276 channel_[ index ].instant_ = instant;
328 assert( comptIndex <
V_.size() );
338 if (
channel_[ index ].Xpower_ == 0.0 )
342 assert( stateIndex <
state_.size() );
344 return state_[ stateIndex ];
352 if (
channel_[ index ].Xpower_ == 0.0 )
356 assert( stateIndex <
state_.size() );
366 if (
channel_[ index ].Ypower_ == 0.0 )
371 if (
channel_[ index ].Xpower_ > 0.0 )
374 assert( stateIndex <
state_.size() );
376 return state_[ stateIndex ];
384 if (
channel_[ index ].Ypower_ == 0.0 )
389 if (
channel_[ index ].Xpower_ > 0.0 )
392 assert( stateIndex <
state_.size() );
402 if (
channel_[ index ].Zpower_ == 0.0 )
407 if (
channel_[ index ].Xpower_ > 0.0 )
409 if (
channel_[ index ].Ypower_ > 0.0 )
412 assert( stateIndex <
state_.size() );
414 return state_[ stateIndex ];
422 if (
channel_[ index ].Zpower_ == 0.0 )
427 if (
channel_[ index ].Xpower_ > 0.0 )
429 if (
channel_[ index ].Ypower_ > 0.0 )
432 assert( stateIndex <
state_.size() );
448 assert( index <
caConc_.size() );
455 assert( index <
caConc_.size() );
464 assert( index <
caConc_.size() );
477 assert( index <
caConc_.size() );
478 return caConc_[ index ].CaBasal_;
484 assert( index <
caConc_.size() );
486 caConc_[ index ].setCaBasal( CaBasal );
492 assert( index <
caConc_.size() );
500 assert( index <
caConc_.size() );
501 return caConc_[ index ].ceiling_;
507 assert( index <
caConc_.size() );
509 caConc_[ index ].ceiling_ = ceiling;
515 assert( index <
caConc_.size() );
516 return caConc_[ index ].floor_;
522 assert( index <
caConc_.size() );
524 caConc_[ index ].floor_ = floor;
double getCaFloor(Id id) const
void setY(Id id, double value)
double getRm(Id id) const
void setCa(Id id, double Ca)
void setTauB(Id id, double tau, double B)
void addConc(Id id, double conc)
vector< double > state_
Fraction of gates open.
double getRa(Id id) const
double getVm(Id id) const
vector< unsigned int > chan2state_
a state index
void setVm(Id id, double value)
double getInitVm(Id id) const
void setCaCeiling(Id id, double floor)
vector< double > ca_
Ca conc in each pool.
double getCaBasal(Id id) const
vector< double > caActivation_
calcium pool
double getGk(Id id) const
void setX(Id id, double value)
void setHHmodulation(Id id, double value)
Assign scale factor for HH channel conductance.
void setRa(Id id, double value)
vector< ChannelStruct > channel_
to compartment: chan2compt
double getEm(Id id) const
void setCm(Id id, double value)
vector< Id > compartmentId_
double getCm(Id id) const
void addInject(Id id, double value)
double getHHChannelGbar(Id id) const
void setInitVm(Id id, double value)
void setCaFloor(Id id, double floor)
vector< CaConcStruct > caConc_
Ca pool info.
vector< CompartmentStruct > compartment_
unsigned int localIndex(Id id) const
double getIm(Id id) const
double getIk(Id id) const
map< unsigned int, InjectStruct > inject_
void setGk(Id id, double value)
vector< TreeNodeStruct > tree_
map< Id, unsigned int > localIndex_
void setRm(Id id, double value)
vector< double > externalCalcium_
void setEk(Id id, double value)
vector< currentVecIter > currentBoundary_
void addGkEk(Id id, double v1, double v2)
Interface to compartments.
void setCaBasal(Id id, double CaBasal)
double getEk(Id id) const
vector< unsigned int > chan2compt_
void setZ(Id id, double value)
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 iCa(Id id, double iCa)
double getInject(Id id) const
vector< double > externalCurrent_
void setHHChannelGbar(Id id, double value)
double getCaCeiling(Id id) const
vector< Id > channelId_
Used for localIndex-ing.
vector< CurrentStruct > current_
Channel current.
void setEm(Id id, double value)
vector< Id > caConcId_
calcium from difshells
double getIa(Id id) const
double getCa(Id id) const
Interface to CaConc.
void setInject(Id id, double value)