Skip to content

Commit

Permalink
Only enable sympy if DERIVATIVE block exists
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Oct 16, 2024
1 parent a60577b commit 8bc7d18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,15 @@ int run_nmodl(int argc, const char* argv[]) {

enable_sympy(solver_exists(*ast, "derivimplicit"), "'SOLVE ... METHOD derivimplicit'");
enable_sympy(node_exists(*ast, ast::AstNodeType::LINEAR_BLOCK), "'LINEAR' block");
enable_sympy(node_exists(*ast, ast::AstNodeType::DERIVATIVE_BLOCK),
"'DERIVATIVE' block");
enable_sympy(node_exists(*ast, ast::AstNodeType::NON_LINEAR_BLOCK),
"'NONLINEAR' block");
enable_sympy(solver_exists(*ast, "sparse"), "'SOLVE ... METHOD sparse'");
}


if (sympy_conductance || sympy_analytic || neuron_code) {
if (sympy_conductance || sympy_analytic) {
nmodl::pybind_wrappers::EmbeddedPythonLoader::get_instance()
.api()
.initialize_interpreter();
Expand Down

0 comments on commit 8bc7d18

Please sign in to comment.