Skip to content

Commit

Permalink
Merge pull request #3249 from clinssen/aeif_timestep_note
Browse files Browse the repository at this point in the history
Remove pointless initialisation of integration step size
  • Loading branch information
clinssen authored Dec 9, 2024
2 parents fad7374 + 5ae5658 commit 149626e
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 32 deletions.
6 changes: 3 additions & 3 deletions models/aeif_cond_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ nest::aeif_cond_alpha::init_buffers_()
B_.logger_.reset();

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.s_ )
{
Expand Down
6 changes: 3 additions & 3 deletions models/aeif_cond_alpha_astro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ nest::aeif_cond_alpha_astro::init_buffers_()
B_.logger_.reset();

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.s_ )
{
Expand Down
8 changes: 4 additions & 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 @@ -416,9 +416,9 @@ aeif_cond_alpha_multisynapse::init_buffers_()
B_.logger_.reset();

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.c_ )
{
Expand Down
8 changes: 4 additions & 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 @@ -424,9 +424,9 @@ aeif_cond_beta_multisynapse::init_buffers_()
B_.logger_.reset();

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

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

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.s_ )
{
Expand Down
6 changes: 3 additions & 3 deletions models/aeif_psc_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ nest::aeif_psc_alpha::init_buffers_()
B_.logger_.reset();

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.s_ )
{
Expand Down
6 changes: 3 additions & 3 deletions models/aeif_psc_delta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ nest::aeif_psc_delta::init_buffers_()
B_.logger_.reset();

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.s_ )
{
Expand Down
6 changes: 3 additions & 3 deletions models/aeif_psc_delta_clopath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ nest::aeif_psc_delta_clopath::init_buffers_()
B_.logger_.reset();

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.s_ )
{
Expand Down
6 changes: 3 additions & 3 deletions models/aeif_psc_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ nest::aeif_psc_exp::init_buffers_()
B_.logger_.reset();

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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.s_ )
{
Expand Down
7 changes: 4 additions & 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,9 @@ 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_ );
B_.IntegrationStep_ =
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data

if ( not B_.c_ )
{
Expand Down

0 comments on commit 149626e

Please sign in to comment.