Fixing dashboard warnings

This commit is contained in:
Abhishek Yenpure 2022-02-02 16:15:12 +05:30
parent 7d10b4f32d
commit 8ddcad824c
5 changed files with 46 additions and 43 deletions

@ -126,8 +126,9 @@ VTKM_EXEC OutType CellMeasure(const vtkm::IdComponent& numPts,
Normalize(unitCenterNormal);
OutType area =
(Dot(unitCenterNormal, cornerNormals[0]) + Dot(unitCenterNormal, cornerNormals[1]) +
Dot(unitCenterNormal, cornerNormals[2]) + Dot(unitCenterNormal, cornerNormals[3])) *
static_cast<OutType>(
(Dot(unitCenterNormal, cornerNormals[0]) + Dot(unitCenterNormal, cornerNormals[1]) +
Dot(unitCenterNormal, cornerNormals[2]) + Dot(unitCenterNormal, cornerNormals[3]))) *
OutType(0.25);
return area;
}
@ -160,7 +161,7 @@ VTKM_EXEC OutType CellMeasure(const vtkm::IdComponent& numPts,
typename PointCoordVecType::ComponentType v1 = pts[1] - pts[0];
typename PointCoordVecType::ComponentType v2 = pts[2] - pts[0];
typename PointCoordVecType::ComponentType v3 = pts[3] - pts[0];
OutType volume = Dot(Cross(v1, v2), v3) / OutType(6.0);
OutType volume = static_cast<OutType>(Dot(Cross(v1, v2), v3)) / OutType(6.0);
return volume;
}
@ -204,7 +205,7 @@ VTKM_EXEC OutType CellMeasure(const vtkm::IdComponent& numPts,
efg3 -= pts[2];
efg3 -= pts[3];
OutType volume = Dot(Cross(efg2, efg3), efg1) / OutType(64.0);
OutType volume = static_cast<OutType>(Dot(Cross(efg2, efg3), efg1)) / OutType(64.0);
return volume;
}
@ -224,17 +225,17 @@ VTKM_EXEC OutType CellMeasure(const vtkm::IdComponent& numPts,
typename PointCoordVecType::ComponentType v0 = pts[1] - pts[0];
typename PointCoordVecType::ComponentType v1 = pts[2] - pts[0];
typename PointCoordVecType::ComponentType v2 = pts[3] - pts[0];
OutType volume = Dot(Cross(v0, v1), v2) / OutType(6.0);
OutType volume = static_cast<OutType>(Dot(Cross(v0, v1), v2)) / OutType(6.0);
typename PointCoordVecType::ComponentType v3 = pts[4] - pts[1];
typename PointCoordVecType::ComponentType v4 = pts[5] - pts[1];
typename PointCoordVecType::ComponentType v5 = pts[3] - pts[1];
volume += Dot(Cross(v3, v4), v5) / OutType(6.0);
volume += static_cast<OutType>(Dot(Cross(v3, v4), v5)) / OutType(6.0);
typename PointCoordVecType::ComponentType v6 = pts[5] - pts[1];
typename PointCoordVecType::ComponentType v7 = pts[2] - pts[1];
typename PointCoordVecType::ComponentType v8 = pts[3] - pts[1];
volume += Dot(Cross(v6, v7), v8) / OutType(6.0);
volume += static_cast<OutType>(Dot(Cross(v6, v7), v8)) / OutType(6.0);
return volume;
}
@ -255,12 +256,12 @@ VTKM_EXEC OutType CellMeasure(const vtkm::IdComponent& numPts,
typename PointCoordVecType::ComponentType v1 = pts[1] - pts[0];
typename PointCoordVecType::ComponentType v2 = pts[3] - pts[0];
typename PointCoordVecType::ComponentType v3 = pts[4] - pts[0];
OutType volume = Dot(Cross(v1, v2), v3) / OutType(6.0);
OutType volume = static_cast<OutType>(Dot(Cross(v1, v2), v3)) / OutType(6.0);
typename PointCoordVecType::ComponentType v4 = pts[1] - pts[2];
typename PointCoordVecType::ComponentType v5 = pts[3] - pts[2];
typename PointCoordVecType::ComponentType v6 = pts[4] - pts[2];
volume += Dot(Cross(v5, v4), v6) / OutType(6.0);
volume += static_cast<OutType>(Dot(Cross(v5, v4), v6)) / OutType(6.0);
return volume;
}

