diff --git a/vtkm/exec/CellMeasure.h b/vtkm/exec/CellMeasure.h index 0efc8e00c..b1ea80c53 100644 --- a/vtkm/exec/CellMeasure.h +++ b/vtkm/exec/CellMeasure.h @@ -101,6 +101,12 @@ VTKM_EXEC OutType CellMeasure(const vtkm::IdComponent& numPts, pts[0] - pts[3], }; + if (vtkm::MagnitudeSquared(edges[0]) == OutType(0.0) || + vtkm::MagnitudeSquared(edges[1]) == OutType(0.0) || + vtkm::MagnitudeSquared(edges[2]) == OutType(0.0) || + vtkm::MagnitudeSquared(edges[3]) == OutType(0.0)) + return OutType(0.0); + typename PointCoordVecType::ComponentType cornerNormals[4] = { Cross(edges[3], edges[0]), Cross(edges[0], edges[1]), diff --git a/vtkm/worklet/MeshQuality.h b/vtkm/worklet/MeshQuality.h index f06e99d87..798dabf01 100644 --- a/vtkm/worklet/MeshQuality.h +++ b/vtkm/worklet/MeshQuality.h @@ -80,16 +80,6 @@ public: const PointCoordVecType& pts, OutType& metricValue) const { - if (index == 2120) - { - std::cout << "Start Debug " << std::endl; - std::cout << "Num Points : " << numPoints << std::endl; - for (int i = 0; i < numPoints; i++) - { - std::cout << pts[i] << std::endl; - } - std::cout << "End Debug " << std::endl; - } vtkm::UInt8 thisId = shape.Id; if (shape.Id == vtkm::CELL_SHAPE_POLYGON) {