<<<<<<<<<<<<<<<<<

unstructured_grid_set(visage) VISAGEunstructured_grid_set(visage)

NAME

unstructured_grid_set - VISAGE geometry data for unstructured grids.

DESCRIPTION

The unstructured_grid_set object represents geometry as points (or nodes) and elements. The points are defined by a positive, arbitrary integer id and a triplet of floats representing position. (Note: the points can also be defined implicitly where id is a function of x,y,z order in the list.) The elements are defined by a positive integer id, a type, and a connectivity list that is a list of node id's, and is a function of the element type.

There are eight different element types:

1 point - defined by single node

n1 + (type 1)

2 line - defined by two nodes

n1 +--------+ n2 (type 2)

3 triangle - defined by three nodes

+ n3 / \ / \ (type 3) / \ n1 +-------+ n2

4 quadrilateral - defined by four nodes (circularly ordered)

n4 +--------+ n3 | | | | (type 4) | | n1 +--------+ n2

5 brick - defined by eight nodes total; four nodes (circularly ordered) define the base, the other four nodes (circularly ordered) define the top.

n8 +------+ n7 /| /| / | / | n5 +------+n6| (type 5) |n4+---|--+ n3

| / | / |/ |/ n1 +------+ n2

6 wedge - defined by six nodes total; four nodes (circularly ordered) form the base, the other two form the edge.

n6 +-------+ n5 |\ n4 |\ | +----|--+ n3 (type 6) | / | / |/ |/ n1 +-------+ n2

7 pyramid - defined by four points that form the base (circularly ordered) and a fifth point at the peak.

+ n5 //|\ // | \ // | \ n4 /+----- -+ n3 (type 7) // | / |/ |/ n1 +-------+ n2

8 tetrahedron - defined by four nodes

n4 +-----+ n3 |\ /| | \ / | | \ | | / \ | (type 8) |/ \| n1 +-----+ n2

There are two ways to create the unstructured grid data: either using scripts (i.e., the nodes=, elements=) messages, or by using the netCDF reader object.

SUPERCLASS

visage_data

INSTANCE VARIABLES

bbox bounding box of the unstructured grid. Specified by two triplets: the minimum and maximum corners of the box.

bounds similar to the bounding box, specifies the box within which data is visible.

center the center of the bounding box.

length the length of the bounding box from the minimum point to the maximum, i.e., length along the diagonal.

MESSAGES

bbox= (xmin,ymin,zmin, xmax,ymax,zmax) Set the bounding box.

bbox? Get the bounding box.

bounds= (xmin,ymin,zmin, xmax,ymax,zmax) Set the box within which data is visible.

bounds? Get the visible bounds of the data.

center= (x,y,z) Set the center of the data.

center? Get the center of the data.

compute_bbox! Compute the bounding box for the data.

compute_center! Compute the center of the bounding box.

compute_bbox! Compute the length of the bounding box.

compute_properties! Compute the properties for this data (bounding box, center, length).

nodes=, nodes+ (id1,x1,y1,z1,id2,x2,y2,z2,...) One of two methods to set/add nodes to the unstructured grid. Id's must be > 0. Caution: do not set/add more than ~100 nodes in a single lymb statement - the statement may get too long and the parser might break. Use multiple add methods instead.

no_nodes? Get the number of nodes in the unstructured grid.

elements=, elements+ (id1,type1,connect1,id2,type2,connect2...) Set/add elements to the structured grid. Id's must

be > 0. The type is one of the values listed above, and the connectivity supplied as appropriate. Caution: do not set/add more than ~25 elements at a time - the parser will break. Use multiple add methods instead.

points=, points+ (x1,y1,z1,x2,y2,z2,...) or ptr An alternative method to set/add nodes to the unstructured grid based on implicit numbering (see nodes=/+ as well). If the data on the argument stack is a list of floats, then memory is allocated internally and the values are copied in. If the data on the argument stack is a pointer (i.e., ptr), then the pointer use is registered. Caution: do not set/add more than ~100 nodes in a single lymb statement - the statement may get too long and the parser might break. Use multiple add methods instead.

no_elements? Get the number of elements in the unstructured grid.

elements_on! Turn on all elements.

elements_off! Turn off all elements.

elements_on= (e1,e2,...) Turn on only the elements listed.

elements_on+ (e1,e2,...) Turn on the elements listed (in addition to any others already on).

elements_on- (e1,e2,...) Turn off the elements listed.

elements_and: (e1,e2,...) Turn on the elements that are listed and already turned on.

element_list= (min,max,increment) Turn on only those elements between min and max (inclusive) by increment.

element_list+ (min,max,increment) Turn on the elements between min and max (inclusive) by increment in addition to any other elements turned on.

element_list- (min,max,increment) Turn off the elements between min and max

(inclusive) by increment.

element_list_and: (min,max,increment) Turn on only those elements between min and max (inclusive) by increment and those already on.

EXAMPLE

The following example shows a script fragment for creating an unstructured grid. A total of eleven elements are created: two point elements, two line elements, two triangle elements, one quadrilateral element, one brick element, one wedge element, one pyramid element, and one tetrahedron element.

/* * Create an unstructured grid with 24 nodes and 11 elements. */ unstructured_grid_set new: agrid; /* * Create the nodes. Don't define huge numbers all at once - will * break the parser. Also, the nodes shown here are listed in order * by id - this is not required. */ agrid nodes=( 1, 0., 0., 0., 2, 1., 0., 0., 3, 0., 1., 0., 4, 1., 1., 0., 5, 0., 2., 0., 6, 1., 2., 0., 7, 0., 0., 1., 8, 1., 0., 1., 9, 0., 1., 1., 10, 1., 1., 1., 11, 0., 2., 1., 12, 1., 2., 1. ); agrid nodes+( 13, 0., 0., 2., 14, 1., 0., 2., 15, 0., 1., 2., 16, 1., 1., 2., 17, 0., 2., 2., 18, 1., 2., 2., 19, 0., 0., 3., 20, 1., 0., 3., 21, 0., 1., 3., 22, 1., 1., 3., 23, 0., 2., 3., 24, 1., 2., 3. ); /* * Define the elements */

agrid elements=( 1,1,19, 2,1,20, 3,2,21,23, 4,2,22,24, 5,3,13,14,15, 6,3,14,15,16, 7,4,15,16,18,17, 8,5,3,4,6,5,9,10,12,11, 9,6,1,2,4,3,10,9, 10,7,1,2,10,9,8, 11,8,1,8,9,7, );

SEE ALSO

netcdf_reader, visage_data_group, visage_data_set, visage_computed_feature, visage_geometry


Please send comments and suggestions to
consult@rpi.edu