Skip to content

Commit

Permalink
fixed bug and extended wfr_settings unittest accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
janhahne committed Mar 11, 2016
1 parent 4111921 commit 328c6d8
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/hh_psc_alpha_gap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ nest::hh_psc_alpha_gap::hh_psc_alpha_gap()
, S_( P_ )
, B_( *this )
{
Node::set_node_uses_wfr( kernel().simulation_manager.use_wfr() );
recordablesMap_.create();
Node::set_node_uses_wfr( kernel().simulation_manager.use_wfr() );
}

nest::hh_psc_alpha_gap::hh_psc_alpha_gap( const hh_psc_alpha_gap& n )
Expand All @@ -336,6 +336,7 @@ nest::hh_psc_alpha_gap::hh_psc_alpha_gap( const hh_psc_alpha_gap& n )
, S_( n.S_ )
, B_( n.B_, *this )
{
Node::set_node_uses_wfr( kernel().simulation_manager.use_wfr() );
}

nest::hh_psc_alpha_gap::~hh_psc_alpha_gap()
Expand Down
36 changes: 36 additions & 0 deletions testsuite/unittests/test_wfr_settings.sli
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- wfr_comm_interval can only be set greater or equal the resolution and if use_wfr = true
- setting of use_wfr = false sets wfr_comm_interval to resolution
- wfr_comm_interval is updated when resolution is changed and use_wfr = false
- use_wfr is set correctly in created nodes

Author: Jan Hahne, March 2016
SeeAlso: testsuite::test_hh_psc_alpha_gap, hh_psc_alpha_gap, gap_junction
Expand Down Expand Up @@ -106,4 +107,39 @@ ResetKernel

{wfr_comm 0.1 neq}assert_or_die

% The now following test needs the model hh_psc_alpha_gap, so
% this test should only run if we have GSL
statusdict/have_gsl :: not
{
exit_test_gracefully
}
if

ResetKernel

% Check that setting of use_wfr is correctly set in created nodes
% case use_wfr = true
0 << /use_wfr true >> SetStatus

/hh_psc_alpha_gap Create /neuron_gap Set

5.0 Simulate

neuron_gap /node_uses_wfr get /wfr Set

{wfr true eq}assert_or_die

ResetKernel

% case use_wfr = false
0 << /use_wfr false >> SetStatus

/hh_psc_alpha_gap Create /neuron_gap Set

5.0 Simulate

neuron_gap /node_uses_wfr get /wfr Set

{wfr false eq}assert_or_die

endusing

0 comments on commit 328c6d8

Please sign in to comment.