Skip to content

Dynamic NPIs causes max_value of size_t loop if damping_expr.get_dampings().size() = 0 #997

@HenrZu

Description

@HenrZu

Bug description

for (auto i = size_t(0); i < damping_expr.get_dampings().size() - 1; ++i) {

If damping_expr.get_dampings().size() == 0, then damping_expr.get_dampings().size() - 1 is a big problem, because of the size_t.
Either we check beforehand that the size is greater than 0 or we change the dtype.

Version

Linux

To reproduce

just run an example where the condition above is fulfilled.

Relevant log output

No response

Add any relevant information, e.g. used compiler, screenshots.

No response

Checklist

  • Attached labels, especially loc:: or model:: labels.
  • Linked to project

Metadata

Metadata

Assignees

Labels

class::bugBugs found in the softwareloc::backendThis issue concerns the C++ backend implementation.model::odeThis issue concerns any kind of ODE-based model.prio::highThe priority of this task is high.

Type

No type

Projects

Status

Done (Total)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions