diff --git a/src/fvm_multicell.hpp b/src/fvm_multicell.hpp index ee3363d4772c696d522277588f06103dec3178a3..fcad113b5f8b8a35a23e326d7ff6654aebe3b83c 100644 --- a/src/fvm_multicell.hpp +++ b/src/fvm_multicell.hpp @@ -45,7 +45,7 @@ inline int find_cv_index(const segment_location& loc, const compartment_model& g return index; }; -template <typename Value, typename Index, typename DivPolicy=div_compartment_integrator> +template <typename Value, typename Index> class fvm_multicell { public: fvm_multicell() = default; @@ -247,16 +247,12 @@ private: //////////////////////////////// Implementation //////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -template <typename T, typename I, typename DivPolicy> -void fvm_multicell<T, I, DivPolicy>::compute_cv_area_unnormalized_capacitance( +template <typename T, typename I> +void fvm_multicell<T, I>::compute_cv_area_unnormalized_capacitance( std::pair<size_type, size_type> comp_ival, const segment* seg, index_type &parent) { - using util::left; - using util::right; - using util::size; - // precondition: group_parent_index[j] holds the correct value for // j in [base_comp, base_comp+segment.num_compartments()]. @@ -307,7 +303,7 @@ void fvm_multicell<T, I, DivPolicy>::compute_cv_area_unnormalized_capacitance( auto c_m = cable->mechanism("membrane").get("c_m").value; auto r_L = cable->mechanism("membrane").get("r_L").value; - auto divs = div_compartments<DivPolicy>(cable, ncomp); + auto divs = div_compartments<div_compartment_integrator>(cable, ncomp); for (auto i: util::make_span(comp_ival)) { const auto& div = divs(i-comp_ival.first); @@ -343,9 +339,6 @@ void fvm_multicell<T, I, DivPolicy>::compute_cv_area_unnormalized_capacitance( auto conductance = 1/r_L*h*V1*V2/(h2*h2*V1+h1*h1*V2); face_alpha_[i] = conductance / (c_m * h); - // auto halflen = c.length/2; - // auto al = math::area_frustrum(halflen, left(c.radius), radius_center); - // auto ar = math::area_frustrum(halflen, right(c.radius), radius_center); auto al = div.left.area; auto ar = div.right.area; @@ -360,9 +353,9 @@ void fvm_multicell<T, I, DivPolicy>::compute_cv_area_unnormalized_capacitance( } } -template <typename T, typename I, typename DivPolicy> +template <typename T, typename I> template <typename Cells, typename Detectors, typename Targets, typename Probes> -void fvm_multicell<T, I, DivPolicy>::initialize( +void fvm_multicell<T, I>::initialize( const Cells& cells, Detectors& detector_handles, Targets& target_handles, @@ -611,8 +604,8 @@ void fvm_multicell<T, I, DivPolicy>::initialize( reset(); } -template <typename T, typename I, typename DivPolicy> -void fvm_multicell<T, I, DivPolicy>::setup_matrix(T dt) { +template <typename T, typename I> +void fvm_multicell<T, I>::setup_matrix(T dt) { using memory::all; // convenience accesors to matrix storage @@ -655,8 +648,8 @@ void fvm_multicell<T, I, DivPolicy>::setup_matrix(T dt) { } } -template <typename T, typename I, typename DivPolicy> -void fvm_multicell<T, I, DivPolicy>::reset() { +template <typename T, typename I> +void fvm_multicell<T, I>::reset() { voltage_(memory::all) = resting_potential_; t_ = 0.; for (auto& m : mechanisms_) { @@ -664,8 +657,8 @@ void fvm_multicell<T, I, DivPolicy>::reset() { } } -template <typename T, typename I, typename DivPolicy> -void fvm_multicell<T, I, DivPolicy>::advance(T dt) { +template <typename T, typename I> +void fvm_multicell<T, I>::advance(T dt) { using memory::all; PE("current"); diff --git a/tests/validation/trace_analysis.cpp b/tests/validation/trace_analysis.cpp index ba024ea660ac6b2756c91de2fe11fef066f5dc3d..78ef5ada3ff39e8155aa9db97181274fb0fef118 100644 --- a/tests/validation/trace_analysis.cpp +++ b/tests/validation/trace_analysis.cpp @@ -48,12 +48,10 @@ double linf_distance(const trace_data& u, const trace_data& ref) { [&](trace_entry x) { return std::abs(x.v-f(x.t)); })); } -/* - * Compute linf distance as above, but excluding sample points that lie - * near points in `excl`. - * - * `excl` contains the times to exclude, in ascending order. - */ +// Compute linf distance as above, but excluding sample points that lie +// near points in `excl`. +// +// `excl` contains the times to exclude, in ascending order. double linf_distance(const trace_data& u, const trace_data& ref, const std::vector<float>& excl) { trace_interpolant f{ref}; diff --git a/tests/validation/validate_ball_and_stick.cpp b/tests/validation/validate_ball_and_stick.cpp index 015aad960dd6e06d2e98417d57fcdfa4912bd7f9..788b78745bb949b79b64e86ac2bd00b924d63f64 100644 --- a/tests/validation/validate_ball_and_stick.cpp +++ b/tests/validation/validate_ball_and_stick.cpp @@ -127,10 +127,9 @@ TEST(rallpack1, numeric_ref) { 250.f); } -template <typename Policy> -using lowered_cell_div = fvm::fvm_multicell<double, cell_local_size_type, Policy>; - TEST(ball_and_squiggle, neuron_ref) { + using lowered_cell = fvm::fvm_multicell<double, cell_local_size_type>; + cell c = make_cell_ball_and_squiggle(); add_common_voltage_probes(c); @@ -141,13 +140,18 @@ TEST(ball_and_squiggle, neuron_ref) { {"dend.end", {0u, 2u}, simple_sampler(sample_dt)} }; +#if 0 + // *temporarily* disabled: compartment division policy will + // be moved into backend policy classes. + run_ncomp_convergence_test<lowered_cell_div<div_compartment_sampler>>( "ball_and_squiggle_sampler", "neuron_ball_and_squiggle.json", c, samplers); +#endif - run_ncomp_convergence_test<lowered_cell_div<div_compartment_integrator>>( + run_ncomp_convergence_test<lowered_cell>( "ball_and_squiggle_integrator", "neuron_ball_and_squiggle.json", c, diff --git a/tests/validation/validate_compartment_policy.cpp b/tests/validation/validate_compartment_policy.cpp index 6ee21327f09945884b6516bf860f911269377d37..e03f800c27b340efd211d5e79ddc9f33d68ce66b 100644 --- a/tests/validation/validate_compartment_policy.cpp +++ b/tests/validation/validate_compartment_policy.cpp @@ -20,6 +20,10 @@ using namespace nest::mc; +#if 0 +// *Temporarily* disabled: compartment division policy +// will be moved to backend policy class. + /* * Expect dendtrites composed of a simple frustrum to give * essentially identical results no matter the compartment @@ -93,3 +97,4 @@ TEST(compartment_policy, validate_ball_and_taper) { run_test(make_cell_ball_and_taper()); } +#endif