optimad / bitpit

Open source library for scientific HPC
http://optimad.github.io/bitpit/
GNU Lesser General Public License v3.0
117 stars 34 forks source link

discretization: allow to define a pool for the weights #325

Closed andrea-iob closed 1 year ago

andrea-iob commented 2 years ago

This will allow to re-use the weights and thus will reduce re-allocations.

andrea-iob commented 2 years ago

There is now a separate class for discrete stencils that want to use a memory pool. In this way, if memory pool is not needed, we don't need to store an extra pointer.