2 mesh files – Scotch Brand 5.1.10 User Manual

Page 20

Advertising
background image

The numeric flag, similar to the one used by the Chaco graph format [24], is

made of three decimal digits. A non-zero value in the units indicates that vertex
weights are provided. A non-zero value in the tenths indicates that edge weights
are provided. A non-zero value in the hundredths indicates that vertex labels are
provided; if it is the case, vertices can be stored in any order in the file; else, natural
order is assumed, starting from the graph base index.

This header data is then followed by as many lines as there are vertices in the

graph, that is, vertnbr lines. Each of these lines begins with the vertex label,
if necessary, the vertex load, if necessary, and the vertex degree, followed by the
description of the arcs. An arc is defined by the load of the edge, if necessary, and
by the label of its other end vertex. The arcs of a given vertex can be provided
in any order in its neighbor list. If vertex labels are provided, vertices can also be
stored in any order in the file.

Figure 4 shows the contents of a graph file modeling a cube with unity vertex

and edge weights and base 0.

0
8

24

0

000

3

4

2

1

3

5

3

0

3

6

0

3

3

7

1

2

3

0

6

5

3

1

7

4

3

2

4

7

3

3

5

6

Figure 4: Graph file representing a cube.

5.2

Mesh files

Mesh files, which usually end in “.msh”, describe valuated meshes, made of elements
and nodes, the elements of which can be mapped onto target architectures, and the
nodes of which can be reordered.

Meshes are bipartite graphs, in the sense that every element is connected to the

nodes that it comprises, and every node is connected to the elements to which it
belongs. No edge connects any two element vertices, nor any two node vertices.
One can also think of meshes as hypergraphs, such that nodes are the vertices
of the hypergraph and elements are hyper-edges which connect multiple nodes, or
reciprocally such that elements are the vertices of the hypergraph and nodes are
hyper-edges which connect multiple elements.

Since meshes are graphs, the structure of mesh files resembles very much the

one of graph files described above in section 5.1, and differs only by its header,
which indicates which of the vertices are node vertices and element vertices.

The first line of a mesh file holds the mesh file version number, which is currently

1

. Graph and mesh version numbers will always differ, which enables application

programs to accept both file formats and adapt their behavior according to the
type of input data. The second line holds the number of elements of the mesh
(velmnbr), followed by its number of nodes (vnodnbr), and by its overall number of
arcs (edgenbr, that is, twice the number of edges which connect elements to nodes
and vice-versa).

20

Advertising