The Simplex Grid Data Format - Version 1.1

This documentation describes the Simplex grid data format and conversion routines with the ibGrid type used in the IBG package.

The Simplex grid data format can be used to describe simplicial grid, that means grids consisting of segments (1D), triangles (2D) or tetrahedrons (3D), as the inner grid (codimension 0) as the boundary grid (codimension 1) in 2D and 3D.

It seems to be easy to convert external data formats for simplicial grids into this format. Now let us describe this data format in detail. In the following %d denotes an integer value.

Header

Version Line

The first line contains the name and version number of the data format:

SimplexGrid  1.1

Comment Line

The second line is reserved for comments. In general, it is allowed to append comments after the data on every line.

Dimensions

The next line defines two dimensions:

%d %d grid dimension resp. space dimension

We distinguish the grid dimension and the space dimension. The dimension of the space is the number of coordinates defined for every point. The dimension of the grid defines if the grid cells are lines (1), triangles (2) or tetrahedra (3). The dimension of the space may be greater. This property may be "misused" to define some functions on the grid.

It is allowed to define only one number for the dimension. In this case grid dimension coinsides with the space dimension.

Numbers of Elements

The next line defines the numbers necessary for the memory allocation:

%d points
%d cells
%d boundary cells

The text after the numbers is not required and only comment. The order of these lines is relevant and cannot be changed.

The lines define the number of points, the number of region cells and the number of boundary cells (cells of codimension 1). As the number of region cells as the number of boundary cells may be zero (pure boundary grid resp. pure region grid).

If above numbers are zero, the file simply describes a point list.

Point Coordinates

Now one line follows for every point. It contains the coordinates of the point. The number of coordinates in the line is the space dimension.

Cell Description

Then for every cell (codimension 0) there will be one line defining the cell data.

2D Case

%d %d %d   %d   %d %d %d

The first three numbers define the nodes of the triangle.

The next number defines the region number of the triangle.

The next three numbers define the neighbour cells of the triangle.

So we have seven integer numbers for every triangle.

3D Case

%d %d %d %d   %d   %d %d %d %d

The first four numbers define the nodes of the tetrahedron.

The next number defines the region number of the tetrahedron.

The next four numbers define the neighbour cells of the tetrahedron.

So we have nine integer numbers for every tetrahedron.

Boundary Cell Description

Then for every boundary cell there will be one line defining the following data:

2D Case

%d %d   %d   %d %d   %d %d

The first two numbers define the nodes of the edge.

The next number defines the boundary segment number of the edge.

The next two numbers describe the left and right neighbour triangle.

The next two numbers define the neighbour boundary edges of the edge.

So we have seven integer numbers for every boundary triangle.

3D Case

%d %d %d   %d   %d %d   %d %d %d

The first three numbers define the nodes of the triangle.

The next number defines the boundary segment number of the triangle.

The next two numbers describe the left and right neighbour tetrahedron.

The next three numbers define the neighbour boundary triangles of the triangle.

So we have nine integer numbers for every boundary triangle.

Further Conventions

The enumeration of the grid nodes, grid cells and boundary cells begins with one.

The region number is usually an identifier for the material of the cell. The region number must be positive. The value 0 is reserved for the case if no region information is available.

The boundary segment number is usually an identifier for the boundary condition at this boundary cell. The boundary segment number must be positive. The value 0 is reserved for the case if no boundary segment information is available.

In the case of a pure boundary grid, there is obviously no left and right neighbour for a boundary cell. In this case, this place may be used to define the left and the right region number. This usage has to be marked with a minus sign before the region number. The value 0 is reserved for the case if no information about the left or right neighbour is available.

The order of the neighbour cells of the cell is related with the order of the points of the cell so that the n-th point is opposite to the n-th neighbour cell.

If the neighbour of a region cell is a boundary cell, this will be marked with a minus sign. If there is no neighbour, there will be zero.

If no neighbour information is available for the whole grid, the related values may be omitted.