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.
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.
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.
/* * 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, );