MOOSE - Multiscale Object Oriented Simulation Environment
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HSolveActiveSetup.cpp
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 
11 #include "HSolveActive.h"
12 
14 // Setup of data structures
16 
17 void HSolveActive::setup( Id seed, double dt )
18 {
19  //~ cout << ".. HA.setup()" << endl;
20 
21  this->HSolvePassive::setup( seed, dt );
22 
24  readGates();
25  readCalcium();
27  readSynapses(); // Reads SynChans, SpikeGens. Drops process msg for SpikeGens.
29  manageOutgoingMessages(); // Manages messages going out from the cell's components.
30 
31  //~ reinit();
32  cleanup();
33 
34  //~ cout << "# of compartments: " << compartmentId_.size() << "." << endl;
35  //~ cout << "# of channels: " << channelId_.size() << "." << endl;
36  //~ cout << "# of gates: " << gateId_.size() << "." << endl;
37  //~ cout << "# of states: " << state_.size() << "." << endl;
38  //~ cout << "# of Ca pools: " << caConc_.size() << "." << endl;
39  //~ cout << "# of SynChans: " << synchan_.size() << "." << endl;
40  //~ cout << "# of SpikeGens: " << spikegen_.size() << "." << endl;
41 }
42 
44 {
45  externalCurrent_.assign( externalCurrent_.size(), 0.0 );
46 
47  reinitSpikeGens( info );
49  reinitCalcium();
51  sendValues( info );
52 }
53 
55 {
56  vector< SpikeGenStruct >::iterator ispike;
57  for ( ispike = spikegen_.begin(); ispike != spikegen_.end(); ++ispike )
58  ispike->reinit( info );
59 }
60 
62 {
63  for ( unsigned int ic = 0; ic < nCompt_; ++ic )
64  V_[ ic ] = tree_[ ic ].initVm;
65 }
66 
68 {
69  caActivation_.assign( caActivation_.size(), 0.0 );
70 
71  for ( unsigned int i = 0; i < ca_.size(); ++i )
72  {
73  caConc_[ i ].c_ = 0.0;
74  ca_[ i ] = caConc_[ i ].CaBasal_;
75  }
76 }
77 
79 {
80  vector< double >::iterator iv;
81  vector< double >::iterator istate = state_.begin();
82  vector< int >::iterator ichannelcount = channelCount_.begin();
83  vector< ChannelStruct >::iterator ichan = channel_.begin();
84  vector< ChannelStruct >::iterator chanBoundary;
85  vector< unsigned int >::iterator icacount = caCount_.begin();
86  vector< double >::iterator ica = ca_.begin();
87  vector< double >::iterator caBoundary;
88  vector< LookupColumn >::iterator icolumn = column_.begin();
89  vector< LookupRow >::iterator icarowcompt;
90  vector< LookupRow* >::iterator icarow = caRow_.begin();
91  vector< double>::iterator iextca = externalCalcium_.begin();
92 
93  LookupRow vRow;
94  LookupRow dRow;
95  double C1, C2;
96  for ( iv = V_.begin(); iv != V_.end(); ++iv )
97  {
98 
99  vTable_.row( *iv, vRow );
100  icarowcompt = caRowCompt_.begin();
101 
102  caBoundary = ica + *icacount;
103  for ( ; ica < caBoundary; ++ica )
104  {
105  caTable_.row( *ica, *icarowcompt );
106 
107  ++icarowcompt;
108 
109  }
110 
111  chanBoundary = ichan + *ichannelcount;
112  for ( ; ichan < chanBoundary; ++ichan )
113  {
114 
115  caTable_.row( *iextca, dRow );
116 
117  if ( ichan->Xpower_ > 0.0 )
118  {
119  vTable_.lookup( *icolumn, vRow, C1, C2 );
120 
121  *istate = C1 / C2;
122 
123  ++icolumn, ++istate;
124  }
125 
126  if ( ichan->Ypower_ > 0.0 )
127  {
128  vTable_.lookup( *icolumn, vRow, C1, C2 );
129 
130  *istate = C1 / C2;
131 
132  ++icolumn, ++istate;
133  }
134 
135  if ( ichan->Zpower_ > 0.0 )
136  {
137  LookupRow* caRow = *icarow;
138 
139  if ( caRow )
140  {
141  caTable_.lookup( *icolumn, *caRow, C1, C2 );
142  }
143  else if (*iextca>0)
144  caTable_.lookup( *icolumn, dRow, C1, C2 );
145  else
146  {
147  vTable_.lookup( *icolumn, vRow, C1, C2 );
148  }
149 
150  *istate = C1 / C2;
151 
152  ++icolumn, ++istate, ++icarow;
153  }
154 
155  ++iextca;
156  }
157 
158  ++ichannelcount, ++icacount;
159  }
160 }
161 
163 {
164  vector< Id >::iterator icompt;
165  vector< Id >::iterator ichan;
166  int nChannel = 0;
167  double Gbar = 0.0, Ek = 0.0;
168  double X = 0.0, Y = 0.0, Z = 0.0;
169  double Xpower = 0.0, Ypower = 0.0, Zpower = 0.0;
170  int instant = 0;
171 
172  for ( icompt = compartmentId_.begin(); icompt != compartmentId_.end(); ++icompt )
173  {
174  nChannel = HSolveUtils::hhchannels( *icompt, channelId_ );
175 
176  // todo: discard channels with Gbar = 0.0
177  channelCount_.push_back( nChannel );
178 
179  ichan = channelId_.end() - nChannel;
180  for ( ; ichan != channelId_.end(); ++ichan )
181  {
182  channel_.resize( channel_.size() + 1 );
183  ChannelStruct& channel = channel_.back();
184 
185  current_.resize( current_.size() + 1 );
186  CurrentStruct& current = current_.back();
187 
188  Gbar = Field< double >::get( *ichan, "Gbar" );
189  Ek = Field< double >::get( *ichan, "Ek" );
190  X = Field< double >::get( *ichan, "X" );
191  Y = Field< double >::get( *ichan, "Y" );
192  Z = Field< double >::get( *ichan, "Z" );
193  Xpower = Field< double >::get( *ichan, "Xpower" );
194  Ypower = Field< double >::get( *ichan, "Ypower" );
195  Zpower = Field< double >::get( *ichan, "Zpower" );
196  instant = Field< int >::get( *ichan, "instant" );
197  double modulation = Field< double >::get( *ichan, "modulation");
198 
199  current.Ek = Ek;
200 
201  channel.Gbar_ = Gbar;
202  channel.setPowers( Xpower, Ypower, Zpower );
203  channel.instant_ = instant;
204  channel.modulation_ = modulation;
205 
206  /*
207  * Map channel index to state index. This is useful in the
208  * interface to find gate values.
209  */
210  chan2state_.push_back( state_.size() );
211 
212  if ( Xpower > 0.0 )
213  state_.push_back( X );
214  if ( Ypower > 0.0 )
215  state_.push_back( Y );
216  if ( Zpower > 0.0 )
217  state_.push_back( Z );
218 
219  /*
220  * Map channel index to compartment index. This is useful in the
221  * interface to generate channel Ik values (since we then need the
222  * compartment Vm).
223  */
224  chan2compt_.push_back( icompt - compartmentId_.begin() );
225  }
226  }
227 
228  int nCumulative = 0;
229  currentBoundary_.resize( nCompt_ );
230  for ( unsigned int ic = 0; ic < nCompt_; ++ic )
231  {
232  nCumulative += channelCount_[ ic ];
233  currentBoundary_[ ic ] = current_.begin() + nCumulative;
234  }
235 }
236 
238 {
239  vector< Id >::iterator ichan;
240  unsigned int nGates = 0;
241  int useConcentration = 0;
242  for ( ichan = channelId_.begin(); ichan != channelId_.end(); ++ichan )
243  {
244  nGates = HSolveUtils::gates( *ichan, gateId_ );
245  gCaDepend_.insert( gCaDepend_.end(), nGates, 0 );
246  useConcentration = Field< int >::get( *ichan, "useConcentration" );
247  if ( useConcentration )
248  gCaDepend_.back() = 1;
249  }
250 }
251 
253 {
254  double Ca, CaBasal, tau, B, ceiling, floor;
255  vector< Id > caConcId;
256  vector< int > caTargetIndex;
257  map< Id, int > caConcIndex;
258  int nTarget, nDepend = 0;
259  vector< Id >::iterator iconc;
260 
261  caCount_.resize( nCompt_ );
262  unsigned int ichan = 0;
263 
264  for ( unsigned int ic = 0; ic < nCompt_; ++ic )
265  {
266 
267  unsigned int chanBoundary = ichan + channelCount_[ ic ];
268  unsigned int nCa = caConc_.size();
269 
270  for ( ; ichan < chanBoundary; ++ichan )
271  {
272  caConcId.clear();
273 
274  nTarget = HSolveUtils::caTarget( channelId_[ ichan ], caConcId );
275  if ( nTarget == 0 )
276  // No calcium pools fed by this channel.
277  caTargetIndex.push_back( -1 );
278 
279  nDepend = HSolveUtils::caDepend( channelId_[ ichan ], caConcId );
280 
281  if ( nDepend == 0)
282  // Channel does not depend on calcium.
283 
284  caDependIndex_.push_back( -1 );
285 
286 
287  externalCalcium_.push_back(0);
288 
289  for ( iconc = caConcId.begin(); iconc != caConcId.end(); ++iconc )
290  if ( caConcIndex.find( *iconc ) == caConcIndex.end() )
291  {
292  caConcIndex[ *iconc ] = caCount_[ ic ];
293  ++caCount_[ ic ];
294 
295  Ca = Field< double >::get( *iconc, "Ca" );
296  CaBasal = Field< double >::get( *iconc, "CaBasal" );
297  tau = Field< double >::get( *iconc, "tau" );
298  B = Field< double >::get( *iconc, "B" );
299  ceiling = Field< double >::get( *iconc, "ceiling" );
300  floor = Field< double >::get( *iconc, "floor" );
301 
302  caConc_.push_back(
303  CaConcStruct(
304  Ca, CaBasal,
305  tau, B,
306  ceiling, floor,
307  dt_
308  )
309  );
310  caConcId_.push_back( *iconc );
311  }
312 
313  if ( nTarget != 0 )
314  caTargetIndex.push_back( caConcIndex[ caConcId.front() ] + nCa );
315  if ( nDepend != 0 )
316  caDependIndex_.push_back( caConcIndex[ caConcId.back() ] );
317 
318 
319  }
320  }
321 
322 
323 
324  caTarget_.resize( channel_.size() );
325  ca_.resize( caConc_.size() );
326  caActivation_.resize( caConc_.size() );
327 
328  for ( unsigned int ichan = 0; ichan < channel_.size(); ++ichan )
329  {
330  if ( caTargetIndex[ ichan ] == -1 )
331  caTarget_[ ichan ] = 0;
332  else
333  caTarget_[ ichan ] = &caActivation_[ caTargetIndex[ ichan ] ];
334  }
335 
336 
337 }
338 
340 {
341  std::set< Id > caSet;
342  std::set< Id > vSet;
343  vector< Id > caGate;
344  vector< Id > vGate;
345  map< Id, unsigned int > gateSpecies;
346 
347  for ( unsigned int ig = 0; ig < gateId_.size(); ++ig )
348  if ( gCaDepend_[ ig ] )
349  caSet.insert( gateId_[ ig ] );
350  else
351  vSet.insert( gateId_[ ig ] );
352 
353  caGate.insert( caGate.end(), caSet.begin(), caSet.end() );
354  vGate.insert( vGate.end(), vSet.begin(), vSet.end() );
355 
356  for ( unsigned int ig = 0; ig < caGate.size(); ++ig )
357  gateSpecies[ caGate[ ig ] ] = ig;
358  for ( unsigned int ig = 0; ig < vGate.size(); ++ig )
359  gateSpecies[ vGate[ ig ] ] = ig;
360 
361  /*
362  * Finding the smallest xmin and largest xmax across all gates' lookup
363  * tables.
364  *
365  * # of divs is determined by finding the smallest dx (highest density).
366  */
367  vMin_ = numeric_limits< double >::max();
368  vMax_ = numeric_limits< double >::min();
369  double vDx = numeric_limits< double >::max();
370  caMin_ = numeric_limits< double >::max();
371  caMax_ = numeric_limits< double >::min();
372  double caDx = numeric_limits< double >::max();
373 
374  double min;
375  double max;
376  unsigned int divs;
377  double dx;
378 
379  for ( unsigned int ig = 0; ig < caGate.size(); ++ig )
380  {
381  min = Field< double >::get( caGate[ ig ], "min" );
382  max = Field< double >::get( caGate[ ig ], "max" );
383  divs = Field< unsigned int >::get( caGate[ ig ], "divs" );
384  dx = ( max - min ) / divs;
385 
386  if ( min < caMin_ )
387  caMin_ = min;
388  if ( max > caMax_ )
389  caMax_ = max;
390  if ( dx < caDx )
391  caDx = dx;
392  }
393  double caDiv = ( caMax_ - caMin_ ) / caDx;
394  caDiv_ = static_cast< int >( caDiv + 0.5 ); // Round-off to nearest int.
395 
396  for ( unsigned int ig = 0; ig < vGate.size(); ++ig )
397  {
398  min = Field< double >::get( vGate[ ig ], "min" );
399  max = Field< double >::get( vGate[ ig ], "max" );
400  divs = Field< unsigned int >::get( vGate[ ig ], "divs" );
401  dx = ( max - min ) / divs;
402 
403  if ( min < vMin_ )
404  vMin_ = min;
405  if ( max > vMax_ )
406  vMax_ = max;
407  if ( dx < vDx )
408  vDx = dx;
409  }
410  double vDiv = ( vMax_ - vMin_ ) / vDx;
411  vDiv_ = static_cast< int >( vDiv + 0.5 ); // Round-off to nearest int.
412 
413  caTable_ = LookupTable( caMin_, caMax_, caDiv_, caGate.size() );
414  vTable_ = LookupTable( vMin_, vMax_, vDiv_, vGate.size() );
415 
416  vector< double > A, B;
417  vector< double >::iterator ia, ib;
418  // double a, b;
419  //~ int AMode, BMode;
420  //~ bool interpolate;
421 
422  // Calcium-dependent lookup tables
424  //~ if ( !caGate.empty() ) {
425  //~ grid.resize( 1 + caDiv_ );
426  //~ double dca = ( caMax_ - caMin_ ) / caDiv_;
427  //~ for ( int igrid = 0; igrid <= caDiv_; ++igrid )
428  //~ grid[ igrid ] = caMin_ + igrid * dca;
429  //~ }
430 
431  for ( unsigned int ig = 0; ig < caGate.size(); ++ig )
432  {
433  HSolveUtils::rates( caGate[ ig ], caGrid, A, B );
434  //~ HSolveUtils::modes( caGate[ ig ], AMode, BMode );
435  //~ interpolate = ( AMode == 1 ) || ( BMode == 1 );
436 
437  ia = A.begin();
438  ib = B.begin();
439  for ( unsigned int igrid = 0; igrid < caGrid.size(); ++igrid )
440  {
441  // Use one of the optimized forms below, instead of A and B
442  // directly. Also updated reinit() accordingly (for gate state).
443 // a = *ia;
444 // b = *ib;
445 
446  // *ia = ( 2.0 - dt_ * b ) / ( 2.0 + dt_ * b );
447  // *ib = dt_ * a / ( 1.0 + dt_ * b / 2.0 );
448  // *ia = dt_ * a;
449  // *ib = 1.0 + dt_ * b / 2.0;
450  ++ia, ++ib;
451  }
452 
453  //~ caTable_.addColumns( ig, A, B, interpolate );
454  caTable_.addColumns( ig, A, B );
455  }
456 
457  // Voltage-dependent lookup tables
458  HSolveUtils::Grid vGrid( vMin_, vMax_, vDiv_ );
459  //~ if ( !vGate.empty() ) {
460  //~ grid.resize( 1 + vDiv_ );
461  //~ double dv = ( vMax_ - vMin_ ) / vDiv_;
462  //~ for ( int igrid = 0; igrid <= vDiv_; ++igrid )
463  //~ grid[ igrid ] = vMin_ + igrid * dv;
464  //~ }
465 
466 
467  for ( unsigned int ig = 0; ig < vGate.size(); ++ig )
468  {
469  //~ interpolate = HSolveUtils::get< HHGate, bool >( vGate[ ig ], "useInterpolation" );
470  HSolveUtils::rates( vGate[ ig ], vGrid, A, B );
471  //~ HSolveUtils::modes( vGate[ ig ], AMode, BMode );
472  //~ interpolate = ( AMode == 1 ) || ( BMode == 1 );
473 
474  ia = A.begin();
475  ib = B.begin();
476  for ( unsigned int igrid = 0; igrid < vGrid.size(); ++igrid )
477  {
478  // Use one of the optimized forms below, instead of A and B
479  // directly. Also updated reinit() accordingly (for gate state).
480 // a = *ia;
481 // b = *ib;
482 
483  // *ia = ( 2.0 - dt_ * b ) / ( 2.0 + dt_ * b );
484  // *ib = dt_ * a / ( 1.0 + dt_ * b / 2.0 );
485  // *ia = dt_ * a;
486  // *ib = 1.0 + dt_ * b / 2.0;
487  ++ia, ++ib;
488  }
489 
490  //~ vTable_.addColumns( ig, A, B, interpolate );
491  vTable_.addColumns( ig, A, B );
492  }
493 
494  column_.reserve( gateId_.size() );
495  for ( unsigned int ig = 0; ig < gateId_.size(); ++ig )
496  {
497  unsigned int species = gateSpecies[ gateId_[ ig ] ];
498 
499  LookupColumn column;
500  if ( gCaDepend_[ ig ] )
501  caTable_.column( species, column );
502  else
503  vTable_.column( species, column );
504 
505  column_.push_back( column );
506  }
507 
509  unsigned int maxN = *( max_element( caCount_.begin(), caCount_.end() ) );
510  caRowCompt_.resize( maxN );
511 
512  for ( unsigned int ichan = 0; ichan < channel_.size(); ++ichan )
513  {
514  if ( channel_[ ichan ].Zpower_ > 0.0 )
515  {
516  int index = caDependIndex_[ ichan ];
517 
518  if ( index == -1 )
519  caRow_.push_back( 0 );
520  else
521  caRow_.push_back( &caRowCompt_[ index ] );
522  }
523  }
524 
525 
526 }
527 
539 {
540  vector< Id > spikeId;
541  vector< Id > synId;
542  vector< Id >::iterator syn;
543  vector< Id >::iterator spike;
544  SynChanStruct synchan;
545 
546  for ( unsigned int ic = 0; ic < nCompt_; ++ic )
547  {
548  synId.clear();
549  HSolveUtils::synchans( compartmentId_[ ic ], synId );
550  for ( syn = synId.begin(); syn != synId.end(); ++syn )
551  {
552  synchan.compt_ = ic;
553  synchan.elm_ = *syn;
554  synchan_.push_back( synchan );
555  }
556 
557  static const Finfo* procDest = SpikeGen::initCinfo()->findFinfo( "process");
558  assert( procDest );
559  const DestFinfo* df = dynamic_cast< const DestFinfo* >( procDest );
560  assert( df );
561 
562  spikeId.clear();
563  HSolveUtils::spikegens( compartmentId_[ ic ], spikeId );
564  // Very unlikely that there will be >1 spikegens in a compartment,
565  // but lets take care of it anyway.
566  for ( spike = spikeId.begin(); spike != spikeId.end(); ++spike )
567  {
568  spikegen_.push_back(
569  SpikeGenStruct( &V_[ ic ], spike->eref() )
570  );
571 
572  ObjId mid = spike->element()->findCaller( df->getFid() );
573  if ( ! mid.bad() )
574  Msg::deleteMsg( mid );
575  }
576  }
577 }
578 
580 {
581  vector< string > filter;
582  filter.push_back( "HHChannel" );
583  //~ filter.push_back( "SynChan" );
584 
585  //~ externalChannelId_.resize( compartmentId_.size() );
586  externalCurrent_.resize( 2 * compartmentId_.size(), 0.0 );
587 
588  //~ for ( unsigned int ic = 0; ic < compartmentId_.size(); ++ic )
589  //~ HSolveUtils::targets(
590  //~ compartmentId_[ ic ],
591  //~ "channel",
592  //~ externalChannelId_[ ic ],
593  //~ filter,
594  //~ false // include = false. That is, use filter to exclude.
595  //~ );
596 }
597 
599 {
600  vector< Id > targets;
601  vector< string > filter;
602 
603  /*
604  * Going through all comparments, and finding out which ones have external
605  * targets through the VmOut msg. External refers to objects that do not
606  * belong the cell being managed by this HSolve. We find these by excluding
607  * any HHChannels and SpikeGens from the VmOut targets. These will then
608  * be used in HSolveActive::sendValues() to send out the messages behalf of
609  * the original objects.
610  */
611  filter.push_back( "HHChannel" );
612  filter.push_back( "SpikeGen" );
613  for ( unsigned int ic = 0; ic < compartmentId_.size(); ++ic )
614  {
615  targets.clear();
616 
617  int nTargets = HSolveUtils::targets(
618  compartmentId_[ ic ],
619  "VmOut",
620  targets,
621  filter,
622  false // include = false. That is, use filter to exclude.
623  );
624 
625  if ( nTargets )
626  outVm_.push_back( ic );
627  }
628 
629  /*
630  * As before, going through all CaConcs, and finding any which have external
631  * targets.
632  */
633  filter.clear();
634  filter.push_back( "HHChannel" );
635  for ( unsigned int ica = 0; ica < caConcId_.size(); ++ica )
636  {
637  targets.clear();
638 
639  int nTargets = HSolveUtils::targets(
640  caConcId_[ ica ],
641  "concOut",
642  targets,
643  filter,
644  false // include = false. That is, use filter to exclude.
645  );
646 
647  if ( nTargets )
648  outCa_.push_back( ica );
649  }
650 
651  filter.clear();
652  filter.push_back( "CaConc" );
653 
654  for ( unsigned int ik = 0; ik < channelId_.size(); ++ik )
655  {
656  targets.clear();
657 
658  int nTargets = HSolveUtils::targets(
659  channelId_[ ik ],
660  "IkOut",
661  targets,
662  filter,
663  false // include = false. That is, use filter to exclude.
664  );
665 
666  if ( nTargets )
667  outIk_.push_back( ik );
668 
669 
670  }
671 
672 
673 
674 }
675 
677 {
678 // compartmentId_.clear();
679  gCaDepend_.clear();
680  caDependIndex_.clear();
681 }
vector< double > state_
Fraction of gates open.
Definition: HSolveActive.h:74
vector< unsigned int > chan2state_
a state index
Definition: HSolveActive.h:117
static int caDepend(Id channel, vector< Id > &ret)
unsigned int compt_
Definition: HSolveStruct.h:133
vector< unsigned int > outCa_
Definition: HSolveActive.h:131
vector< LookupRow > caRowCompt_
Definition: HSolveActive.h:97
bool bad() const
Definition: ObjId.cpp:18
vector< double > ca_
Ca conc in each pool.
Definition: HSolveActive.h:81
static int spikegens(Id compartment, vector< Id > &ret)
void setup(Id seed, double dt)
static int caTarget(Id channel, vector< Id > &ret)
vector< double > caActivation_
calcium pool
Definition: HSolveActive.h:82
vector< bool > gCaDepend_
depend on Ca conc?
Definition: HSolveActive.h:89
void lookup(const LookupColumn &column, const LookupRow &row, double &C1, double &C2)
Actually performs the lookup and the linear interpolation.
Definition: RateLookup.cpp:76
vector< unsigned int > outVm_
Definition: HSolveActive.h:127
LookupTable caTable_
Definition: HSolveActive.h:88
vector< ChannelStruct > channel_
to compartment: chan2compt
Definition: HSolveActive.h:76
vector< int > channelCount_
compartment
Definition: HSolveActive.h:109
void sendValues(ProcPtr info)
Definition: ObjId.h:20
vector< Id > compartmentId_
Definition: HSolvePassive.h:37
unsigned int nCompt_
Definition: HinesMatrix.h:70
vector< int > caDependIndex_
depdt channel depend upon?
Definition: HSolveActive.h:93
static int gates(Id channel, vector< Id > &ret, bool getOriginals=true)
Definition: HSolveUtils.cpp:75
void setup(Id seed, double dt)
void reinit(ProcPtr info)
unsigned int size()
vector< Id > gateId_
Used for localIndex-ing.
Definition: HSolveActive.h:125
static int targets(Id object, string msg, vector< Id > &target, string filter="", bool include=true)
static const Cinfo * initCinfo()
Definition: SpikeGen.cpp:22
vector< double * > caTarget_
Definition: HSolveActive.h:84
void row(double x, LookupRow &row)
Definition: RateLookup.cpp:62
vector< double > V_
Definition: HSolvePassive.h:38
vector< CaConcStruct > caConc_
Ca pool info.
Definition: HSolveActive.h:80
double vMin_
Definition: HSolveActive.h:63
static void deleteMsg(ObjId mid)
Definition: Msg.cpp:52
void reinitSpikeGens(ProcPtr info)
vector< LookupRow * > caRow_
Definition: HSolveActive.h:104
FuncId getFid() const
Definition: DestFinfo.cpp:45
static void rates(Id gate, Grid grid, vector< double > &A, vector< double > &B)
LookupTable vTable_
Definition: HSolveActive.h:87
vector< TreeNodeStruct > tree_
Definition: HSolvePassive.h:41
void setPowers(double Xpower, double Ypower, double Zpower)
void addColumns(int species, const vector< double > &C1, const vector< double > &C2)
Adds the columns for a given species. Columns supplied are C1 and C2.
Definition: RateLookup.cpp:31
vector< double > externalCalcium_
Definition: HSolveActive.h:122
static int synchans(Id compartment, vector< Id > &ret)
vector< currentVecIter > currentBoundary_
Definition: HSolveActive.h:111
vector< unsigned int > chan2compt_
Definition: HSolveActive.h:114
double caMin_
Definition: HSolveActive.h:66
void column(unsigned int species, LookupColumn &column)
Definition: RateLookup.cpp:56
double caMax_
Definition: HSolveActive.h:67
static int hhchannels(Id compartment, vector< Id > &ret)
Definition: HSolveUtils.cpp:64
void manageOutgoingMessages()
vector< double > externalCurrent_
Definition: HSolveActive.h:119
vector< SynChanStruct > synchan_
Definition: HSolveActive.h:79
vector< SpikeGenStruct > spikegen_
Definition: HSolveActive.h:78
Definition: Id.h:17
vector< unsigned int > outIk_
Definition: HSolveActive.h:135
static A get(const ObjId &dest, const string &field)
Definition: SetGet.h:284
vector< Id > channelId_
Used for localIndex-ing.
Definition: HSolveActive.h:124
vector< unsigned int > caCount_
each compartment
Definition: HSolveActive.h:91
vector< CurrentStruct > current_
Channel current.
Definition: HSolveActive.h:73
vector< LookupColumn > column_
to lookup for this species
Definition: HSolveActive.h:95
vector< Id > caConcId_
calcium from difshells
Definition: HSolveActive.h:123
double vMax_
Definition: HSolveActive.h:64
double modulation_
Definition: HSolveStruct.h:77
const Finfo * findFinfo(const string &name) const
Definition: Cinfo.cpp:224
double dt_
Definition: HinesMatrix.h:71
Definition: Finfo.h:12