예제 #1
0
static void _hoc_vtrap(void) {
  double _r;
   double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt;
   if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; }
  _thread = _extcall_thread;
  _nt = nrn_threads;
 _r =  vtrap ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) );
 hoc_retpushx(_r);
}
예제 #2
0
static int  rates ( _threadargsprotocomma_ double _lv ) {
   double _lalpha , _lbeta , _lsum , _lq10 ;
  _lq10 = pow( 3.0 , ( ( localtemp - 6.3 ) / 10.0 ) ) ;
   _lalpha = .1 * vtrap ( _threadargscomma_ - ( _lv + 40.0 ) , 10.0 ) ;
   _lbeta = 4.0 * exp ( - ( _lv + 65.0 ) / 18.0 ) ;
   _lsum = _lalpha + _lbeta ;
   mtau = 1.0 / ( _lq10 * _lsum ) ;
   minf = _lalpha / _lsum ;
   _lalpha = .07 * exp ( - ( _lv + 65.0 ) / 20.0 ) ;
   _lbeta = 1.0 / ( exp ( - ( _lv + 35.0 ) / 10.0 ) + 1.0 ) ;
   _lsum = _lalpha + _lbeta ;
   htau = 1.0 / ( _lq10 * _lsum ) ;
   hinf = _lalpha / _lsum ;
   _lalpha = .01 * vtrap ( _threadargscomma_ - ( _lv + 55.0 ) , 10.0 ) ;
   _lbeta = .125 * exp ( - ( _lv + 65.0 ) / 80.0 ) ;
   _lsum = _lalpha + _lbeta ;
   ntau = 1.0 / ( _lq10 * _lsum ) ;
   ninf = _lalpha / _lsum ;
    return 0; }
static int  _f_rates ( _threadargsprotocomma_ double _lv ) {
   double _lalpha , _lbeta , _ltau , _linf , _lgamma , _lzeta , _ltemp_adj_m , _lA_alpha_m , _lB_alpha_m , _lVhalf_alpha_m , _lA_beta_m , _lB_beta_m , _lVhalf_beta_m , _ltemp_adj_h , _lA_alpha_h , _lB_alpha_h , _lVhalf_alpha_h , _lA_beta_h , _lB_beta_h , _lVhalf_beta_h , _lA_inf_h , _lB_inf_h , _lVhalf_inf_h ;
  _ltemp_adj_m = pow( 2.0 , ( ( celsius - 24.0 ) / 10.0 ) ) ;
   _ltemp_adj_h = pow( 2.0 , ( ( celsius - 24.0 ) / 10.0 ) ) ;
   _lA_alpha_m = 2.880000018 ;
   _lB_alpha_m = 7.2 ;
   _lVhalf_alpha_m = - 20.0 ;
   _lalpha = _lA_alpha_m * vtrap ( _threadargscomma_ ( _lv - _lVhalf_alpha_m ) , _lB_alpha_m ) ;
   _lA_beta_m = 0.892800005 ;
   _lB_beta_m = - 7.2 ;
   _lVhalf_beta_m = - 20.0 ;
   _lbeta = _lA_beta_m * vtrap ( _threadargscomma_ ( _lv - _lVhalf_beta_m ) , _lB_beta_m ) ;
   if ( 1.0 / ( ( _lalpha + _lbeta ) * _ltemp_adj_m ) < 0.02 ) {
     _ltau = ( 0.02 * _ltemp_adj_m ) ;
     }
   else {
     _ltau = 1.0 / ( _lalpha + _lbeta ) ;
     }
   mtau = _ltau / _ltemp_adj_m ;
   minf = _lalpha / ( _lalpha + _lbeta ) ;
   _lA_alpha_h = 0.045 ;
   _lB_alpha_h = 1.5 ;
   _lVhalf_alpha_h = - 35.0 ;
   _lalpha = _lA_alpha_h * vtrap ( _threadargscomma_ ( _lv - _lVhalf_alpha_h ) , _lB_alpha_h ) ;
   _lA_beta_h = 0.015 ;
   _lB_beta_h = - 1.5 ;
   _lVhalf_beta_h = - 35.0 ;
   _lbeta = _lA_beta_h * vtrap ( _threadargscomma_ ( _lv - _lVhalf_beta_h ) , _lB_beta_h ) ;
   if ( 1.0 / ( ( _lalpha + _lbeta ) * _ltemp_adj_h ) < 0.5 ) {
     _ltau = ( 0.5 * _ltemp_adj_h ) ;
     }
   else {
     _ltau = 1.0 / ( _lalpha + _lbeta ) ;
     }
   htau = _ltau / _ltemp_adj_h ;
   _lA_inf_h = 1.0 ;
   _lB_inf_h = 4.0 ;
   _lVhalf_inf_h = - 40.0 ;
   _linf = _lA_inf_h / ( exp ( ( _lv - _lVhalf_inf_h ) / _lB_inf_h ) + 1.0 ) ;
   hinf = _linf ;
    return 0; }
예제 #4
0
파일: kht.c 프로젝트: Maliboue/Spencermodel
static void _hoc_vtrap(void) {
  double _r;
   _r =  vtrap (  *getarg(1) , *getarg(2) );
 hoc_retpushx(_r);
}