示例#1
0
文件: nrnste.cpp 项目: PNCG/neuron
void STETransition::event() {
	ste_->state(dest_);
	if (hc_) {
		nrn_hoc_lock();
		hc_->execute();
		nrn_hoc_unlock();
	}
}
示例#2
0
void VecPlayContinuous::continuous(double tt) {
	if (si_) {
		t = tt;
		nrn_hoc_lock();
		si_->play_one(interpolate(tt));
		nrn_hoc_unlock();
	}else{
		*pd_ = interpolate(tt);
	}
}
示例#3
0
void VecPlayStep::deliver(double tt, NetCvode* ns) {
	NrnThread* nt = nrn_threads;
	if (cvode_) {
		cvode_->set_init_flag();
		if (cvode_->nth_) { nt = cvode_->nth_; }
	}
	if (si_) {
		t = tt;
		nrn_hoc_lock();
		si_->play_one(y_->elem(current_index_++));
		nrn_hoc_unlock();
	}else{
		*pd_ = y_->elem(current_index_++);
	}
	if (current_index_ < y_->capacity()) {
		if (t_) {
			if (current_index_ < t_->capacity()) {
				e_->send(t_->elem(current_index_), ns, nt);
			}
		}else{
			e_->send(tt + dt_, ns, nt);
		}
	}
}