Commit f5a5950d authored by Steven Walton's avatar Steven Walton

I'm not sure about these files. I'm getting errors on them that are really...

I'm not sure about these files. I'm getting errors on them that are really weird and as soon as I remove Dimension the errors go away. So I'm not sure if it is Dim or these causing the errors (pair commit)
parent 381d9307
......@@ -34,7 +34,7 @@ namespace filter
//Names of the available cell metrics, for use in
//the output dataset fields
static const std::string MetricNames[] = {
"area", "aspectGamma", "aspectRatio", "condition", "diagonalRatio", "jacobian",
"area", "aspectGamma", "aspectRatio", "condition", "diagonalRatio", "dimension", "jacobian",
"minAngle", "maxAngle", "oddy", "relativeSize", "scaledJacobian", "shape",
"shear", "skew", "stretch", "taper", "volume", "warpage"
};
......@@ -48,6 +48,7 @@ enum class CellMetric
ASPECT_RATIO,
CONDITION,
DIAGONAL_RATIO,
DIMENSION,
JACOBIAN,
MIN_ANGLE,
MAX_ANGLE,
......
......@@ -183,6 +183,10 @@ int TestMeshQuality()
metrics.push_back(vtkm::filter::CellMetric::DIAGONAL_RATIO);
metricName.push_back("diagonalRatio");
*/
FloatVec dimExpectedValues = {-1, -1, -1, -1, -1, -1, 0.707107};
expectedValues.push_back(dimExpectedValues);
metrics.push_back(vtkm::filter::CellMetric::DIMENSION);
metricName.push_back("dimension");
unsigned long numTests = (unsigned long)metrics.size();
for (unsigned long i = 0; i < numTests; i++)
......
......@@ -25,6 +25,7 @@
#include "vtkm/exec/cellmetrics/CellDiagonalRatioMetric.h"
#include "vtkm/exec/cellmetrics/CellEdgeRatioMetric.h"
#include "vtkm/exec/cellmetrics/CellJacobianMetric.h"
#include "vtkm/exec/cellmetrics/CellDimensionMetric.h"
#include "vtkm/worklet/WorkletMapTopology.h"
namespace vtkm
......@@ -111,6 +112,9 @@ protected:
case MetricTagType::VOLUME:
metricValue = vtkm::exec::CellMeasure<OutType>(numPts, pts, tag, *this);
break;
case MetricTagType::DIMENSION:
metricValue =
vtkm::exec::cellmetrics::CellDimensionMetric<OutType>(numPts, pts, tag, *this);
case MetricTagType::EMPTY:
break;
default:
......
Markdown is supported
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