Skip to content

avoid creating unnecessary views in InterfaceValues#1306

Merged
KristofferC merged 1 commit intomasterfrom
kc/view_function_gradent
Mar 18, 2026
Merged

avoid creating unnecessary views in InterfaceValues#1306
KristofferC merged 1 commit intomasterfrom
kc/view_function_gradent

Conversation

@KristofferC
Copy link
Copy Markdown
Collaborator

fixes #1301

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.82%. Comparing base (2ecfdd4) to head (4b13ae7).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1306      +/-   ##
==========================================
- Coverage   94.25%   91.82%   -2.44%     
==========================================
  Files          40       40              
  Lines        6757     6946     +189     
==========================================
+ Hits         6369     6378       +9     
- Misses        388      568     +180     

☔ 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.

@KristofferC KristofferC force-pushed the kc/view_function_gradent branch 2 times, most recently from 2d9757e to 7dad69c Compare March 18, 2026 08:43
@KristofferC KristofferC force-pushed the kc/view_function_gradent branch from 7dad69c to 4b13ae7 Compare March 18, 2026 13:11
@KristofferC KristofferC merged commit 8eb6a07 into master Mar 18, 2026
16 of 17 checks passed
@KristofferC KristofferC deleted the kc/view_function_gradent branch March 18, 2026 13:32
Comment on lines 229 to +230
# TODO: Deprecate this, nobody is using this in practice...
function function_gradient(fe_v::AbstractValues, q_point::Int, u::AbstractVector{<:Vec})
function function_gradient(fe_v::AbstractValues, q_point::Int, u::AbstractVector{<:Vec}, dof_range = eachindex(u))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What path made this active, @KristofferC?

Do we use this somewhere currently, or was it just in a test?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calls where I changed the view to instead pass the dofs should dispatch to here, but if this argument was not present, it dispatched to the function above (the one not specialized for <:Vec).

This was to fix a test failure.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

function_(gradient/value)_(jump/average) allocates when u is a view

3 participants