20 #ifndef vtk_m_worklet_cellmetrics_CellStretchMetric_h
21 #define vtk_m_worklet_cellmetrics_CellStretchMetric_h
44 #define UNUSED(expr) (void)(expr);
53 template <
typename OutType,
typename Po
intCoordVecType,
typename CellShapeType>
55 const PointCoordVecType& pts,
66 template <
typename OutType,
typename Po
intCoordVecType>
68 const PointCoordVecType& pts,
69 vtkm::CellShapeTagQuad,
74 using Scalar = OutType;
75 using CollectionOfPoints = PointCoordVecType;
76 using Vector =
typename PointCoordVecType::ComponentType;
79 const Scalar LMin = GetQuadLMin<Scalar, Vector, CollectionOfPoints>(pts);
80 const Scalar DMax = GetQuadDMax<Scalar, Vector, CollectionOfPoints>(pts);
82 if (DMax <= Scalar(0.0))
84 return vtkm::Infinity<Scalar>();
87 const Scalar q = root2 * (LMin / DMax);
92 template <
typename OutType,
typename Po
intCoordVecType>
94 const PointCoordVecType& pts,
95 vtkm::CellShapeTagHexahedron,
100 using Scalar = OutType;
101 using CollectionOfPoints = PointCoordVecType;
102 using Vector =
typename PointCoordVecType::ComponentType;
105 const Scalar LMin = GetHexLMin<Scalar, Vector, CollectionOfPoints>(pts);
106 const Scalar DMax = GetHexDMax<Scalar, Vector, CollectionOfPoints>(pts);
108 if (DMax <= Scalar(0.0))
110 return vtkm::Infinity<Scalar>();
113 const Scalar q = root3 * (LMin / DMax);
120 #endif // vtk_m_worklet_cellmetrics_CellStretchMetric_h