Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

curved polygon and hp refinements

More
3 years 6 months ago #3174 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)
More
3 years 6 months ago #3175 by mneunteufel
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
More
3 years 6 months ago #3176 by lehelb
Perfect. Thank you!

Lehel
Time to create page: 0.141 seconds