[Gmsh] Generating a mesh for z=f(x,y) 3D surface

Amit Singh amit112amit at yahoo.co.in
Fri Apr 12 21:20:48 CEST 2019


Dear all.
I want to generate a mesh for the surface given by z=f(x,y) for x and y in [-1, 1]x[-1, 1]. In particular, I have z = sin(pi*x)*cos(pi*y).
 Currently, I use Numpy to create a mesh grid of points in the x-y plane and create their 2D Delaunay Triangulation (using scipy). Then, I loop over all the points and set their z-coordinate as per z=f(x,y). But in regions of high curvature, the triangles become elongated so I am forced to increase the number of points in the x-y grid. I also used a mesh optimization package from PyPi called optimesh to improve the aspect ratio of the triangles but it results in a reduction of surface area of the mesh by around 5%.
Can anyone kindly share or point me to any gmsh tutorial / example that shows how to generate a mesh for a 3D surface such that the mesh density increases in regions of high curvature?
Thanks and regards,Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190412/8eb5b7d7/attachment-0001.html>


More information about the gmsh mailing list