Simple Issues in 2D Mesh Generation for the Finite Element Method

**FEM_MESHING**
is a MATLAB library which
looks at some simple issues in defining a geometric mesh for
the finite element method in 2D.

The issues raised here are simple examples that arose during a presentation on finite element meshing. That presentation is available in ../../classes/fem_2011/fem_meshing.pdf.

The computer code and data files made available on this web page are distributed under the GNU LGPL license.

**FEM_MESHING** is available in
a MATLAB version.

DISTMESH, a MATLAB library which carries out triangular or tetrahedral mesh generation, by Per-Olof Persson and Gilbert Strang.

DISTMESH_3D, a MATLAB library which constitutes the 3D subset of distmesh, code for tetrahedral mesh generation, by Per-Olof Persson and Gilbert Strang.

MESH2D, a MATLAB library which can automatically create a triangular mesh for a given polygonal region, by Darren Engwirda.

TRIANGLE, a C program which computes a triangulation of a geometric region, by Jonathan Shewchuk.

TRIANGULATION, a MATLAB library which performs various operations on order 3 ("linear") or order 6 ("quadratic") triangulations.

TRIANGULATION_ORDER3, a dataset directory of TRIANGULATION_ORDER3 files, a linear triangulation of a set of 2D points, using a pair of files to list the node coordinates and the 3 nodes that make up each triangle;

There are various simple scripts to display the mesh.

- boundary_display.m, displays vertices V and boundary indices BI.
- node_display.m, displays vertices V, boundary indices BI, and nodes P.
- triangulation_display.m, displays vertices V, boundary indices BI, nodes P, and triangles T.

It is useful to write the P and T data to files, so that they can later be read by a C++ or FORTRAN90 program.

- node_write.m, writes the node data to a file.
- triangle_write.m, writes the triangle data to a file.

The C++ function "triangle_read" suggests one way to read a triangle file. There is also an example program which shows how the function can be used to read the triangles associated with the ELL region.

- triangle_read.cpp, a C++ function to read a triangle file.
- triangle_read_example.cpp, a C++ program which reads the ELL triangle data.

The FORTRAN90 routine "triangle_read" suggests one way to read a triangle file. There is also an example program which shows how the function can be used to read the triangles associated with the ELL region.

- triangle_read.f90, a FORTRAN90 routine to read a triangle file.
- triangle_read_example.f90, a FORTRAN90 program which reads the ELL triangle data.

**ELL** is the L-shaped region.

- ell_nodes.txt, the nodes.
- ell_triangles.txt, the triangles.
- ell_vertex_indices.txt, the sequence of vertex indices that form the boundary.
- ell_vertices.txt, the vertices.

**STH** is the square region with triangular hole.

- sth_vertex_indices.txt, the sequence of vertex indices that form the boundary.
- sth_vertices.txt, the vertices.

You can go up one level to the MATLAB source codes.