[Index for ./FEM]
[Return to Master Index]
loadgrid
(./FEM/loadgrid.m)
Function Synopsis
fem_grid_struct=loadgrid(gridname)
Help text
LOADGRID load principle gridfiles for a given FEM domain
LOADGRID loads grid files for a given FEM domain and returns
a fem_grid_struct to the local workspace. The returned
structure contains atleast the minimum grid components
for boundary plotting, contouring, etc. Additionally,
if land description files exist (.lnd, .lbe), the land
description arrays are attached to the structure as well.
Input: gridname - name of domain to load grid files
Output: LOADGRID returns a fem_grid_struct containing (atleast)
the following fields:
1) .name name of FEM domain
2) .e node connectivity array (cols 2-4 of .ele file )
3) .x x-horizontal node list (col 2 of .nod file )
4) .y y-horizontal node list (col 3 of .nod file )
5) .z bathymetry list (col 2 of .bat) file
6) .bnd boundary node/pair list (.bnd file )
LOADGRID with no input gridname checks to see if the global
variable DOMAIN has been set. If so, LOADGRID uses this
name to load files for. If DOMAIN does NOT exist or is
empty, the input gridname must be specified.
If the boundary list (.bnd) exists locally, LOADGRID
attempts to load the remaining files locally. If the .bnd
file does NOT exist locally, LOADGRID searches the
GRIDS and GRIDDIRS global variables for the grid data.
If any of the principle grids files does not exist, LOADGRID
displays the appropriate message and exits, returning a
partially filled fem_grid_struct WHICH IS INVALID. The
returned structure CANNOT be passed to any subsequent
OPNML/MATLAB function expecting a valid fem_grid_struct.
NOTE THIS EXCEPTION: the function GRIDINFO will take any
fem_grid_struct and describe the field contents.
EXAMPLE CALL:
>> mcbo=loadgrid('mcbo')
This returns a fem_grid_struct into the local workspace
named "mcbo" which contains the following minimum fields:
mcbo =
name: 'mcbo'
e: [727x3 double]
x: [444x1 double]
y: [444x1 double]
z: [444x1 double]
bnd: [161x2 double]
Written by : Brian O. Blanton
Summer 1997
Cross-Reference Information
This function calls
Produced by mat2html on Tue Feb 2 16:15:45 EST 1999
Cross-Directory links are: OFF