next up previous contents index
Next: ASCII1D format Up: Data formats Previous: ASCII3D format   Contents   Index


ASCII2D format

``ASCII2D'' is a simple data format for small 2D problems. Each line of the data file is coded in ascii and can be easily edited, or produced by programs, or both.

A line begining with the characters #, /#, %%, %! is a comment line. Other lines are composed of tokens. Each token is a character string, and tokens are seperated by one or more of the characters ``space'', ``tabular'' or ``new line''. Each token is a keyword or data associated to a keyword. The available keywords are:

In the case of homogeneous meshes. In the case of non-homogeneous meshes.

The last block can be followed by some keywords defining the creation of new scalar values from the previously defined by predefined functions. Theses keywords and the associated functions can also be used in the description file and are described in the section ``Description file''.

An example is available with the sample data, in the file ``soupap.ascii2d''

Two other short examples follow (each in one column):


%%non-homogeneous mesh           %%homogeneous mesh
# with scalars                   %! with vectors and scalar
# mesh points
points 9                         points 9 
-4  8.                                 -4  8. 
 8. 8.                                  8. 8.
-8  4                                  -8  4  
 0  4                                   0  4 
-8  0                                  -8  0
-4  0                                  -4  0
 4  0                                   4  0
 8 -4                                   8 -4
-4 -8                                  -4 -8
polygons 9                       triangles 9
4 2 3 0 1                              2 3 0
3 3 6 1                                3 6 1
3 2 5 3                                2 5 3 
4 4 5 2 0                              4 5 2                      
3 5 8 3                                5 8 3
5 3 8 6 0 2                            3 8 6
4 6 7 1 2                              6 7 1 
3 4 8 5                                4 8 5
3 8 7 6                                8 7 6 
scalars rho                      vectors champ1 champ1.u champ1.v .1
1                                      1 3
4                                      1 4
6                                      1 6
5.3                                    2 5.3
2                                      2 2
3                                      2 3
2                                      2 1
0                                      0 2
5                                      5 1
                                  end_block
                                  veclen: l_champ1 champ1


next up previous contents index
Next: ASCII1D format Up: Data formats Previous: ASCII3D format   Contents   Index
Robert Fournier 2002-09-13