GENIEE
OPTION1:
Generate element connectivity list (jtet) that gives neighbor information. Element connectivity is maintained by LaGriT, but can also be generated by the user with this command.

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.

OPTION2:
Attempt to make 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.

This command could also be used to flip the normals of a mesh that is already consistent. For example:
geniee / -def- / 2dnormal / -1

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.

FORMAT:
OPTION 1:
geniee
OPTION 2:
geniee / cmoname / 2dnormal / reference_element_number / [addatt]
cmoname - name of mesh object to operate on. Can be /  / or /-def-/
2dnormal - keyword to cause this module to execute
reference_element_number - default = 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.

addatt - if the keyword addatt is included, two new arrays are added 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

EXAMPLE:
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.