Data_Array


Synopsis

Stores an array of data.


group Data_Array {
int nvals; /* number of objects */
int veclen; /* vector length of each object */
int id; /* normals, temperature, pressure, coordinates, etc.*/
prim values[nvals][veclen]; /* actual data array */
int+opt null_flag = 0; /* indicates presence of NULL data */
prim+opt null_value; /* value assumed to be NULL data */
prim min => cache(min_array(magnitude(values), null_flag, null_value));
/* min value of data in each array */
prim max => cache(max_array(magnitude(values), null_flag, null_value));
/* max value of data in each array */
prim min_vec[veclen] => cache(min_array(values, null_flag, null_value));
/* min extent of data in each array */
prim max_vec[veclen] => cache(max_array(values, null_flag, null_value));
/* max extent of data in each array */
string+nonotify labels; /* ascii strings for the labels */
string+nonotify units; /* ascii strings for the labels */
};

Description

Data_Arrays are a generalized structure used to store:

•      the numeric data at each node (group Node_Data)

•      the numeric data at each cell (group Cell_Data)

•      the coordinate data in a Grid (group Grid)

More than any other group in the Field data type, the subobjects of Data_Array are redefined by other groups to tailor it to their specific needs.

Subobjects

nvals

An integer that sets the length (row index) of the values array that actually holds the numeric data. It is usually set by the group that is including the Data_Array. Node_Data sets nvals = nnodes. Cell_Data sets nvals = ncells. Grid sets nvals = nnodes.

There is no direct way to get/set nvals because nvals is defined by other groups.

In Node_Data or a structured Grid use FLDget_nnodes.

In Cell_Data use FLDget_ncells.

to get/set this by inheritance.

veclen

An integer that sets the width (column index) of the values array that actually holds the numeric data.

veclen has slightly different meanings, depending upon the group in which the Data_Array is being included.

Node_Data and Cell_Data have some number of components (nnode_data and ncell_data): (a, b, c). There is one Data_Array for each component. However, the components themselves can have subcomponents: (a, [b, c], d). b and c are the subcomponents of the second component. veclen defines the number of subcomponents in this Data_Array component. In the (a, [b, c], d) example, the first and third components' veclen = 1, while the second component's veclen = 2.

In Grids, veclen = nspace, where nspace is the number of coordinates associated with each node. Nodes that occur along a 1D line have one coordinate to specify their location, an X value, and nspace = 1. Nodes that occur in a 2D plane have two coordinates to specify their location, an X and a Y, and nspace = 2. Nodes that occur in 3D space have three coordinates to specify their location, an X, a Y, and a Z, and nspace = 3.

In Node_Data Data_Arrays, use FLDget_node_data_veclen, or FLDset_node_data_comp.

In Cell_Data Data_Arrays, use FLDget_cell_data_veclen.

In Grids, there is no FLD call to get or set veclen explicitly, because the value is going to be inherited from the value for nspace: use FLDget_nspace.

id

An integer that lets you give a numeric id to this Data_Array component, so that some other routine can discover what type of data it holds and treat it in a special way.

This field is primarily used by the Graphics Display Kit routines to flag a component as GD_NORMAL_DATA_ID, GD_COLOR_DATA_ID, GD_RGB_DATA_ID, GD_RADIUS_DATA_ID, or GD_UV_DATA_ID.