Memory issue with HCurl

Using the current build of NGSolve (6.2.1708-44-g6a6eeec), I’m now seeing memory issues when constructing an HCurl space. For example:

[code]from ngsolve import *
from netgen.csg import unit_cube

mesh = Mesh (unit_cube.GenerateMesh(maxh=0.5))
Xo= HCurl(mesh, order=4,dirichlet=[1,2,3,4,5,6],complex=True)
[/code]
usually gives: “MemoryError: std::bad_array_new_length” and other times just segfaults.

I’m seeing similar behavior when this line is encountered in python_tutorials/cmagnet.py:

fes = HCurl(mesh, order=4, dirichlet="outer", nograds = True)
This issue was not present for me in previous builds (the last was about 4 days ago).

Best,
Dow Drake

Hi Dow,

thanks for pointing out the issue. It is fixed with this commit.

Best,
Christoph