another question on manual quad mesh in 2D: curved edges

Hello,

I was trying to obtain a manual high-order quad mesh for a simple geometry, the ring.
I can only get the straight-sided quadirlaterials, in attachment, but didn’t find available resources to deal with a curved edge.
Thanks in advance!

https://ngsolve.org/media/kunena/attachments/758/ring_mesh.py
Best,
Guosheng

Attachment: ring_mesh.py

Hi Guosheng,

in the latest version you can curve 2d manually generated meshes.

You have to define a geometry as you would do when Netgen generates a mesh for you and set it as geometry in your mesh.

ngmesh.SetGeometry(geom)

Finally you have to tell the boundary elements to which edge of the geometry they belong. The edge numbering is 1-based. One important point is that each boundary element has to be a subset of an edge, otherwise it won’t work.

Best
Christoph

Attachment: ring_mesh.py