test_triangulation
test_triangulation,
a FORTRAN90 code which
sets up a number of triangulation test problems.
As far as possible, a uniform and abstract approach has been used.
For each test region, a number of routines are provided, via which
it is possible for the user to determine many things about the region.
Often, just one or two routines would be needed for a particular
purpose. The names of the routines, and their purposes are:

BOUNDARY_NEAREST: returns the nearest point on the boundary
of the region to a given point or set of points;

BOUNDARY_PROJECT: projects exterior points onto the boundary.

BOUNDARY_SEGMENT: returns a sequence of roughly equally spaced
points that lie on one particular boundary segment;

BOUNDARY_SEGMENT_LENGTH: returns the "length" (number of
nodes) of a particular boundary segment. This simply counts
the number of points needed to trace or approximate the
boundary segment;

BOUNDARY_SEGMENT_NUM: returns the number of boundary segments.
Simple regions have one boundary segment. A region with one hole
has two, and so on;

BOX: returns a bounding box for the region. All points in
the region are within this box;

DENSITY: the value of the mesh density function at any
point in the region. If this is not constant, then high values
correspond to places where many more mesh points should be placed;
is always 2 for this set;

ELEMENT_SIZE: returns a requested typical element size. This
refers to the average size of the triangles formed by a triangulation
of the points;

FIXED_NUM: returns the number of points which must be
included as nodes of the mesh (which may be zero);

FIXED_POINTS: returns the coordinates of the points which
must be included as nodes of the mesh;

HEADER: prints a brief description of the problem;

HOLE_NUM: returns the number of "holes" in the region;

HOLE_POINT: returns the coordinates of one point in a hole
(useful when TRIANGLE is to be invoked);

INSIDE: reports which of a given set of points are
inside the region.

SAMPLE: returns a set of sample points from the region,
chosen with uniform probability;

SAMPLE_H1: returns a set of sample points from the region,
after it has been enlarged by an amount H1;

SDIST: returns the signed distance to the boundary of
the region for each of a set of input points.
(a positive distance means the point is outside the region,
a negative distance means it is inside);
(Not ready for problems 4, 5, 6, 7, 8, 9 )

TITLE: a title for the problem;
The test problems include:

The unit circle;

The unit circle with a circular hole;

A square with a circular hole;

A hexagon with a hexagonal hole;

The horn;

The superellipse with a superelliptical hole;

The bicycle seat;

The slice of pie with a circular hole and triangular notch;

Jeff Borggaard's square with two hexagonal holes;

The unit square;

The Lshaped region;

John Shadid's Hshaped region;

The Sandia fork;

Marcus Garvie's Lake Alpha, with Beta Island;

Sangbum Kim's forward step;
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Languages:
test_triangulation is available in
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
CVT_TRIANGULATION,
a FORTRAN90 code which
uses routines from the TEST_TRIANGULATION library
to create a CVTbased triangularization.
TABLE_IO,
a FORTRAN90 code which
is used to write some of the output files.
test_triangulation_test
TRIANGULATION,
a FORTRAN90 code which
carries out various operations on order 3 ("linear") or order 6
("quadratic") triangulations.
TRIANGULATION_BOUNDARY_NODES,
a FORTRAN90 code which
reads data defining a triangulation, determines which nodes
lie on the boundary, and writes their coordinates to a file.
TRIANGULATION_DISPLAY_OPENGL,
a C++ program which
reads files defining a triangulation and displays an image
using Open GL.
TRIANGULATION_L2Q,
a FORTRAN90 code which
reads data defining a 3node triangulation and generates
midside nodes and writes out the corresponding 6node triangulation.
TRIANGULATION_MASK,
a FORTRAN90 code which
takes an existing triangulation and deletes triangles and
their corresponding nodes as requested by the user.
TRIANGULATION ORDER3,
a directory which
describes the format for triangulations of order 3.
TRIANGULATION ORDER6,
a directory which
describes the format for
triangulations of order 6.
TRIANGULATION_ORIENT,
a FORTRAN90 code which
reads data defining a triangulation, makes sure that
every triangle has positive orientation, and if not, writes a
corrected triangle file.
TRIANGULATION_PLOT,
a FORTRAN90 code which
reads data defining a triangulation and creates a
PostScript image of the nodes and triangles.
TRIANGULATION_Q2L,
a FORTRAN90 code which
reads data defining a 6node triangulation, and subdivides
each triangle into 4 3node triangles, writing the resulting
triangulation to a file.
TRIANGULATION_QUALITY,
a FORTRAN90 code which
reads data defining a triangulation and computes a number
of quality measures.
TRIANGULATION_RCM,
a FORTRAN90 code which
reads data defining a triangulation, determines an ordering
of the nodes that will reduce the bandwidth of the adjacency
matrix, and writes the new triangulation information to a file.
TRIANGULATION_REFINE,
a FORTRAN90 code which
reads data defining a triangulation, replaces each triangle
by four congruent smaller ones, and writes the new triangulation
information to a file.
TRIANGULATION_TRIANGLE_NEIGHBORS,
a FORTRAN90 code which
reads data defining a triangulation, determines the neighboring
triangles of each triangle, and writes that information to a file.
Reference:

Marc deBerg, Marc Krevald, Mark Overmars,
Otfried Schwarzkopf,
Computational Geometry,
Springer, 2000,
ISBN: 3540656200.

Barry Joe,
GEOMPACK  a software package for the generation of meshes
using geometric algorithms,
Advances in Engineering Software,
Volume 13, 1991, pages 325331.

Joseph ORourke,
Computational Geometry,
Second Edition,
Cambridge, 1998,
ISBN: 0521649765,
LC: QA448.D38.

PerOlof Persson, Gilbert Strang,
A Simple Mesh Generator in MATLAB,
SIAM Review,
Volume 46, Number 2, June 2004, pages 329345.
Source Code:
Last revised on 05 September 2020.