TEST_MESH
Sample 2D Meshes
TEST_MESH
is a FORTRAN90 library which
defines a few
simple triangular meshes of 2D regions.
Alan George and Joseph Liu generated the original set of 9 meshes.
They used them to generate refined meshes, made by subdividing
every triangle the same number of times. Then the node-connectivity
matrix of the refined mesh was used to define a positive definite
symmetric sparse matrix problem.
Of course, the meshes can be of interest for other reasons.
For instance, it is possible to output the mesh information
as a poly file. This format can be input to the
SHOWME program for display, or to
TRIANGLE.
The program is set up to allow a user to easily access a particular
mesh by specifying its number, or to access all the examples,
by going through the master routines whose names begin with the
prefix MESH00_.
The user can easily handle problems of various size by first calling
the routines that give the sizes of various arrays, then using
the FORTRAN90 ALLOCATE command to set up enough space for the
array, and then calling the library routine that fills up the array
with information.
The meshes include:
-
the Square, 4 nodes, 2 elements.
-
The Graded L, 22 nodes, 30 elements.
-
The Plus-Shaped Domain, 28 nodes, 26 elements.
-
The H-Shaped Domain, 40 nodes, 38 elements.
-
The Hollow Square (Small Hole), 12 nodes, 12 elements.
-
The Hollow Square (Large Hole), 32 nodes, 32 elements.
-
The 3-Hole Problem, 44 nodes, 56 elements.
-
The 6-Hole Problem, 46 nodes, 56 elements.
-
The Pinched Hole Problem, 8 nodes, 7 elements.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
TEST_MESH is available in
a FORTRAN90 version.
Related Data and Programs:
HBSMC,
a dataset directory which
contains the Harwell-Boeing Sparse Matrix Collection.
The meshes described here naturally give rise to adjacency
matrices. These matrices are typically sparse (mostly zero)
and irregular. Versions of these matrices, derived from the
meshes in this collection are available in HBSMC.
MESH_BANDWIDTH,
a FORTRAN90 program which
returns the geometric bandwidth associated with a mesh of
elements of any order and in a space of arbitrary dimension.
SPARSEPAK,
a FORTRAN90 library which
contains a version of a direct solver for sparse systems,
developed by George and Liu.
TEST_TRIANGULATION,
a FORTRAN90 library which
defines a set of test regions for triangulation.
TRIANGLE,
a C program which
can be used to
operate on meshes in the TEST_MESH library, producing the
Voronoi diagram, or determining a refined Delaunay triangulation,
constrained to include the original edges of the mesh.
Reference:
-
Alan George, Joseph Liu,
Computer Solution of Large Sparse Positive Definite Matrices,
Prentice Hall, 1981,
ISBN: 0131652745,
LC: QA188.G46.
Source Code:
Examples and Tests:
TEST_MESH includes a routine, MESH00_EPS, which
can create an EPS file containing an image of the mesh. EPS files you may
copy include:
-
mesh01_nodes.png,
a PNG image of
the nodes in mesh #1.
-
mesh01_elements.png,
a PNG image of
the elements in mesh #1.
-
mesh02_nodes.png,
a PNG image of
the nodes in mesh #2.
-
mesh02_elements.png,
a PNG image of
the elements in mesh #2.
-
mesh03_nodes.png,
a PNG image of
the nodes in mesh #3.
-
mesh03_elements.png,
a PNG image of
the elements in mesh #3.
-
mesh04_nodes.png,
a PNG image of
the nodes in mesh #4.
-
mesh04_elements.png,
a PNG image of
the elements in mesh #4.
-
mesh05_nodes.png,
a PNG image of
the nodes in mesh #5.
-
mesh05_elements.png,
a PNG image of
the elements in mesh #5.
-
mesh06_nodes.png,
a PNG image of
the nodes in mesh #6.
-
mesh06_elements.png,
a PNG image of
the elements in mesh #6.
-
mesh07_nodes.png,
a PNG image of
the nodes in mesh #7.
-
mesh07_elements.png,
a PNG image of
the elements in mesh #7.
-
mesh08_nodes.png,
a PNG image of
the nodes in mesh #8.
-
mesh08_elements.png,
a PNG image of
the elements in mesh #8.
-
mesh09_nodes.png,
a PNG image of
the nodes in mesh #9.
-
mesh09_elements.png,
a PNG image of
the elements in mesh #9.
TEST_MESH includes a routine, MESH00_POLY, which
can create a
POLY file containing the mesh information, suitable for
display by
SHOWME, or for processing by TRIANGLE. POLY files you may copy include:
Versions of these meshes have also been stored in the
Harwell Boeing Sparse Matrix Collection:
List of Routines:
-
CH_IS_DIGIT returns .TRUE. if a character is a decimal digit.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
DIGIT_INC increments a decimal digit.
-
DIGIT_TO_CH returns the character representation of a decimal digit.
-
EDGE_LIST creates a list of the unique edges in a graph.
-
ELEMENT3_EPS creates an EPS file containing an image of the mesh.
-
FILE_NAME_INC generates the next filename in a series.
-
GET_UNIT returns a free FORTRAN unit number.
-
I4_MODP returns the nonnegative remainder of integer division.
-
I4_SWAP swaps two I4's.
-
I4_WRAP forces an integer to lie between given limits by wrapping.
-
MESH_NODE_MATRIX returns the node adjacency matrix of a mesh.
-
MESH_POLY creates a POLY file of a mesh, for input to TRIANGLE.
-
MESH00_ELEMENT_NODES returns the element->node data of a mesh given its number.
-
MESH00_ELEMENT3_EPS creates an image of a mesh, given its number.
-
MESH00_ELEMENT_NUM returns the number of elements of a mesh given its number.
-
MESH00_HOLE_NUM returns the number of holes in a mesh given its number.
-
MESH00_HOLE_XY returns hole coordinates of a mesh given its number.
-
MESH00_NAME returns the name of a mesh given its number.
-
MESH00_NODE_EPS creates an image of the nodes of a mesh, given its number.
-
MESH00_NODE_NUM returns the number of nodes of a mesh given its number.
-
MESH00_NODE_XY returns the node coordinates of a mesh given its number.
-
MESH00_NUM returns the number of meshes.
-
MESH00_POLY creates a POLY file of a mesh, given its number.
-
MESH01_ELEMENT_NODES returns the element->node data of mesh #01.
-
MESH01_ELEMENT_NUM returns the number of elements of mesh #01.
-
MESH01_HOLE_NUM returns the number of holes in mesh #01.
-
MESH01_HOLE_XY returns hole coordinates of mesh #01.
-
MESH01_NAME returns the name of mesh #01.
-
MESH01_NODE_ELEMENT_NUM returns the number of nodes-element items of mesh #01.
-
MESH01_NODE_NUM returns the number of nodes of mesh #01.
-
MESH01_NODE_ELEMENT returns the node-element data of mesh #01.
-
MESH01_NODE_XY returns the nodes of mesh #01.
-
MESH02_ELEMENT_NODES returns the element->node data of mesh #02.
-
MESH02_ELEMENT_NUM returns the number of elements of mesh #02.
-
MESH02_HOLE_NUM returns the number of holes in mesh #02.
-
MESH02_HOLE_XY returns hole coordinates of mesh #02.
-
MESH02_NAME returns the name of mesh #02.
-
MESH02_NODE_ELEMENT_NUM returns the number of nodes-element items of mesh #02.
-
MESH02_NODE_ELEMENT returns the node-element data of mesh #02.
-
MESH02_NODE_NUM returns the number of nodes of mesh #02.
-
MESH02_NODE_XY returns the nodes of mesh #02.
-
MESH03_ELEMENT_NODES returns the element->node data of mesh #03.
-
MESH03_ELEMENT_NUM returns the number of elements of mesh #03.
-
MESH03_HOLE_NUM returns the number of holes in mesh #03.
-
MESH03_HOLE_XY returns hole coordinates of mesh #03.
-
MESH03_NAME returns the name of mesh #03.
-
MESH03_NODE_NUM returns the number of nodes of mesh #03.
-
MESH03_NODE_XY returns the nodes of mesh #03.
-
MESH04_ELEMENT_NODES returns the element->node data of mesh #04.
-
MESH04_ELEMENT_NUM returns the number of elements of mesh #04.
-
MESH04_HOLE_NUM returns the number of holes in mesh #04.
-
MESH04_HOLE_XY returns hole coordinates of mesh #04.
-
MESH04_NAME returns the name of mesh #04.
-
MESH04_NODE_NUM returns the number of nodes of mesh #04.
-
MESH04_NODE_XY returns the nodes of mesh #04.
-
MESH05_ELEMENT_NODES returns the element->node data of mesh #05.
-
MESH05_ELEMENT_NUM returns the number of elements of mesh #05.
-
MESH05_HOLE_NUM returns the number of holes in mesh #05.
-
MESH05_HOLE_XY returns hole coordinates of mesh #05.
-
MESH05_NAME returns the name of mesh #05.
-
MESH05_NODE_NUM returns the number of nodes of mesh #05.
-
MESH05_NODE_XY returns the nodes of mesh #05.
-
MESH06_ELEMENT_NODES returns the element->node data of mesh #06.
-
MESH06_ELEMENT_NUM returns the number of elements of mesh #06.
-
MESH06_HOLE_NUM returns the number of holes in mesh #06.
-
MESH06_HOLE_XY returns hole coordinates of mesh #06.
-
MESH06_NAME returns the name of mesh #06.
-
MESH06_NODE_NUM returns the number of nodes of mesh #06.
-
MESH06_NODE_XY returns the nodes of mesh #06.
-
MESH07_ELEMENT_NODES returns the element->node data of mesh #07.
-
MESH07_ELEMENT_NUM returns the number of elements of mesh #07.
-
MESH07_HOLE_NUM returns the number of holes in mesh #07.
-
MESH07_HOLE_XY returns hole coordinates of mesh #07.
-
MESH07_NAME returns the name of mesh #07.
-
MESH07_NODE_NUM returns the number of nodes of mesh #07.
-
MESH07_NODE_XY returns the nodes of mesh #07.
-
MESH08_ELEMENT_NODES returns the element->node data of mesh #08.
-
MESH08_ELEMENT_NUM returns the number of elements of mesh #08.
-
MESH08_HOLE_NUM returns the number of holes in mesh #08.
-
MESH08_HOLE_XY returns hole coordinates of mesh #08.
-
MESH08_NAME returns the name of mesh #08.
-
MESH08_NODE_NUM returns the number of nodes of mesh #08.
-
MESH08_NODE_XY returns the nodes of mesh #08.
-
MESH09_ELEMENT_NODES returns the element->node data of mesh #09.
-
MESH09_ELEMENT_NUM returns the number of elements of mesh #09.
-
MESH09_HOLE_NUM returns the number of holes in mesh #09.
-
MESH09_HOLE_XY returns hole coordinates of mesh #09.
-
MESH09_NAME returns the name of mesh #09.
-
MESH09_NODE_NUM returns the number of nodes of mesh #09.
-
MESH09_NODE_XY returns the nodes of mesh #09.
-
NODE_EPS creates an EPS file containing an image of the nodes.
-
SORT_HEAP_EXTERNAL externally sorts a list of items into linear order.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 20 May 2006.