Skip to content

Commit

Permalink
Fix cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Aug 15, 2023
1 parent adae932 commit 4f9d5dd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arbor/cable_cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void cable_cell_impl::init() {
}

cable_cell::cable_cell(const arb::morphology& m, const decor& decorations, const label_dict& dictionary):
impl_(make_impl(new cable_cell_impl(std::move(m), std::move(dictionary), std::move(decorations))))
impl_(make_impl(new cable_cell_impl(m, dictionary, decorations)))
{}

cable_cell::cable_cell(): impl_(make_impl(new cable_cell_impl())) {}
Expand Down
4 changes: 2 additions & 2 deletions arbor/cable_cell_param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ decor& decor::set_default(defaultable what) {
case 5: {
auto& p = std::get<init_int_concentration>(what);
if (p.value.type() != iexpr_type::scalar) throw cable_cell_error{"Default values cannot have a scale."};
defaults_.ion_data[p.ion].init_ext_concentration = *p.value.get_scalar();
defaults_.ion_data[p.ion].init_int_concentration = *p.value.get_scalar();
break;
}
case 6: {
auto& p = std::get<init_ext_concentration>(what);
if (p.value.type() != iexpr_type::scalar) throw cable_cell_error{"Default values cannot have a scale."};
defaults_.ion_data[p.ion].init_int_concentration = p.value.get_scalar();
defaults_.ion_data[p.ion].init_ext_concentration = p.value.get_scalar();
break;
}
case 7: {
Expand Down
2 changes: 1 addition & 1 deletion arbor/fvm_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ fvm_cv_discretize(const cable_cell& cell, const cable_cell_parameter_set& global
data.end(),
[](const auto& kv) {
const auto& v = kv.second.value.get_scalar();
return !v || *v != 0.0 || *v == *v;
return !v || (*v != 0.0 && *v == *v);
});
if (diffusive) {
// Provide a (non-sensical) default.
Expand Down
4 changes: 2 additions & 2 deletions arbor/include/arbor/morph/embed_pwlin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ struct ARB_ARBOR_API embed_pwlin {

// Computed length of mcable.
double integrate_length(const mcable& c) const;
double integrate_length(mlocation proxmal, mlocation distal) const;
double integrate_length(mlocation prox, mlocation dist) const;

double integrate_length(const mcable& c, const pw_constant_fn&) const;
double integrate_length(msize_t bid, const pw_constant_fn&) const;

// Membrane surface area of given mcable.
double integrate_area(const mcable& c) const;
double integrate_area(mlocation proxmal, mlocation distal) const;
double integrate_area(mlocation prox, mlocation dist) const;

double integrate_area(const mcable& c, const pw_constant_fn&) const;
double integrate_area(msize_t bid, const pw_constant_fn&) const;
Expand Down
2 changes: 1 addition & 1 deletion arbor/util/pw_over_cable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct get_value {
template <typename T, typename U, typename Proj = impl::get_value>
util::pw_elements<U> pw_over_cable(const mcable_map<T>& mm,
const mcable& cable,
U&& dflt_value,
U dflt_value,
Proj projection = Proj{}) {
using value_type = typename mcable_map<T>::value_type;
msize_t bid = cable.branch;
Expand Down

0 comments on commit 4f9d5dd

Please sign in to comment.