Skip to content

Commit 6471863

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

10 files changed

+12
-32
lines changed

models/aeif_cond_alpha.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,7 @@ 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_ = 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
390388

391389
if ( not B_.s_ )
392390
{

models/aeif_cond_alpha_astro.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,7 @@ 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_ = 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
392390

393391
if ( not B_.s_ )
394392
{

models/aeif_cond_alpha_multisynapse.cpp

Lines changed: 2 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,7 @@ 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_ = 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
422420

423421
if ( not B_.c_ )
424422
{

models/aeif_cond_beta_multisynapse.cpp

Lines changed: 2 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,7 @@ 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_ = 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
430428

431429
if ( not B_.c_ )
432430
{

models/aeif_cond_exp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,7 @@ 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_ = 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
385383

386384
if ( not B_.s_ )
387385
{

models/aeif_psc_alpha.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,7 @@ 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_ = 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
380378

381379
if ( not B_.s_ )
382380
{

models/aeif_psc_delta.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,7 @@ 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_ = 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
357355

358356
if ( not B_.s_ )
359357
{

models/aeif_psc_delta_clopath.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,7 @@ 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_ = 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
423421

424422
if ( not B_.s_ )
425423
{

models/aeif_psc_exp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,7 @@ 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_ = 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
375373

376374
if ( not B_.s_ )
377375
{

models/glif_cond.cpp

Lines changed: 1 addition & 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,6 @@ 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_ );
539537

540538
if ( not B_.c_ )
541539
{

0 commit comments

Comments
 (0)