Synopsis
Contains coordinate data for Fields.
group Grid<NEnumColors=4,NEcolor0=0xff> {
int nnodes; /* number of nodes */
int nspace; /* coordinates dimension */
Data_Array coordinates { /*node coordinates */
nvals => nnodes;
veclen => nspace;
float values[nvals][veclen];
float min => cache(min_array(magnitude(values),null_flag,
null_value));
float max => cache(max_array(magnitude(values), null_flag,
null_value));
float min_vec[veclen] => cache(min_array(values, null_flag,
null_value));
float max_vec[veclen] => cache(max_array(values, null_flag,
null_value));
};
};
Description
Grid holds the node coordinate data for all meshes, structured and unstructured.
Only unstructured meshes use an unqualified Grid. Structured meshes make the Grid definition more specific by assigning certain values to the raw Grid. The hierarchy looks like this:
These more specific definitions are discussed under their own headings.
Subobjects
nnodes
An integer specifying the total number of nodes in the Grid. This is used to set the nvals (length) of the coordinates Data_Array below.
nspace
An integer specifying how many coordinates exist for each node. 1 coordinate, X, indicates 1D data that exists on a line. 2 coordinates, X and Y, indicate 2D data that exists on a plane. 3 coordinates, X, Y, and Z, indicate 3D data that exists in space.
This is used to set the number of columns in the coordinates Data_Array below.
nspace is often confused with ndims, but they are two separate, though related ideas.
coordinates
A Data_Array that holds the actual coordinates of each node.
nvals
An integer that sets the length of the coordinate array. It is defined to be nvals = nnodes, that is, there are as many sets of coordinates as there are nodes.
veclen
An integer that sets the number of columns in the coordinate array. It is defined as veclen = nspace, that is, there are as many columns as there are coordinates (one, two, or three).
values[nvals][veclen]
A float array that holds the actual coordinates.
This values array may actually be empty. This is because coordinate data can be of two types, explicit and implicit. The breakdown among structured and unstructured grids is as follows:
Mesh Type
|
Grid Coordinates
|
Unstructured mesh |
explicit |
Irregular Mesh |
explicit |
Uniform Mesh |
implicit |
Rectilinear Mesh |
implicit |
An explicit grid is one wherein every node has an explicitly-stated coordinate location in space. For example, the node that corresponds to the Node_Data [2, 5, 100] is explicitly located in Data_Array [2, 5, 100] as being at coordinates -.5 X, -.42 Y, and 23.7 Z.
An implicit grid is one wherein you do not store explicit coordinates for every node. Rather, there is something about the organization of the Node_Data that lets implies where the node is in space. Uniform grids and Rectilinear grids do not store explicit coordinates. Rather, the node that corresponds to the Node_Data [2, 5, 100] is assumed to be located at 2 X, 5 Y, and 100 Z in space.
min => cache(min_array(magnitude(values),null_flag,null_value));
max => cache(max_array(magnitude(values), null_flag,null_value));
These values are not used in Grid Data_Arrays.
min_vec[veclen] => cache(min_array(values, null_flag, null_value));
max_vec[veclen] => cache(max_array(values, null_flag, null_value));
Floating arrays veclen long that, for each nspace, specify what the minimum and maximum X, Y, and Z coordinate is. This defines the bounding box of the field in space.
This is the end of the coordinates Data_Array information. For more information on Grid Data_Arrays, including how to access with the FLD library, see Data_Array
Files
v/fld.v
See also
Not applicable.