| TUgridPrint | TCL UTILITIES USER MANUAL | TUgridPrint |
|---|
| set |
[TUgridPrint  |
|
| File | - | The file name to print the grid to or a file descriptor if the file is already open. | |||||||||
| Gridp | - | The primary 2D data grid to be printed out. | |||||||||
| Grids | - | A secondary grid which has the same grid description as Gridp which is to be included in the file. This is often the grid normalization array. If Grids is passed in as a dummy array (non-existant) array it is omitted from the print file. | |||||||||
| gInfo | - | The grid information array for the input data grid(s). | |||||||||
| Open | - | The method use to open or create the
print file.
|
|||||||||
| Close | - | If 1 close the file on existing otherwise leave it open. |
| The file descriptor. This is -1 if the file has been closed by the procedure. |
# GRID print example
# ESTABLISH a simple 2D data set.
set nP 0
for { set X -1.0 } { $X <= 1.0 } { set X [expr $X + .1] } {
for { set Y -1.0 } { $Y <= 1.0 } { set Y [expr $Y + .1] } {
set Xx($nP) $X
set Yy($nP) $Y
set Vv($nP) $nP
incr nP
}
}
# SET up the grid information array. Only 9 cells in the grid
set gInfo(0) -1.0
set gInfo(1) 1.0
set gInfo(2) -1.0
set gInfo(3) 1.0
set gInfo(4) 3
set gInfo(5) 3
set gInfo(6) POINT
set gInfo(7) POINT
set gInfo(8) COLUMN
set gInfo(9) IGNORE
set gInfo(10) NEW:ADD:END
set gInfo(11) -1
set gInfo(12) -5
set gInfo(13) -1.0e30
set gInfo(14) 1.0e30
set gInfo(15) NO
set gInfo(16) NO
# GRID the data set
TUdataGrid $nP 1 Xx Xx 1 Yy Yy Vv Grid Norm gInfo
# DUMP the grid to the file GridDmp
TUgridPrint GridDmp Vv Norm gInfo OpenW
File GridDmp contents:
> XSTART : -1.0
> XEND : 1.0
> YSTART : -1.0
> YEND : 1.0
> XLENGTH : 3
> YLENGTH : 3
> XSTORAGE : POINT
> YSTORAGE : POINT
> GSTORAGE : COLUMN
> ZEROS : IGNORE
> DO : NEW:ADD:END
> UNFILLED : -1
> BAD : -5
> GMIN : -1.0e30
> GMAX : 1.0e30
> XCYCLIC : NO
> YCYCLIC : NO
> -6.666667e-01 -6.666667e-01 0.000000e+00 4.800000e+01
> -6.666667e-01 5.000445e-13 1.000000e+00 4.900000e+01
> -6.666667e-01 6.666667e-01 2.000000e+00 4.200000e+01
> 5.000445e-13 -6.666667e-01 3.000000e+00 4.900000e+01
> 5.000445e-13 5.000445e-13 4.000000e+00 4.900000e+01
> 5.000445e-13 6.666667e-01 5.000000e+00 4.200000e+01
> 6.666667e-01 -6.666667e-01 6.000000e+00 4.200000e+01
> 6.666667e-01 5.000445e-13 7.000000e+00 4.200000e+01
> 6.666667e-01 6.666667e-01 8.000000e+00 3.600000e+01
| Sept 25, 2006 |
|---|