title: GENIEE tags: geniee, connectivity —


Generate the element the connectivity list (jtet array).

The jtet attribute contains for each facet of an element the neighboring element and its local face.  For 3D grids the jtet relationship is reflexsive; each element-face pair has exactly one neighboring element-face pair.  For 2D grids the jtet relationship can include cycles; a triangle or quad edge may have many edge neighbors.  In this case the jtet is constructed as a closed cycle where the jtet of one element-edge pair will be a neighboring element-edge pair whose jtet wil be another neighboring element-edge pair and so on until all neighbors are included in the cycle exactly once.

The jtet is constructed by looking at matching node numbers and will use the parent nodes if they exist.  Faces with matching node coordinates but different node numbers will not be matched.

For hybrid grids that contain degenerate elements there are two options.  If the mesh object attribute jtet_reduce_nnd exists and is set to 1, then faces with repeated node numbers will be matched to faces with the same numbers but not repeated.  For example if a degenerate hex has a face 1 1 2 3 and there is an element (prism, tet, pyramid) with face 1 2 3 and if jtet_reduce_nnd is 1, then these faces will be matched.  Otherwise they will be marked as external boundary faces.


geniee / mo_name / 2dnormal / reference_element_number / [ addatt ]

geniee with no arguments will generate element the connectivity list (jtet) that gives neighbor information. Element connectivity is maintained within LaGriT, but can also be generated by the user with this command.

mo_name is the mesh object to operate on. Can be / / or /-def-/

2dnormal Check or change the topological orientation (itet array) of a triangle, quad, or hybrid tri/quad mesh consistent so that shared edges are traversed in opposite directions. This is only possible in a mesh with jtet_loop_max = 2. For networks with jtet_loop_max > 2 there may not be a configuration that meets the goal.

reference_element_number - Default value is 1. This is the element number that will be the reference element that all other elements are compared to. If this parameter is a negative number, the orientation of element number abs(reference_element_number) is reversed and then used as the reference. reference_element_number = 0 will check and report if orientation is consistent, but will not do any flipping.

For example this command will check and report orientation without making any changes:

    geniee / -def- / 2dnormal / 0

This command can be used to flip the normals of a mesh that is already consistent. For example:

    geniee / -def- / 2dnormal / -1

addatt is optional keyword that will create two new arrays ipath and ifflip to the mesh object.

  ipath - The order in which elements are visited.

  ifflip - 0 if the element orientation was NOT changed, 1 if the element orientation was changed. 
  Note the ifflip array will not make sense for jtet loops greater than 2 for which there is no single solution.

Note: For the case where a mesh is not completely edge connected, this module will detect that all elements have not been tested and will warn the user and suggest a command line syntax to test elements not visited.

Note: Code not set up for a mesh with parent/child chains. When check is made, it compares child points. When permutation of elements is done, only itet and jtet arrays are updated.


  geniee / cmo / 2dnormal

Check orientation of tri/quad elements and if their orientation is different than element 1, then flip their orientation.

  geniee / cmo/2dnormal/-1

Flip the orientation of element one and then make the rest of the mesh consistent with element 1. If the mesh object is already consistent, then this command will reverse the orientation of all the elements in a surface (tri, quad) mesh.

  geniee / -def- / 2dnormal / 17

Check orientation of tri/quad elements and if their orientation is different than element 17, then flip their orientation.

  geniee / cmo / 2dnormal / 0

Check orientation of tri/quad elements and if their orientation is different than element 1, report the difference but do not change the mesh object orientation.

  geniee / cmo / 2dnormal / 0 / addatt

Check orientation of tri/quad elements and if their orientation is different than element 1, report the difference but do not change the mesh object orientation. Create two new attributes:

ipath is the search path the algorithm followed through the mesh.

ifflip reports the orientation of each element as compared to element 1.

Testing Topology or watertightness for Multi-Materials

For a single material watertight mesh, there will be no boundaries, that is geniee will report no more than 2 jtet loops. If you run boundary_components the result will show “0 different exterior boundary components”. For a watertight mesh, each edge needs to appear in (at least) two facets, but can appear in more than two. For instance if a surface is extracted on a 2 material mesh, the material boundary faces will also be extracted. These boundary faces will share an edge with outside faces so that 3 faces share a single edge. geniee will report as shown in this example with 4 boundary edges and no more than 3 faces sharing an edge:

geniee: mesh has   4  jtet loops, max cycle length =  3

The basic test is to compute a face graph of the mesh. We visit all cells and look across the face and ask if I look across face i of cell J what is the cell m and face n on the other side. If the answer is, nothing is on the other side the face is labeled as ‘boundary’. The tests are not geometric, they are topological. The test is on the cell connectivity list. That is if cell a has edge i,j then we are looking in the connectivity list for a cell with edge j,i (or i,j). In general in a ‘good’ mesh we expect the shared edge to be traversed in the opposite direction. However, in the multi-material models where 3 (or more) triangles share an edge, we cannot expect the edges to be traversed in opposite directions.