![]() |
![]() |
![]() |
![]() |
tri2_mesh, quad2_mesh,
Synopsis
mesh mappers that create meshes containing Tri, Quad or Polytri cells from coordinate and connectivity arrays
Input Port
Parameters
Output Port
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.
tri2_mesh creates a mesh containing a cell set of type Tri2.
quad2_mesh creates a mesh containing a cell set of type Quad2.
Input
float[nnodes][nspace]. This array specifies the coordinates of the vertices of the cells. Their connectivity (for example, into quads or triangles) is specified in the connect array. For example, coord[4][2]={{0,0},_{1,0},_{1,1},_{0,1}} creates four vertices at the corners of the unit square in 2-space. In 3-space, you can add a Z coordinate value to each of the subarrays.
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.
For example, to specify a square using the example coordinates above, provide the quad_mesh macro with connect[4]={0,1,2,3}. To specify two triangles using the example coordinates above, provide the tri_mesh macro with connect[6]={0,3,2,0,2,1}. Note that in this last case there are two triangles of three vertices each, giving six entries in the array. The triangles are specified in a counterclockwise order, as required for the canonical triangle vertex ordering.
Parameters
Output Port
Example
File
See also related modules
![]() |
![]() |
![]() |
![]() |