3.4.7. Face Routines

Faces are 2 dimensional (2D) units of mesh. Each global face ID is returned from cfxExportBoundaryList (see cfxExportBoundaryList) or cfxExportRegionList (see cfxExportRegionList).

Within CFX faces are either represented as Triangles (three vertices) or Quadrilaterals (two vertices). Each face in a CFX .res file will be parented by a single 3D element. The parent element of a face can be returned by the cfxELEMNUM macro with the global face ID, and the local face of that element can be determined by calling cfxFACENUM with the same global face ID

3.4.7.1. cfxExportFaceNodes

int cfxExportFaceNodes (int faceid, int *nodes)

Requests the vertices for the face identified by faceid. The argument faceid should be constructed from the element number and local face number using the following formula:

(element_number << 3) & local_face_number

Values returned from cfxExportRegionGet and cfxExportRegionList can be supplied directly to this function.

The number of vertices defining the face are returned if faceid is valid, otherwise 0 is returned. The node numbers are returned in the array nodes, which should be dimensioned to a minimum size of 4 in the calling routine.

The face numbers and associated node indices are tabulated here:

Element Type

Face

Nodes

tetrahedron

1

0

1

2

 

 

2

0

3

1

 

 

3

1

3

2

 

 

4

0

2

3

 

pyramid

1

0

3

4

 

 

2

1

4

2

 

 

3

0

4

1

 

 

4

2

4

3

 

 

5

0

1

2

3

prism

1

0

2

5

3

 

2

0

3

4

1

 

3

1

4

5

2

 

4

0

1

2

 

 

5

3

5

4

 

hexahedron

1

0

2

6

4

 

2

1

5

7

3

 

3

0

4

5

1

 

4

2

3

7

6

 

5

0

1

3

2

 

6

4

6

7

5


Note:  The face numbers and associated node indices are different when importing elements. For details, see cfxImportGetFace.