18 #ifndef viskores_exec_CellEdge_h
19 #define viskores_exec_CellEdge_h
61 return numEdges[cellShapeId];
72 { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 },
73 { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
75 { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 },
76 { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
78 { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 },
79 { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
81 { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 },
82 { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
84 { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 },
85 { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
87 { { 0, 1 }, { 1, 2 }, { 2, 0 }, { -1, -1 }, { -1, -1 }, { -1, -1 },
88 { -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 },
91 { -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 },
94 { -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 },
97 { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
99 { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 }, { -1, -1 }, { -1, -1 },
100 { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
102 { { 0, 1 }, { 1, 2 }, { 2, 0 }, { 0, 3 }, { 1, 3 }, { 2, 3 },
103 { -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 },
106 { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
108 { { 0, 1 }, { 1, 2 }, { 3, 2 }, { 0, 3 }, { 4, 5 }, { 5, 6 },
109 { 7, 6 }, { 4, 7 }, { 0, 4 }, { 1, 5 }, { 3, 7 }, { 2, 6 } },
111 { { 0, 1 }, { 1, 2 }, { 2, 0 }, { 3, 4 }, { 4, 5 }, { 5, 3 },
112 { 0, 3 }, { 1, 4 }, { 2, 5 }, { -1, -1 }, { -1, -1 }, { -1, -1 } },
114 { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 }, { 0, 4 }, { 1, 4 },
115 { 2, 4 }, { 3, 4 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } }
119 return pointsInEdge[cellShapeId][edgeIndex][localPointIndex];
125 template <
typename CellShapeTag>
150 numEdges = numPoints;
189 numEdges = detail::CellEdgeTables{}.NumEdges(shape.
Id);
194 template <
typename CellShapeTag>
201 if ((pointIndex < 0) || (pointIndex > 1))
206 if ((edgeIndex < 0) || (edgeIndex >= detail::CellEdgeTables::MAX_NUM_EDGES))
214 if (edgeIndex >= numEdges)
220 detail::CellEdgeTables table;
236 if ((pointIndex < 0) || (pointIndex > 1))
241 if ((edgeIndex < 0) || (edgeIndex >= numPoints))
247 if (edgeIndex + pointIndex < numPoints)
249 result = edgeIndex + pointIndex;
277 if ((pointIndex < 0) || (pointIndex > 1))
282 if ((edgeIndex < 0) || (edgeIndex >= detail::CellEdgeTables::MAX_NUM_EDGES))
290 return CellEdgeLocalIndex(
295 detail::CellEdgeTables table;
296 if (edgeIndex >= table.NumEdges(shape.
Id))
302 result = table.PointsInEdge(shape.
Id, edgeIndex, pointIndex);
313 template <
typename CellShapeTag,
typename GlobalPo
intIndicesVecType>
318 const GlobalPointIndicesVecType& globalPointIndicesVec,
325 viskores::exec::CellEdgeLocalIndex(numPoints, 0, edgeIndex, shape, localIndex0));
326 viskores::Id pointIndex0 = globalPointIndicesVec[localIndex0];
330 viskores::exec::CellEdgeLocalIndex(numPoints, 1, edgeIndex, shape, localIndex1));
331 viskores::Id pointIndex1 = globalPointIndicesVec[localIndex1];
333 if (pointIndex0 < pointIndex1)
348 #endif //viskores_exec_CellFaces_h