Mesh format

The mesh format is used for structured data sets which are organized as an MxN grid. The file is ASCII format. It contains M blocks of N lines each. The blocks are separated by a blank line. Each line should contain at least 3 numbers. These define one point in the grid.

Example:

-1  -1   -1   -1
-1   0   -1    1
-1   1   -1    1

 0  -1   -1   -1
 0   0    1    1
 0   1   -1    1

 1  -1   -1   -1
 1   0   -1    1
 1   1   -1    1

 2  -1   -1    2
 2   0   -1    1
 2   1   -1    1.0
Numbers in floating point an exponential representation are allowed. Comment lines start with a '#'-symbol.

The number of blocks M and the lines per block N are detected automatically. These are taken as number of rows (M) and columns (N) of a regular grid. If the number of lines per block is not constant, the data set is regarded as M poly-lines with flexible length. In this case a message like

read_mesh: floating column len (max=4)
is written and only the poly-lines can be plotted (as edges).

A line can contain more than 3 floating-point numbers. By default the first 3 are taken as (x,y,z)-coordinates. This can be changed by the 'set coord'-command. See the examples.


back