tet_mesh, hex_mesh, pyramid_mesh, prism_mesh, polyhedron_mesh


Synopsis

mesh mappers that create meshes containing Tet, Hex, Pyr, Prism and Polyhedron cells from coordinate and connectivity arrays

Input Ports

coord

float[nnodes][nspace]

coordinates of objects

connect

int[nnodes * cell_nnodes]

node connectivity list

poly_nodes

int[npolys]

number of nodes per polygon (polyhedron_mesh only)

 

Output Ports

out

Mesh

obj

output renderable object

 

Description

Each of these macros creates a mesh containing cells (geometric objects), given arrays containing the locations of the nodes in space and their connectivity. These macros simplify the process of generating field data by reducing the amount of data you must supply to create a field. Usually the output of one of these macros is combined, using combine_mesh_data, with the output of one of the data mapper macros to create a field.

tet_mesh creates a mesh containing a cell set of type Tet (tetrahedra).

hex_mesh creates a mesh containing a cell set of type Hex (hexahedra).

pyramid_mesh creates a mesh containing a cell set of type Pyr (pyramid).

prism_mesh creates a mesh containing a cell set of type Prism (that is, a polyhedron with two three-sided faces and three four-sided faces).

polyhedron_mesh creates a mesh containing a cell set of type Polyhedron (see the description of the poly_nodes input port.)

Input Ports

coord

float[nnodes][nspace]. This array specifies the coordinates of the vertices of the cells. Their connectivity (for example, into tetrahedra or pyramids) is specified in the connect array. For example, coord[8][3]={{0,0,0},{1,0,0},{1,1,0},{0,1,0},{0,0,1},{1,0,1},{1,1,1},{0,1,1}} creates eight vertices at the corners of the unit cube in 3-space.

connect

int[nnodes * cell_nnodes]. For each cell, this array specifies which node in the coord array describes each vertex of that cell. The layout is by cells, with the nodes of each cell specified in the canonical cell order (see for the cell orderings for all supported cell types).

For example, to specify a single cube cell using the example coordinates above, provide the hex_mesh macro with connect[8] = {7,4,5,6,3,0,1,2}. Note that in this case there is one hexahedron of eight vertices. The hexahedron vertices are specified in a the order specified for the canonical hexahedron vertex ordering.

poly_nodes

int[npolys]. The polyhedron_mesh macro, which actually generates polygons, needs one additional parameter--the number of nodes of each polygon. Each element of this array describes the number of nodes in the corresponding polygon in the connect array. Thus, the first poly_nodes[0] elements of the connect array describe the nodes of the first polygon, the next poly_nodes[1] elements describe the next polygon, and so on. For polyhedron_mesh, the size of the connect array should equal sum(poly_nodes).

Parameters

none

Output Ports

out

Mesh. Contains the mesh described by the input arrays.

obj

Renderable object corresponding to out.

Example

Not available.

File

v/fld_map.v

See also

Related modules