From 1963634e9e39c9e4b610b4ae742cb8c329a09edc Mon Sep 17 00:00:00 2001 From: Sam Yates <yates@cscs.ch> Date: Tue, 13 Dec 2016 20:05:29 +0100 Subject: [PATCH] Re-instate ball-and-taper validation tests. (#124) Fixes #85 --- tests/validation/validate_ball_and_stick.cpp | 4 ++++ tests/validation/validate_ball_and_stick.cu | 4 ++++ tests/validation/validate_ball_and_stick.hpp | 22 +++++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/validation/validate_ball_and_stick.cpp b/tests/validation/validate_ball_and_stick.cpp index 0e31bcaa..109155a6 100644 --- a/tests/validation/validate_ball_and_stick.cpp +++ b/tests/validation/validate_ball_and_stick.cpp @@ -9,6 +9,10 @@ TEST(ball_and_stick, neuron_ref) { validate_ball_and_stick<lowered_cell>(); } +TEST(ball_and_taper, neuron_ref) { + validate_ball_and_taper<lowered_cell>(); +} + TEST(ball_and_3stick, neuron_ref) { validate_ball_and_3stick<lowered_cell>(); } diff --git a/tests/validation/validate_ball_and_stick.cu b/tests/validation/validate_ball_and_stick.cu index b753b6b5..52d1bf0d 100644 --- a/tests/validation/validate_ball_and_stick.cu +++ b/tests/validation/validate_ball_and_stick.cu @@ -9,6 +9,10 @@ TEST(ball_and_stick, neuron_ref) { validate_ball_and_stick<lowered_cell>(); } +TEST(ball_and_taper, neuron_ref) { + validate_ball_and_taper<lowered_cell>(); +} + TEST(ball_and_3stick, neuron_ref) { validate_ball_and_3stick<lowered_cell>(); } diff --git a/tests/validation/validate_ball_and_stick.hpp b/tests/validation/validate_ball_and_stick.hpp index bed16d4d..0a438f9d 100644 --- a/tests/validation/validate_ball_and_stick.hpp +++ b/tests/validation/validate_ball_and_stick.hpp @@ -59,7 +59,6 @@ void run_ncomp_convergence_test( runner.assert_all_convergence(); } - template <typename LoweredCell> void validate_ball_and_stick() { using namespace nest::mc; @@ -81,6 +80,27 @@ void validate_ball_and_stick() { samplers); } +template <typename LoweredCell> +void validate_ball_and_taper() { + using namespace nest::mc; + + cell c = make_cell_ball_and_taper(); + add_common_voltage_probes(c); + + float sample_dt = 0.025f; + sampler_info samplers[] = { + {"soma.mid", {0u, 0u}, simple_sampler(sample_dt)}, + {"taper.mid", {0u, 1u}, simple_sampler(sample_dt)}, + {"taper.end", {0u, 2u}, simple_sampler(sample_dt)} + }; + + run_ncomp_convergence_test<LoweredCell>( + "ball_and_taper", + "neuron_ball_and_taper.json", + c, + samplers); +} + template <typename LoweredCell> void validate_ball_and_3stick() { using namespace nest::mc; -- GitLab