10 #ifndef vtk_m_exec_CellFace_h
11 #define vtk_m_exec_CellFace_h
52 return numFaces[cellShapeId];
60 { -1, -1, -1, -1, -1, -1 },
61 { -1, -1, -1, -1, -1, -1 },
62 { -1, -1, -1, -1, -1, -1 },
63 { -1, -1, -1, -1, -1, -1 },
64 { -1, -1, -1, -1, -1, -1 },
65 { -1, -1, -1, -1, -1, -1 },
66 { -1, -1, -1, -1, -1, -1 },
67 { -1, -1, -1, -1, -1, -1 },
68 { -1, -1, -1, -1, -1, -1 },
69 { -1, -1, -1, -1, -1, -1 },
70 { 3, 3, 3, 3, -1, -1 },
71 { -1, -1, -1, -1, -1, -1 },
73 { 3, 3, 4, 4, 4, -1 },
76 return numPointsInFace[cellShapeId][faceIndex];
89 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
90 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
92 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
93 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
95 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
96 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
98 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
99 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
101 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
102 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
104 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
105 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
107 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
108 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
110 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
111 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
113 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
114 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
116 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
117 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
119 { { 0, 1, 3, -1 }, { 1, 2, 3, -1 }, { 2, 0, 3, -1 },
120 { 0, 2, 1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
122 { { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 },
123 { -1, -1, -1, -1 }, { -1, -1, -1, -1 }, { -1, -1, -1, -1 } },
125 { { 0, 4, 7, 3 }, { 1, 2, 6, 5 }, { 0, 1, 5, 4 },
126 { 3, 7, 6, 2 }, { 0, 3, 2, 1 }, { 4, 5, 6, 7 } },
128 { { 0, 1, 2, -1 }, { 3, 5, 4, -1 }, { 0, 3, 4, 1 },
129 { 1, 4, 5, 2 }, { 2, 5, 3, 0 }, { -1, -1, -1, -1 } },
131 { { 0, 3, 2, 1 }, { 0, 1, 4, -1 }, { 1, 2, 4, -1 },
132 { 2, 3, 4, -1 }, { 3, 0, 4, -1 },{ -1, -1, -1, -1 } }
135 return pointsInFace[cellShapeId][faceIndex][localPointIndex];
141 template <
typename CellShapeTag>
146 detail::CellFaceTables table;
147 result = table.NumFaces(shape.Id);
151 template <
typename CellShapeTag>
156 if ((faceIndex < 0) || (faceIndex >= detail::CellFaceTables::MAX_NUM_FACES))
164 if (faceIndex >= numFaces)
169 detail::CellFaceTables table;
170 result = table.NumPointsInFace(shape.Id, faceIndex);
174 template <
typename CellShapeTag>
180 if ((faceIndex < 0) || (faceIndex >= detail::CellFaceTables::MAX_NUM_FACES))
188 switch (numFacePoints)
203 template <
typename CellShapeTag>
212 if (numPointsInFace < 1)
219 detail::CellFaceTables table;
220 result = table.PointsInFace(shape.Id, faceIndex, pointIndex);
234 template <
typename CellShapeTag,
typename GlobalPo
intIndicesVecType>
238 const GlobalPointIndicesVecType& globalPointIndicesVec,
244 if (numPointsInFace == 0)
251 detail::CellFaceTables table;
253 result =
vtkm::Id3(globalPointIndicesVec[table.PointsInFace(shape.Id, faceIndex, 0)],
254 globalPointIndicesVec[table.PointsInFace(shape.Id, faceIndex, 1)],
255 globalPointIndicesVec[table.PointsInFace(shape.Id, faceIndex, 2)]);
257 if (result[0] > result[2])
260 result[0] = result[2];
263 if (result[0] > result[1])
266 result[0] = result[1];
269 if (result[1] > result[2])
272 result[1] = result[2];
277 for (
vtkm::IdComponent pointIndex = 3; pointIndex < numPointsInFace; pointIndex++)
279 vtkm::Id nextPoint = globalPointIndicesVec[table.PointsInFace(shape.Id, faceIndex, pointIndex)];
280 if (nextPoint < result[2])
282 if (nextPoint < result[1])
284 result[2] = result[1];
285 if (nextPoint < result[0])
287 result[1] = result[0];
288 result[0] = nextPoint;
292 result[1] = nextPoint;
297 result[2] = nextPoint;
312 #endif //vtk_m_exec_CellFace_h