next up previous contents
Next: Appendix 2: A Sample Up: G3D Cover Page Previous: Compression

Appendix 1: G3D Data File Format

---
 *   The file must have the following format. Anything in brackets is
 *   optional.  Case doesn't matter. Tokens can be separated by
 *   colons, commas, and/or whitespace.
 *     SIZE: nx, ny, nz
 *     SCALE: x, y, z
 *     CENTER: x, y, z
 *     TIME: [FROM] t1 [TO] t2 [ [STEP] dt ]
 *     GRID: <...>  END
 *     DATA: <...>  END
 *     MATERIAL: <...> END
 *     BOUNDARY: <...> END
 *
 *   The token '#INCLUDE filename' redirects reading to the named file.
 *   Any other '#' marks the rest of the line as a comment
 *
 *   SCALE and CENTER will be calculated for best fit by default - 
 *   only specify them in the file if you want to override the default.
 *   TIME defaults to one timestep, at time index one.
 *   GRID defaults to a grid of unit cubes starting at (0,0,0) - that is,
 *     the x,y,z coordinates of each vertex is equal to the i,j,k index
 *     of the vertex.
 *   DATA defaults to a scalar dataset named "Default", uniformly zero.
 *   MATERIAL defaults to GCT1.2 material properties and no regions.
 *
 * Order doesn't matter, except that SIZE must come before DATA, GRID, and
 *   MATERIAL.
---
 *   Grid data must be formatted as follows:
 *     vertex(1,1,1) X-coor,  vertex(1,1,1) Y-coor, vertex(1,1,1) Z-coor,
 *     vertex(1,1,2) X-coor,  vertex(1,1,2) Y-coor, vertex(1,1,2) Z-coor,
 *     ...
 *       ... data(xmax,ymax,zmax) Z-coor,
 *     END
 *
 *   Note that the Z index varies fastest, the X index varies slowest
 *   (standard C-style row-major array).
---
 *   Material data is formatted as follows:
 *   MATERIAL
 *     PROPERTY
 *       "Prop Abbr"  "Long Description"  default_value
 *       ...
 *     END
 *     CLASS
 *       "Class Name"
 *         "Prop Abbr", "Prop Abbr", .... "Prop Abbr" END
 *     ...
 *     CLASS
 *       "Class Name"
 *         "Prop Abbr", "Prop Abbr", .... "Prop Abbr" END
 *     GROUP
 *       "Group Name" group_code
 *         "Class Name", "Class Name", .... "Class Name" END
 *     ...
 *     GROUP
 *       "Group Name" group_code
 *         "Class Name", "Class Name", .... "Class Name" END
 *     TYPE
 *       "Material Name"
 *         "Prop Abbr"  prop_value
 *         ...
 *       END
 *       ...
 *       "Material Name"
 *         "Prop Abbr"  prop_value
 *         ...
 *       END
 *     END
 *     REGION
 *       "Material Name" [FROM] x0, y0, z0 [TO] x1, y1, z1
 *       ...
 *     END
 *   END
---
 *   Boundary Conditions are formatted as follows:
 *   BOUNDARY
 *     type [FROM] x0, y0, z0 [TO] x1, y1, z1
 *       TIME time_index: value [value]
 *       TIME time_index: value [value]
 *       ...
 *     END
 *     type [FROM] x0, y0, z0 [TO] x1, y1, z1
 *       TIME time_index: value [value]
 *       TIME time_index: value [value]
 *       ...
 *     END
 *   END
---
 *   DataSet must be formatted as follows:
 *     SCALAR | VECTOR n
 *      "Name"
 *     [RANGE [FROM] min [TO] max]
 *
 *     TIME time_index1
 *     data(1,1,1)  data(1,1,2)  ... data(xmax,ymax,zmax)
 *     TIME time_index2
 *     data(1,1,1)  data(1,1,2)  ... data(xmax,ymax,zmax)
 *     ...
 *     END
 *
 *   Note that the Z index varies fastest, the X index varies slowest
 *   (standard C-style row-major array).



Robert Sharpley
Tue Dec 9 10:30:18 EST 1997