gridap / Gridap.jl

Grid-based approximation of partial differential equations in Julia
MIT License
695 stars 95 forks source link

Improve memory efficiency of Modal C0 Bases #936

Open ericneiva opened 1 year ago

ericneiva commented 1 year ago

Leaving a record here of the issue raised by @pmartorell in this PR of GridapEmbedded. Quoting @pmartorell:

I have found an important bottleneck in memory consumption related with the usage of CompressedArray in both modal C0 basis and moment fitting measures. It seems that Gridap is not efficient with CompressedArray with a large amount of values, e.g., CompressedArray(vals,1:length(vals)). The usage of flat arrays instead will reduce the memory consumption up to one order of magnitude.

A possible optimization would accommodate the Gridap constructors of CellQuadrature and FESpaces to flat arrays of quadrature and reference FEs, respectively. It is probably better to include this optimization in another PR.