Skip to content

Remove pointless initialisation of integration step size #3249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading