Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
MBParallelConventions.h
Go to the documentation of this file.
1 #ifndef MB_PARALLEL_CONVENTIONS_H
2 #define MB_PARALLEL_CONVENTIONS_H
3 
4 /** Tag conventions for naming parallel things. Note this header
5  * file belongs in the main MOAB directory because even serial
6  * applications (e.g. partitioners) may write tags for use in
7  * parallel applications.
8  */
9 
10 /** \brief Global identifier for interface mesh
11  *
12  * An integer identifier common to the corresponding mesh entity
13  * instances on each processor for a mesh entity on the interface.
14  */
15 #define PARALLEL_GID_TAG_NAME "GLOBAL_ID"
16 
17 /** \brief Tag on a meshset representing a parallel partition.
18  *
19  * When the mesh is partitioned for use in a parallel environment,
20  * the each CPUs partition of the mesh is stored in a meshset with
21  * this tag. The value of the tag is an integer "part identifier".
22  */
23 #define PARALLEL_PARTITION_TAG_NAME "PARALLEL_PARTITION"
24 #define PARALLEL_PART_TAG_NAME PARALLEL_PARTITION_TAG_NAME
25 
26 /** \brief Tag that groups the set of parts/partitions that are
27  * a covering of the mesh.
28  *
29  * This tag labels an entity set for which the child sets are part(ition)s
30  * that together are a single partitioning of the mesh. I.e. There should
31  * be no mesh entity that is contained in more than one child part(ition)
32  * set, and typically every mesh entity of the dimension used to partition
33  * the mesh is contained in exactly one of the child sets.
34  *
35  * The data for this tag is a single integer value. The value of
36  * the tag is undefined.
37  */
38 #define PARALLEL_PARTITIONING_TAG_NAME "PARALLEL_MESH_PARTITIONING"
39 
40 /** \brief Tag storing which other processor a given entity is shared with
41  *
42  * This single-valued tag implies an entity is shared with one other proc
43  */
44 #define PARALLEL_SHARED_PROC_TAG_NAME "__PARALLEL_SHARED_PROC"
45 
46 /** \brief Tag storing which other processorS a given entity is shared with
47  *
48  * This multiple-valued tag implies an entity is shared with multiple
49  * other processors. Length of tag is application-dependent, and depends on
50  * what the maximum number of processors is which share an entity
51  */
52 #define PARALLEL_SHARED_PROCS_TAG_NAME "__PARALLEL_SHARED_PROCS"
53 
54 /** \brief Tag storing the handle of a shared entity on the other proc
55  *
56  * This single-valued tag implies an entity is shared with one other proc
57  */
58 #define PARALLEL_SHARED_HANDLE_TAG_NAME "__PARALLEL_SHARED_HANDLE"
59 
60 /** \brief Tag storing handles of a shared entity on other processors
61  *
62  * This multiple-valued tag implies an entity is shared with multiple
63  * other processors. Length of tag is application-dependent, and depends on
64  * what the maximum number of processors is which share an entity
65  */
66 #define PARALLEL_SHARED_HANDLES_TAG_NAME "__PARALLEL_SHARED_HANDLES"
67 
68 /** \brief Tag storing parallel status (as bits in this tag)
69  *
70  * This tag stores various aspects of parallel status in bits; see also
71  * #define's following, to be used in bit mask operations. If an entity is
72  * not shared with any other processors, the pstatus is 0, otherwise it's > 0
73  *
74  * bit 0: !owned (0=owned, 1=not owned)
75  * bit 1: shared (0=not shared, 1=shared)
76  * bit 2: multishared (shared by > 2 procs; 0=not shared, 1=shared)
77  * bit 3: interface (0=not interface, 1=interface)
78  * bit 4: ghost (0=not ghost, 1=ghost)
79  */
80 #define PARALLEL_STATUS_TAG_NAME "__PARALLEL_STATUS"
81 
82 #define PSTATUS_NOT_OWNED 0x1
83 #define PSTATUS_SHARED 0x2
84 #define PSTATUS_MULTISHARED 0x4
85 #define PSTATUS_INTERFACE 0x8
86 // note, these numbers are in hex, so 0x10 is the 4th bit, or 2^4.
87 #define PSTATUS_GHOST 0x10
88 
89 #define PSTATUS_AND 0x1
90 #define PSTATUS_OR 0x2
91 #define PSTATUS_NOT 0x3
92 #endif