コード例 #1
0
ファイル: fadvance.c プロジェクト: stephanmg/neuron
void* nrn_fixed_step_thread(NrnThread* nth) {
	double wt;
	deliver_net_events(nth);
	wt = nrnmpi_wtime();
	nrn_random_play(nth);
#if ELIMINATE_T_ROUNDOFF
	nth->nrn_ndt_ += .5;
	nth->_t = nrn_tbase_ + nth->nrn_ndt_ * nrn_dt_;
#else
	nth->_t += .5 * nth->_dt;
#endif
	fixed_play_continuous(nth);
	setup_tree_matrix(nth);
	nrn_solve(nth);
	second_order_cur(nth);
	update(nth);
	CTADD
/*
  To simplify the logic,
  if there is no nrnthread_v_transfer then there cannot be an nrnmpi_v_transfer.
*/
	if (!nrnthread_v_transfer_) {
		nrn_fixed_step_lastpart(nth);
	}
	return (void*)0;
}
コード例 #2
0
ファイル: cvodestb.cpp プロジェクト: nrnhines/nrn
void cvode_fadvance(double tstop) { // tstop = -1 means single step
#if USECVODE
	int err;
	if (net_cvode_instance) {
		nrn_random_play();
		err = net_cvode_instance->solve(tstop);
		if (err != 0) {
			printf("err=%d\n", err);
			hoc_execerror("variable step integrator error", 0);
		}
		t = nt_t;
		dt = nt_dt;
	}
#endif
}
コード例 #3
0
ファイル: fadvance.c プロジェクト: stephanmg/neuron
void* nrn_ms_treeset_through_triang(NrnThread* nth) {
	double wt;
	deliver_net_events(nth);
	wt = nrnmpi_wtime();
	nrn_random_play(nth);
#if ELIMINATE_T_ROUNDOFF
	nth->nrn_ndt_ += .5;
	nth->_t = nrn_tbase_ + nth->nrn_ndt_ * nrn_dt_;
#else
	nth->_t += .5 * nth->_dt;
#endif
	fixed_play_continuous(nth);
	setup_tree_matrix(nth);
	nrn_multisplit_triang(nth);
	CTADD
	return (void*)0;
}