Skip to content

Fix memory leak in variational optimiser, add small optimisations

Dave Moxey requested to merge meshing/nektar:fix/varopti-memleak into master

This MR fixes a memory leak arising from temporary workspace being allocated with new but then never deleted. It also adds a couple of small optimisations:

  • for loops use const int parameters to avoid reevaluating iterators etc at each loop iteration
  • memory is pre-allocated for each NodeOpti object -- note this does lead to higher memory usage
  • HypEl has had its nu parameter reset to 0.4 to be consistent with the original publication and LinEl -- we should probably add the option to be able to specify this

Merge request reports