# curved polygon and hp refinements

3 years 11 months ago #3174 by lehelb
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)
##### Attachments:
3 years 11 months ago #3175
Hi lehelb,

to actually curve the geometry you need to call mesh.Curve
Code:
mesh = Mesh(geo.GenerateMesh(maxh=0.25, quad_dominated=True)) mesh.Curve(L) mesh.RefineHP(L, factor=sgm)
Best,
Michael
The following user(s) said Thank You: lehelb
3 years 11 months ago #3176 by lehelb
Perfect. Thank you!

Lehel
Time to create page: 0.102 seconds