tutorial example fixes to resolve warnings
This commit is contained in:
parent
5fc268d312
commit
8e57362a23
@ -88,10 +88,23 @@ struct EdgeIndicesWorklet : vtkm::worklet::WorkletReduceByKey
|
||||
vtkm::IdComponent edgeIndex = originEdges[0];
|
||||
auto cellShape = cellSet.GetCellShape(originCells[0]);
|
||||
|
||||
vtkm::ErrorCode error;
|
||||
vtkm::IdComponent pointInCellIndex0;
|
||||
error =
|
||||
vtkm::exec::CellEdgeLocalIndex(numPointsInCell, 0, edgeIndex, cellShape, pointInCellIndex0);
|
||||
if (error != vtkm::ErrorCode::Success)
|
||||
{
|
||||
this->RaiseError(vtkm::ErrorString(error);
|
||||
return;
|
||||
}
|
||||
vtkm::IdComponent pointInCellIndex1;
|
||||
error =
|
||||
vtkm::exec::CellEdgeLocalIndex(numPointsInCell, 1, edgeIndex, cellShape, pointInCellIndex1);
|
||||
if (error != vtkm::ErrorCode::Success)
|
||||
{
|
||||
this->RaiseError(vtkm::ErrorString(error);
|
||||
return;
|
||||
}
|
||||
|
||||
auto globalPointIndicesForCell = cellSet.GetIndices(originCells[0]);
|
||||
connectivityOut[0] = globalPointIndicesForCell[pointInCellIndex0];
|
||||
|
@ -38,7 +38,7 @@ struct ConvertPointFieldToCells : vtkm::worklet::WorkletVisitCellsWithPoints
|
||||
{
|
||||
outCellField = outCellField + inPointFieldVec[pointIndex];
|
||||
}
|
||||
outCellField = outCellField / static_cast<OutCellFieldType>(numPoints);
|
||||
outCellField = outCellField / static_cast<vtkm::FloatDefault>(numPoints);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user