Skip to content

Avoid repeated temporary allocations during compartment reconstruction in flow-based simulations #1580

Description

@HenrZu

Motivation / Current Behaviour

Flow-based simulations repeatedly evaluate the difference between the current cumulative flows and the flows at the most recent base point. This expression currently creates a temporary dynamically sized vector during every RHS evaluation and again when compartment outputs are reconstructed.

A reusable flow-difference vector should be allocated once per simulation and used for both right-hand-side evaluations and compartment reconstruction.

Enhancement description

This does not change the numerical formulation or simulation results.

Additional context

No response

Checklist

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

Metadata

Metadata

Assignees

Labels

class::improvementCleanup that doesn't affect functionalityclass::performancePerformance related issuesmodel::odeThis issue concerns any kind of ODE-based model.

Fields

No fields configured for Feature.

Projects

Status
Product Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions