1 /*
2 ******************************************************************
3 ******************************************************************
4 ******* ********
5 ****** (C) 1988-2010 Tecplot, Inc. *******
6 ******* ********
7 ******************************************************************
8 ******************************************************************
9 */
10 #ifndef _FACE_H_
11 #define _FACE_H_
12
13 #if defined EXTERN
14 #undef EXTERN
15 #endif
16 #if defined FACEMODULE
17 #define EXTERN
18 #else
19 #define EXTERN extern
20 #endif
21
22 namespace tecplot
23 {
24 namespace kernel
25 {
26 class SubElemValueProducerInterface;
27 }
28 }
29
30
31 /**
32 */
IsCellFaceLogicallyCollapsed(LgIndex_t I1,LgIndex_t I2,LgIndex_t I3,LgIndex_t I4)33 inline Boolean_t IsCellFaceLogicallyCollapsed(LgIndex_t I1,
34 LgIndex_t I2,
35 LgIndex_t I3,
36 LgIndex_t I4)
37 {
38 return ((I1 == I2 && I3 == I4) ||
39 (I1 == I4 && I2 == I3) ||
40 (I1 == I3) ||
41 (I2 == I4));
42 }
43
44 /**
45 * IMPORTANT NOTE:
46 * A face obscuration of FaceObscuration_LogicallyObscured means that the
47 * face is entirely obscured by either an implicit neighbor for inside faces
48 * of ordered data or an auto generated neighbor for finite element data. In
49 * either case, logical obscuration is not considered if user defined
50 * neighbors have been specified for the face. Therefore, interior faces of
51 * ordered data can have an indication of FaceObscuration_PartiallyObscured.
52 */
53 typedef enum
54 {
55 FaceObscuration_NotObscured,
56 FaceObscuration_PartiallyObscured,
57 FaceObscuration_EntirelyObscured,
58 FaceObscuration_LogicallyObscured,
59 END_FaceObscuration_e,
60 FaceObscuration_Invalid = BadEnumValue
61 } FaceObscuration_e;
62
63 /**
64 */
65 EXTERN LgIndex_t GetLogicalOrderedNeighbor(LgIndex_t NumIPts,
66 LgIndex_t NumJPts,
67 LgIndex_t NumKPts,
68 LgIndex_t Element,
69 LgIndex_t Face);
70
71 /**
72 * Function to determine a cell's neighbor. It calls FaceNeighborGetSurfaceCellNeighbor()
73 * for classic zones.
74 */
75 EXTERN void GetSurfaceCellNeighbor(CZInfo_s const* CZInfo,
76 CZData_s const* CZData,
77 LgIndex_t SurfaceCellIndex,
78 tecplot::kernel::SubElemValueProducerInterface* NodeValueProducer,
79 ElemFaceOffset_t PlaneOrFaceOffset,
80 ElemFaceOffset_t Edge,
81 LgIndex_t* NeighborSurfaceCellElem,
82 EntIndex_t* NeighborSurfaceCellZone);
83 /**
84 */
85 EXTERN FaceObscuration_e GetFaceObscuration(CZInfo_s const* CZInfo,
86 CZData_s const* CZData,
87 Set_pa ActiveRelevantZones,
88 LgIndex_t Element,
89 LgIndex_t FOffset,
90 Boolean_t ConsiderValueBlanking,
91 Boolean_t ConsiderIJKBlanking,
92 Boolean_t ConsiderDepthBlanking,
93 Boolean_t ConsiderClipBlanking);
94
95 EXTERN EntIndex_t GetNodesPerElementFace(ZoneType_e ZoneType);
96
97 EXTERN EntIndex_t GetFacesPerElement(ZoneType_e ZoneType,
98 LgIndex_t IMax,
99 LgIndex_t JMax,
100 LgIndex_t KMax);
101
102 /**
103 * @param Points must have MAX_NODES_PER_FACE elements.
104 * @param UniquePoints must have MAX_NODES_PER_FACE elements.
105 * This array is populated with the unique points
106 * from the input Points array. Values beyond NumUniquePoints-1 may
107 * be uninitialized and should not be accessed.
108 * @param NumUniquePoints - This value is populated the number of unique
109 * points that were placed in the UniquePoints array.
110 * @param Is3D is used to help determine if two points are coincident.
111 */
112 EXTERN void GetUniquePoints(XYZ_s const Points[],
113 XYZ_s UniquePoints[],
114 SmInteger_t& NumUniquePoints,
115 Boolean_t Is3D);
116 EXTERN CollapsedStatus_e GetSurfaceCellCollapsedStatus(CZInfo_s const* CZInfo,
117 CZData_s const* CZData,
118 tecplot::kernel::SubElemValueProducerInterface* SubElemValueProducer);
119 EXTERN CollapsedStatus_e GetSurfaceCellCollapsedStatus(CZInfo_s const* CZInfo,
120 CZData_s const* CZData,
121 LgIndex_t I1,
122 LgIndex_t I2,
123 LgIndex_t I3,
124 LgIndex_t I4);
125 EXTERN CollapsedStatus_e GetSurfaceCellLogicalCollapsedStatus(ZoneType_e ZoneType,
126 LgIndex_t I1,
127 LgIndex_t I2,
128 LgIndex_t I3,
129 LgIndex_t I4);
130 EXTERN CollapsedStatus_e GetSurfEdgeOrVolFaceLogicalCollapsedStatus(NodeMap_pa NodeMap,
131 LgIndex_t Element,
132 EntIndex_t Face);
133 #if defined ALLOW_USERDEF_NO_NEIGHBORING_ELEMENT
134 /**
135 */
136 EXTERN Boolean_t IsUserDefFaceNeighborBoundary(FaceNeighbor_pa FaceNeighbor,
137 LgIndex_t Element,
138 LgIndex_t Face);
139 #endif
140
141 #endif
142