Skip to content

Commit 5ae5658

Browse files
author
C.A.P. Linssen
committed
remove pointless initialisation of integration step size to max 0.01 ms
1 parent 1275fce commit 5ae5658

10 files changed

+33
-32
lines changed

models/aeif_cond_alpha.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ nest::aeif_cond_alpha::init_buffers_()
384384
B_.logger_.reset();
385385

386386
B_.step_ = Time::get_resolution().get_ms();
387-
388-
// We must integrate this model with high-precision to obtain decent results
389-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
387+
B_.IntegrationStep_ =
388+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
389+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
390390

391391
if ( not B_.s_ )
392392
{

models/aeif_cond_alpha_astro.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,9 @@ nest::aeif_cond_alpha_astro::init_buffers_()
386386
B_.logger_.reset();
387387

388388
B_.step_ = Time::get_resolution().get_ms();
389-
390-
// We must integrate this model with high-precision to obtain decent results
391-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
389+
B_.IntegrationStep_ =
390+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
391+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
392392

393393
if ( not B_.s_ )
394394
{

models/aeif_cond_alpha_multisynapse.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ aeif_cond_alpha_multisynapse::Buffers_::Buffers_( aeif_cond_alpha_multisynapse&
347347
, c_( nullptr )
348348
, e_( nullptr )
349349
, step_( Time::get_resolution().get_ms() )
350-
, IntegrationStep_( std::min( 0.01, step_ ) )
350+
, IntegrationStep_( step_ )
351351
, I_stim_( 0.0 )
352352
{
353353
}
@@ -416,9 +416,9 @@ aeif_cond_alpha_multisynapse::init_buffers_()
416416
B_.logger_.reset();
417417

418418
B_.step_ = Time::get_resolution().get_ms();
419-
420-
// We must integrate this model with high-precision to obtain decent results
421-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
419+
B_.IntegrationStep_ =
420+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
421+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
422422

423423
if ( not B_.c_ )
424424
{

models/aeif_cond_beta_multisynapse.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ aeif_cond_beta_multisynapse::Buffers_::Buffers_( aeif_cond_beta_multisynapse& n
355355
, c_( nullptr )
356356
, e_( nullptr )
357357
, step_( Time::get_resolution().get_ms() )
358-
, IntegrationStep_( std::min( 0.01, step_ ) )
358+
, IntegrationStep_( step_ )
359359
, I_stim_( 0.0 )
360360
{
361361
}
@@ -424,9 +424,9 @@ aeif_cond_beta_multisynapse::init_buffers_()
424424
B_.logger_.reset();
425425

426426
B_.step_ = Time::get_resolution().get_ms();
427-
428-
// We must integrate this model with high-precision to obtain decent results
429-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
427+
B_.IntegrationStep_ =
428+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
429+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
430430

431431
if ( not B_.c_ )
432432
{

models/aeif_cond_exp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,9 @@ nest::aeif_cond_exp::init_buffers_()
379379
B_.logger_.reset();
380380

381381
B_.step_ = Time::get_resolution().get_ms();
382-
383-
// We must integrate this model with high-precision to obtain decent results
384-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
382+
B_.IntegrationStep_ =
383+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
384+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
385385

386386
if ( not B_.s_ )
387387
{

models/aeif_psc_alpha.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ nest::aeif_psc_alpha::init_buffers_()
374374
B_.logger_.reset();
375375

376376
B_.step_ = Time::get_resolution().get_ms();
377-
378-
// We must integrate this model with high-precision to obtain decent results
379-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
377+
B_.IntegrationStep_ =
378+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
379+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
380380

381381
if ( not B_.s_ )
382382
{

models/aeif_psc_delta.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,9 @@ nest::aeif_psc_delta::init_buffers_()
351351
B_.logger_.reset();
352352

353353
B_.step_ = Time::get_resolution().get_ms();
354-
355-
// We must integrate this model with high-precision to obtain decent results
356-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
354+
B_.IntegrationStep_ =
355+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
356+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
357357

358358
if ( not B_.s_ )
359359
{

models/aeif_psc_delta_clopath.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,9 @@ nest::aeif_psc_delta_clopath::init_buffers_()
417417
B_.logger_.reset();
418418

419419
B_.step_ = Time::get_resolution().get_ms();
420-
421-
// We must integrate this model with high-precision to obtain decent results
422-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
420+
B_.IntegrationStep_ =
421+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
422+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
423423

424424
if ( not B_.s_ )
425425
{

models/aeif_psc_exp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ nest::aeif_psc_exp::init_buffers_()
369369
B_.logger_.reset();
370370

371371
B_.step_ = Time::get_resolution().get_ms();
372-
373-
// We must integrate this model with high-precision to obtain decent results
374-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
372+
B_.IntegrationStep_ =
373+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
374+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
375375

376376
if ( not B_.s_ )
377377
{

models/glif_cond.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ nest::glif_cond::Buffers_::Buffers_( glif_cond& n )
465465
, c_( nullptr )
466466
, e_( nullptr )
467467
, step_( Time::get_resolution().get_ms() )
468-
, IntegrationStep_( std::min( 0.01, step_ ) )
468+
, IntegrationStep_( step_ )
469469
, I_( 0.0 )
470470
{
471471
}
@@ -534,8 +534,9 @@ nest::glif_cond::init_buffers_()
534534
B_.logger_.reset(); // includes resize
535535

536536
B_.step_ = Time::get_resolution().get_ms();
537-
// We must integrate this model with high-precision to obtain decent results
538-
B_.IntegrationStep_ = std::min( 0.01, B_.step_ );
537+
B_.IntegrationStep_ =
538+
B_.step_; // reasonable initial value for numerical integrator step size; this will anyway be overwritten by
539+
// gsl_odeiv_evolve_apply(), but it might confuse the integrator if it contains uninitialised data
539540

540541
if ( not B_.c_ )
541542
{

0 commit comments

Comments
 (0)