- Thank you received: 0
curved polygon and hp refinements
4 years 2 months ago #3174
by lehelb
curved polygon and hp refinements was created by lehelb
I'm solving a singularly perturbed reaction diffusion equation [tex]-\epsilon^2\Delta u + u = f[/tex] 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 = Mesh(geo.GenerateMesh(maxh=0.25, quad_dominated=True))
mesh.RefineHP(L, factor=sgm)
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 = Mesh(geo.GenerateMesh(maxh=0.25, quad_dominated=True))
mesh.RefineHP(L, factor=sgm)
Attachments:
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 2 months ago #3175
by mneunteufel
Replied by mneunteufel on topic curved polygon and hp refinements
Hi lehelb,
to actually curve the geometry you need to call mesh.Curve
Best,
Michael
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)
Michael
The following user(s) said Thank You: lehelb
Time to create page: 0.123 seconds