@ -2316,7 +2316,7 @@ public:
prevLowest = lowest;
lowest = largest;
}
totalErrorOut = totalError;
totalErrorOut = TEO(totalError);
}
};
struct CheckFor2D : public vtkm::worklet::WorkletVisitCellsWithPoints

@ -110,8 +110,8 @@ VTKM_EXEC OutType CellAspectRatioMetric(const vtkm::IdComponent& numPts,
const Vector X1 = GetQuadX0<Scalar, Vector, CollectionOfPoints>(pts);
const Vector X2 = GetQuadX1<Scalar, Vector, CollectionOfPoints>(pts);
const Scalar x1 = vtkm::Sqrt(vtkm::MagnitudeSquared(X1));
const Scalar x2 = vtkm::Sqrt(vtkm::MagnitudeSquared(X2));
const Scalar x1 = static_cast<Scalar>(vtkm::Sqrt(vtkm::MagnitudeSquared(X1)));
const Scalar x2 = static_cast<Scalar>(vtkm::Sqrt(vtkm::MagnitudeSquared(X2)));
if (x1 <= Scalar(0.0) || x2 <= Scalar(0.0))
{
return vtkm::Infinity<Scalar>();
@ -142,9 +142,9 @@ VTKM_EXEC OutType CellAspectRatioMetric(const vtkm::IdComponent& numPts,
const Vector X2 = GetHexX2<Scalar, Vector, CollectionOfPoints>(pts);
const Vector X3 = GetHexX3<Scalar, Vector, CollectionOfPoints>(pts);
const Scalar x1 = vtkm::Sqrt(vtkm::MagnitudeSquared(X1));
const Scalar x2 = vtkm::Sqrt(vtkm::MagnitudeSquared(X2));
const Scalar x3 = vtkm::Sqrt(vtkm::MagnitudeSquared(X3));
const Scalar x1 = static_cast<Scalar>(vtkm::Sqrt(vtkm::MagnitudeSquared(X1)));
const Scalar x2 = static_cast<Scalar>(vtkm::Sqrt(vtkm::MagnitudeSquared(X2)));
const Scalar x3 = static_cast<Scalar>(vtkm::Sqrt(vtkm::MagnitudeSquared(X3)));
if (x1 <= Scalar(0.0) || x2 <= Scalar(0.0) || x3 <= Scalar(0.0))
{

@ -93,7 +93,8 @@ VTKM_EXEC OutType CellConditionMetric(const vtkm::IdComponent& numPts,
const Vector L2 = GetTriangleL2<Scalar, Vector, CollectionOfPoints>(pts);
const Scalar q =
(vtkm::Dot(L2, L2) + vtkm::Dot(L1, L1) + vtkm::Dot(L1, L2)) / (two * area * rootThree);
static_cast<Scalar>((vtkm::Dot(L2, L2) + vtkm::Dot(L1, L1) + vtkm::Dot(L1, L2))) /
(two * area * rootThree);
return q;
}
@ -164,7 +165,7 @@ VTKM_EXEC OutType CellConditionMetric(const vtkm::IdComponent& numPts,
const Vector C2 = ((negTwo * L2) - L0) / root3;
const Vector C3 = ((three * L3) + L2 - L0) / root6;
const Scalar cDet = vtkm::Dot(C1, vtkm::Cross(C2, C3));
const Scalar cDet = static_cast<Scalar>(vtkm::Dot(C1, vtkm::Cross(C2, C3)));
if (cDet <= Scalar(0.0))
{
@ -175,8 +176,9 @@ VTKM_EXEC OutType CellConditionMetric(const vtkm::IdComponent& numPts,
const Vector C2xC3 = vtkm::Cross(C2, C3);
const Vector C1xC3 = vtkm::Cross(C1, C3);
const Scalar t1 = vtkm::Dot(C1, C1) + vtkm::Dot(C2, C2) + vtkm::Dot(C3, C3);
const Scalar t2 = vtkm::Dot(C1xC2, C1xC2) + vtkm::Dot(C2xC3, C2xC3) + vtkm::Dot(C1xC3, C1xC3);
const Scalar t1 = static_cast<Scalar>(vtkm::Dot(C1, C1) + vtkm::Dot(C2, C2) + vtkm::Dot(C3, C3));
const Scalar t2 = static_cast<Scalar>(vtkm::Dot(C1xC2, C1xC2) + vtkm::Dot(C2xC3, C2xC3) +
vtkm::Dot(C1xC3, C1xC3));
const Scalar q = vtkm::Sqrt(t1 * t2) / (three * cDet);
return q;

@ -80,32 +80,32 @@ VTKM_EXEC OutType CellDimensionMetric(const vtkm::IdComponent& numPts,
UNUSED(ec);
OutType gradop[8][3];
OutType x1 = pts[0][0];
OutType x2 = pts[1][0];
OutType x3 = pts[2][0];
OutType x4 = pts[3][0];
OutType x5 = pts[4][0];
OutType x6 = pts[5][0];
OutType x7 = pts[6][0];
OutType x8 = pts[7][0];
OutType x1 = static_cast<OutType>(pts[0][0]);
OutType x2 = static_cast<OutType>(pts[1][0]);
OutType x3 = static_cast<OutType>(pts[2][0]);
OutType x4 = static_cast<OutType>(pts[3][0]);
OutType x5 = static_cast<OutType>(pts[4][0]);
OutType x6 = static_cast<OutType>(pts[5][0]);
OutType x7 = static_cast<OutType>(pts[6][0]);
OutType x8 = static_cast<OutType>(pts[7][0]);
OutType y1 = pts[0][1];
OutType y2 = pts[1][1];
OutType y3 = pts[2][1];
OutType y4 = pts[3][1];
OutType y5 = pts[4][1];
OutType y6 = pts[5][1];
OutType y7 = pts[6][1];
OutType y8 = pts[7][1];
OutType y1 = static_cast<OutType>(pts[0][1]);
OutType y2 = static_cast<OutType>(pts[1][1]);
OutType y3 = static_cast<OutType>(pts[2][1]);
OutType y4 = static_cast<OutType>(pts[3][1]);
OutType y5 = static_cast<OutType>(pts[4][1]);
OutType y6 = static_cast<OutType>(pts[5][1]);
OutType y7 = static_cast<OutType>(pts[6][1]);
OutType y8 = static_cast<OutType>(pts[7][1]);
OutType z1 = pts[0][2];
OutType z2 = pts[1][2];
OutType z3 = pts[2][2];
OutType z4 = pts[3][2];
OutType z5 = pts[4][2];
OutType z6 = pts[5][2];
OutType z7 = pts[6][2];
OutType z8 = pts[7][2];
OutType z1 = static_cast<OutType>(pts[0][2]);
OutType z2 = static_cast<OutType>(pts[1][2]);
OutType z3 = static_cast<OutType>(pts[2][2]);
OutType z4 = static_cast<OutType>(pts[3][2]);
OutType z5 = static_cast<OutType>(pts[4][2]);
OutType z6 = static_cast<OutType>(pts[5][2]);
OutType z7 = static_cast<OutType>(pts[6][2]);
OutType z8 = static_cast<OutType>(pts[7][2]);
OutType z24 = z2 - z4;
OutType z52 = z5 - z2;