Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KINETIC block visitor in case there is an empty statement #1009

Merged
merged 8 commits into from
Aug 30, 2023
2 changes: 1 addition & 1 deletion src/visitors/kinetic_block_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ void KineticBlockVisitor::visit_kinetic_block(ast::KineticBlock& node) {
}
}
// divide by COMPARTMENT factor if present
if (!compartment_factors[j].empty()) {
if (!compartment_factors[j].empty() && !ode_rhs.empty()) {
ode_rhs = fmt::format("({})/({})", ode_rhs, compartment_factors[j]);
}
// if rhs of ODE is not empty, add to list of ODEs
Expand Down
Loading