[ANSYS, Inc. Logo] return to home search
next up previous contents index

7.5.6 Cell and Face Partition ID Macros

In general, cells and faces have a partition ID that is numbered from 0 to n-1, where n is the number of compute nodes. The partition IDs of cells and faces are stored in the variables C_PART and F_PART, respectively. C_PART(c,tc) stores the integer partition ID of a cell and F_PART(f,tf) stores the integer partition ID of a face.

Note that myid can be used in conjunction with the partition ID, since the partition ID of an exterior cell is the ID of the neighboring compute node.



Cell Partition IDs


For interior cells, the partition ID is the same as the compute node ID. For exterior cells, the compute node ID and the partition ID are different. For example, in a parallel system with two compute nodes (0 and 1), the exterior cells of compute node-0 have a partition ID of 1, and the exterior cells of compute node-1 have a partition ID of 0 (Figure  7.5.4).

Figure 7.5.4: Partition Ids for Cells and Faces in a Compute Node
figure



Face Partition IDs


For interior faces and boundary zone faces , the partition ID is the same as the compute node ID. The partition ID of a partition boundary face, however, can be either the same as the compute node, or it can be the ID of the adjacent node, depending on what values F_PART is filled with (Figure  7.5.4). Recall that an exterior cell of a compute node has only partition boundary faces; the other faces of the cell belong to the adjacent compute node. Therefore, depending on the computation you want to do with your UDF, you may want to fill the partition boundary face with the same partition ID as the compute node (using Fill_Face_Part_With_Same) or with different IDs (using Fill_Face_Part_With_Different). Face partition IDs will need to be filled before you can access them with the F_PART macro. There is rarely a need for face partition IDs in parallel UDFs.


next up previous contents index Previous: 7.5.5 Looping Macros
Up: 7.5 Macros for Parallel
Next: 7.5.7 Message Displaying Macros
Release 12.0 © ANSYS, Inc. 2009-01-14