Commit 3a38ae7a authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

core: fix missing accumulation in sum

parent a71ceb44
...@@ -3828,12 +3828,13 @@ struct abstract_sum ...@@ -3828,12 +3828,13 @@ struct abstract_sum
for (size_t i = 0; i != PortNumber; ++i) { for (size_t i = 0; i != PortNumber; ++i) {
value += values[i]; value += values[i];
slope += values[i + PortNumber]; slope += values[i + PortNumber];
derivative = values[i + PortNumber + PortNumber]; derivative += values[i + PortNumber + PortNumber];
} }
output_ports.get(y[0]).messages.emplace_front( output_ports.get(y[0]).messages.emplace_front(
value, slope, derivative); value, slope, derivative);
} }
return status::success; return status::success;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment