Skip to content

Another in place scatter method. - #338

Merged
cmhamel merged 1 commit into
mainfrom
inplace-scatter/another-method
Aug 25, 2026
Merged

Another in place scatter method.#338
cmhamel merged 1 commit into
mainfrom
inplace-scatter/another-method

Conversation

@cmhamel

@cmhamel cmhamel commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@cmhamel

cmhamel commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@lxmota just an FYI, I noticed you were doing some inplace scattering in a commit in Carina and wanted to point you to some of the existing methods in FEC.

If you look here there's several methods with scatter_ in the name. They inplace update the residual/stiffness storage so we don't need to form large static arrays. I've noticed some nice reductions in initial start up times for problems by using these instead of the methods that form the full discrete gradient.

They're not perfect yet but a good start.

Solid mechanics examples can be found in Cthonios here. For reasons that escape me now I changed the ordering of the inputs.

To opt in, there's a keyword argument in SparseMatrixAsembler called use_inplace_methods which should be set to true.

This PR adds some more of these scatter methods.

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.42%. Comparing base (beda361) to head (b262aa0).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/Formulations.jl 0.00% 54 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
- Coverage   69.01%   68.42%   -0.59%     
==========================================
  Files          55       55              
  Lines        6523     6579      +56     
==========================================
  Hits         4502     4502              
- Misses       2021     2077      +56     

☔ View full report in Codecov by Harness.
📢 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.

@cmhamel
cmhamel merged commit 3069ddc into main Aug 25, 2026
9 of 13 checks passed
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.

1 participant