Conversation
|
Hi @JordiManyer , what is the status of this PR? Have you tried the new implementation for Nonlinear/transient problems? |
|
@oriolcg I don't have time atm, I'll try to push this further after the summer. I am not focusing complicated problems yet, but obviously anything that assembles repeatedly (like NL or transient) would benefit from this. I am worried about the memory footprint though... I think I can make most of it lazy so that we don't have to keep any Float values in memory, but it will take take some time to work it out. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1000 +/- ##
=======================================
Coverage 88.23% 88.24%
=======================================
Files 179 179
Lines 22593 22593
=======================================
+ Hits 19936 19937 +1
+ Misses 2657 2656 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This relates to what we discussed. @amartinhuertas @fverdugo
A little context:
The current implementation of the sparse matrix assembly is (loosely) done as follows:
InserterCSCobject, with a similar layout toSparseMatrixCSC.Both of these have the advantage of saving memory, but at the cost of doing sparse row/col index searches every time we assemble an entry.
We would like to investigate the option of working with COO-type structures. These are more expensive memory-wise, but can save quite a lot of time when re-assembling the matrix.
I've added a MWE on a possible implementation of the latter. Also, here are some results from the benchmarks at the end: