NEIGHBORS_TO_METIS_GRAPH
Reformat Tet Mesh Neighbor File


NEIGHBORS_TO_METIS_GRAPH is a FORTRAN90 program, using double precision arithmetic, which reads a file describing the graph-theoretic adjacency structure of the tetrahedral elements in a mesh ("tet mesh") and writes out a similar file that is suitable for input to the mesh partitioning program METIS.

Since we know we are dealing with a tet mesh, each "node" of the adjacency graph has four potential edges. If a potential edge is not used (in other words, if a face is a boundary face), then by convention we write out a "-1" for the neighbor value. Otherwise, the adjacency information lists the index of the tetrahedral element that is a neighbor on that face of the tetrahedron.

Converting to a METIS GRAPH format is trivial. We include an initial line that lists the number of "nodes" (elements) and "edges" (interfaces between pairs of elements), followed by, for each node (element), a list of the adjacent nodes (a list of the adjacent elements, omitting the "-1" values). A cross-eyed schoolboy sitting on a tack would be able to carry out this task!

Usage:

neighbors_to_metis_graph neighbor_file metis_graph_file
reads the data in neighbor_file, rearranges it to suit METIS, and writes out the modified data to metis_graph_file

Related Programs:

GRAPHCHK is an executable C program which can read a METIS GRAPH file and verify that it has the proper format.

KMETIS is an executable C program, using METIS, which can partition the nodes of a graph.

METIS is a C library of routines for partitioning the nodes of a graph or the elements of a mesh or reordering the variables in a sparse matrix.

METIS_GRAPH is a data directory contains an explanation and some examples of the graph file format used by METIS.

OEMETIS is an executable C program which reads the adjacency graph of a sparse matrix, stored in METIS GRAPH format, and produces a reordering of the nodes to minimize fill.

ONMETIS is an executable C program which reads the adjacency graph of a sparse matrix, stored in METIS GRAPH format, and produces a reordering of the nodes to minimize fill.

PMETIS is an executable C program, using METIS, which can partition the nodes of a graph.

TET_MESH_NEIGHBORS is an executable FORTRAN90 program which reads information describing a tet mesh, and writes out the corresponding tet mesh neighbor file.

Reference:

  1. metis.pdf,
    George Karypis, Vipin Kumar,
    METIS, a Software Package for Partitioning Unstructured Graphs and Computing Fill-Reduced Orderings of Sparse Matrices;

Source Code:

Examples and Tests:

List of Routines:

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


Last revised on 12 November 2006.