Commit d1d6f3df authored by Abhishek Yenpure's avatar Abhishek Yenpure
Browse files

Adding fixes to identify degenerate cells

parent dff7ef70
Pipeline #264634 failed with stages
in 13 seconds
......@@ -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]),
......
......@@ -80,17 +80,7 @@ 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;
vtkm::UInt8 thisId = shape.Id;
if (shape.Id == vtkm::CELL_SHAPE_POLYGON)
{
if (numPoints == 3)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment