hp-refinement

Hi,
I’m having trouble using the hp-refinement of ngsolve with the attached code. While the mesh generated looks reasonable, the error increases from 5.708879679178683e-13 to 0.015308713648027968 when I do one mesh.RefineHP step.

The console output also says something about “used dof inconsistency”. Am I doing something wrong or is there some bug somewhere?

Attachment: test_singular.py

Hi,

if you have two edges with hp-refinement which are connected, you also have to add a hpref at the crosspoint. In your case at all points of the geometry.

p1 = geo.AppendPoint (0,0,hpref=1)
p2 = geo.AppendPoint (1,0,hpref=1)
p3 = geo.AppendPoint (1,1,hpref=1)
p4 = geo.AppendPoint (0,1,hpref=1)

My errors are now [5.708775518541384e-13, 4.975185600311657e-13].

Best,
Christoph

thanks. Now it works as expected!