Skip to content

Commit

Permalink
remove pointless initialisation of integration step size to max 0.01 ms
Browse files Browse the repository at this point in the history
  • Loading branch information
C.A.P. Linssen committed Dec 9, 2024
1 parent 1275fce commit c5f58fb
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 32 deletions.
3 changes: 0 additions & 3 deletions models/aeif_cond_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,6 @@ nest::aeif_cond_alpha::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.s_ )
{
B_.s_ = gsl_odeiv_step_alloc( gsl_odeiv_step_rkf45, State_::STATE_VEC_SIZE );
Expand Down
3 changes: 0 additions & 3 deletions models/aeif_cond_alpha_astro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,6 @@ nest::aeif_cond_alpha_astro::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.s_ )
{
B_.s_ = gsl_odeiv_step_alloc( gsl_odeiv_step_rkf45, State_::STATE_VEC_SIZE );
Expand Down
5 changes: 1 addition & 4 deletions models/aeif_cond_alpha_multisynapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ aeif_cond_alpha_multisynapse::Buffers_::Buffers_( aeif_cond_alpha_multisynapse&
, c_( nullptr )
, e_( nullptr )
, step_( Time::get_resolution().get_ms() )
, IntegrationStep_( std::min( 0.01, step_ ) )
, IntegrationStep_( step_ )
, I_stim_( 0.0 )
{
}
Expand Down Expand Up @@ -417,9 +417,6 @@ aeif_cond_alpha_multisynapse::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.c_ )
{
B_.c_ = gsl_odeiv_control_yp_new( P_.gsl_error_tol, P_.gsl_error_tol );
Expand Down
5 changes: 1 addition & 4 deletions models/aeif_cond_beta_multisynapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ aeif_cond_beta_multisynapse::Buffers_::Buffers_( aeif_cond_beta_multisynapse& n
, c_( nullptr )
, e_( nullptr )
, step_( Time::get_resolution().get_ms() )
, IntegrationStep_( std::min( 0.01, step_ ) )
, IntegrationStep_( step_ )
, I_stim_( 0.0 )
{
}
Expand Down Expand Up @@ -425,9 +425,6 @@ aeif_cond_beta_multisynapse::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.c_ )
{
B_.c_ = gsl_odeiv_control_yp_new( P_.gsl_error_tol, P_.gsl_error_tol );
Expand Down
3 changes: 0 additions & 3 deletions models/aeif_cond_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,6 @@ nest::aeif_cond_exp::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.s_ )
{
B_.s_ = gsl_odeiv_step_alloc( gsl_odeiv_step_rkf45, State_::STATE_VEC_SIZE );
Expand Down
3 changes: 0 additions & 3 deletions models/aeif_psc_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,6 @@ nest::aeif_psc_alpha::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.s_ )
{
B_.s_ = gsl_odeiv_step_alloc( gsl_odeiv_step_rkf45, State_::STATE_VEC_SIZE );
Expand Down
3 changes: 0 additions & 3 deletions models/aeif_psc_delta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,6 @@ nest::aeif_psc_delta::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.s_ )
{
B_.s_ = gsl_odeiv_step_alloc( gsl_odeiv_step_rkf45, State_::STATE_VEC_SIZE );
Expand Down
3 changes: 0 additions & 3 deletions models/aeif_psc_delta_clopath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,6 @@ nest::aeif_psc_delta_clopath::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.s_ )
{
B_.s_ = gsl_odeiv_step_alloc( gsl_odeiv_step_rkf45, State_::STATE_VEC_SIZE );
Expand Down
3 changes: 0 additions & 3 deletions models/aeif_psc_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,6 @@ nest::aeif_psc_exp::init_buffers_()

B_.step_ = Time::get_resolution().get_ms();

// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.s_ )
{
B_.s_ = gsl_odeiv_step_alloc( gsl_odeiv_step_rkf45, State_::STATE_VEC_SIZE );
Expand Down
4 changes: 1 addition & 3 deletions models/glif_cond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ nest::glif_cond::Buffers_::Buffers_( glif_cond& n )
, c_( nullptr )
, e_( nullptr )
, step_( Time::get_resolution().get_ms() )
, IntegrationStep_( std::min( 0.01, step_ ) )
, IntegrationStep_( step_ )
, I_( 0.0 )
{
}
Expand Down Expand Up @@ -534,8 +534,6 @@ nest::glif_cond::init_buffers_()
B_.logger_.reset(); // includes resize

B_.step_ = Time::get_resolution().get_ms();
// We must integrate this model with high-precision to obtain decent results
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );

if ( not B_.c_ )
{
Expand Down

0 comments on commit c5f58fb

Please sign in to comment.