Exercise E13:
- Use the program partnmesh of the METIS package (see main page for
download) to partition unstructured triangular meshes.
- To generate the mesh use the program Triangle written by Jonathan Richard Shewchuk. Unpack the file with gunzip and
move the file triangle.shar to a folder called triangle, for example. Enter the folder and type
/bin/sh triangle.shar which will extract the relevant C-files.
Then type make to generate the source code. Call triangle A.poly to generate a mesh based on the domain description in A.poly.
This call will produce a first meshing with results stored in A.1.*.
In order to refine this coarse mesh, call triangle -ra0.002 A.1.ele (the
number after -ra determines the typical area of the triangles - you get more
triangles if you choose a smaller number). You can visualize the mesh by
typing showme A.poly which opens a window with a picture of the
domain and a few buttons. Click on the ele button in the first row you can
see the coarse mesh which you produced with the first call. To see the fine
mesh, click on 1 + on the right followed by another click on the
ele button in the first row.
For details about the structure of input and output files type
triangle -h.
- Write a small C program which converts the output of triangle
into feasible input for partnmesh.
- Run partnmesh and visualize the output with matlab (see example above).
Back