Open JordiManyer opened 3 months ago
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.
This relates to what we discussed. @amartinhuertas @fverdugo
A little context:
The current implementation of the sparse matrix assembly is (loosely) done as follows:
InserterCSC
object, with a similar layout toSparseMatrixCSC
.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: