From a5e90dcc3cb7dce59de26623f538b07c57346bb0 Mon Sep 17 00:00:00 2001 From: Nora Abi Akar <nora.abiakar@gmail.com> Date: Mon, 15 Feb 2021 22:29:41 +0100 Subject: [PATCH] Allow current updates to be non-linear in v (#1374) * Remove check for strict linearity in current contribution in modcc, as it is no longer necessary. --- modcc/module.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/modcc/module.cpp b/modcc/module.cpp index dee4f0ab..b13b5cb1 100644 --- a/modcc/module.cpp +++ b/modcc/module.cpp @@ -98,15 +98,8 @@ public: current_vars_.insert(e->lhs()->is_identifier()->name()); linear_test_result L = linear_test(e->rhs(), {"v"}); - if (!L.is_linear) { - error({"current update expressions must be linear in v: "+e->rhs()->to_string(), - e->location()}); - return; - } - else { - if (L.coef.count("v") && !visited_current) { - conductivity_exps_.insert(L.coef.at("v")->clone()); - } + if (L.coef.count("v") && !visited_current) { + conductivity_exps_.insert(L.coef.at("v")->clone()); } } } -- GitLab