# curved polygon and hp refinements

I’m solving a singularly perturbed reaction diffusion equation $$-\epsilon^2\Delta u + u = f$$ with zero boundary condition on a 2d domain with one curved side (see below) using hp refinement. As I increase the levels of refinement and increase polynomial degree the convergence plateaus. My guess is that this is due to approximation of the curved boundary as the convergence is fine for a polygon. I’ve also attached the full code.

Is the spline approximated by the initial polygon or there is some more accurate interpolation of the boundary going on?

geo = SplineGeometry()
p1 =  geo.AppendPoint(0,0,hpref=1)
p2 =  geo.AppendPoint(1.0,0,hpref=1)
p3 =  geo.AppendPoint(1.0,1.0)
p4 =  geo.AppendPoint(0,1,hpref=1)
geo.Append(["line",p1,p2],hpref=1)
geo.Append (["spline3", p2, p3, p4],hpref=1)
geo.Append(["line",p4,p1],hpref=1)

mesh.RefineHP(L, factor=sgm)


Attachment: sing_p_example_2020-09-23.py

Hi lehelb,

to actually curve the geometry you need to call mesh.Curve

mesh = Mesh(geo.GenerateMesh(maxh=0.25, quad_dominated=True))
mesh.Curve(L)
mesh.RefineHP(L, factor=sgm)

Best,
Michael

Perfect. Thank you!

Lehel