Error check added for invalid loop indices

This commit is contained in:
Tushar Athawale 2022-02-13 09:44:58 -05:00
parent 91a267eacc
commit 42b62d354b

@ -89,9 +89,11 @@ struct EdgeIndicesWorklet : vtkm::worklet::WorkletReduceByKey
auto cellShape = cellSet.GetCellShape(originCells[0]);
vtkm::IdComponent pointInCellIndex0;
vtkm::exec::CellEdgeLocalIndex(numPointsInCell, 0, edgeIndex, cellShape, pointInCellIndex0);
VTKM_RETURN_ON_ERROR(
vtkm::exec::CellEdgeLocalIndex(numPointsInCell, 0, edgeIndex, cellShape, pointInCellIndex0));
vtkm::IdComponent pointInCellIndex1;
vtkm::exec::CellEdgeLocalIndex(numPointsInCell, 1, edgeIndex, cellShape, pointInCellIndex1);
VTKM_RETURN_ON_ERROR(
vtkm::exec::CellEdgeLocalIndex(numPointsInCell, 1, edgeIndex, cellShape, pointInCellIndex1));
auto globalPointIndicesForCell = cellSet.GetIndices(originCells[0]);
connectivityOut[0] = globalPointIndicesForCell[pointInCellIndex0];