Skip to content

Conversation

@KnutAM
Copy link
Owner

@KnutAM KnutAM commented Dec 29, 2025

Avoids having Dict{Int, Vector{ST}} where ST is the type of the per-quadrature point state. This provides two main advantages

  1. Not allocating many small vectors
  2. Indexing via array-index instead of dict-lookup

Current solutions stores an index vector (Vector{Int}) which is used to translate cellnr to idx in state::ArrayOfVectorViews. This index vector could be the same for all domains as storage improvement, but currently isn't (just zero where not applicable). Also, the current implementation first creates the Dicts, and then converts. But that is also just during construction and can be optimized later.

Main downside is that when a user constructs a Vector{ST} for their cell state, they will get a view instead (and possibly in the future into a different container for GPU support). So the user has to use state::AbstractVector{ST} instead of state::Vector{ST}.

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.92%. Comparing base (58089f6) to head (8d0c5cc).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
+ Coverage   96.82%   96.92%   +0.10%     
==========================================
  Files          30       30              
  Lines        1166     1204      +38     
==========================================
+ Hits         1129     1167      +38     
  Misses         37       37              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants