From 21360d91b6851944bf4edcbe7b58f387a337c5da Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Sat, 25 May 2024 12:53:26 -0400 Subject: [PATCH] Fix most failing unit tests Signed-off-by: Michael Jackson --- ...100 Crystallographic Statistics.d3dpipeline | 9 ++------- .../(01) Small IN100 Quick Mesh.d3dpipeline | 2 -- .../(02) Small IN100 Smooth Mesh.d3dpipeline | 2 -- ...03) Small IN100 Mesh Statistics.d3dpipeline | 2 -- .../(04) Small IN100 GBCD.d3dpipeline | 2 -- .../(05) Small IN100 GBCD Metric.d3dpipeline | 2 -- .../test/ComputeSurfaceFeaturesTest.cpp | 18 +++++++++--------- 7 files changed, 11 insertions(+), 26 deletions(-) diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(05) Small IN100 Crystallographic Statistics.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(05) Small IN100 Crystallographic Statistics.d3dpipeline index d6cd341019..6f1926145b 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(05) Small IN100 Crystallographic Statistics.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(05) Small IN100 Crystallographic Statistics.d3dpipeline @@ -21,12 +21,10 @@ "DataContainer/Cell Data/Mask", "DataContainer/Cell Data/Quats", "DataContainer/Cell Feature Data", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Data/FeatureIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/NewGrain Data", "DataContainer/Cell Data/ParentIds", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/NewGrain Data/Active", "DataContainer/Cell Data/IPFColors", "DataContainer/Cell Feature Data/Centroids", @@ -71,15 +69,12 @@ "DataContainer/Cell Data/Mask", "DataContainer/Cell Data/Quats", "DataContainer/Cell Feature Data", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Data/FeatureIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/AvgQuats", - "DataContainer/Cell Feature Data/AvgEulerAngles", - + "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/NewGrain Data", "DataContainer/Cell Data/ParentIds", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/NewGrain Data/Active", "DataContainer/Cell Data/IPFColors" ], @@ -683,7 +678,7 @@ "avg_quats_array_path": "DataContainer/Cell Feature Data/AvgQuats", "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures", "feature_phases_array_path": "DataContainer/Cell Feature Data/Phases", - "find_avg_misors": false, + "compute_avg_misors": false, "misorientation_list_array_name": "MisorientationList", "neighbor_list_array_path": "DataContainer/Cell Feature Data/NeighborhoodList" }, diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(01) Small IN100 Quick Mesh.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(01) Small IN100 Quick Mesh.d3dpipeline index 15724bd4c9..042356da66 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(01) Small IN100 Quick Mesh.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(01) Small IN100 Quick Mesh.d3dpipeline @@ -21,12 +21,10 @@ "DataContainer/Cell Data/Mask", "DataContainer/Cell Data/Quats", "DataContainer/Cell Feature Data", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Data/FeatureIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/NewGrain Data", "DataContainer/Cell Data/ParentIds", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/NewGrain Data/Active", "DataContainer/Cell Data/IPFColors", "DataContainer/Cell Feature Data/Centroids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(02) Small IN100 Smooth Mesh.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(02) Small IN100 Smooth Mesh.d3dpipeline index 40a8a215fd..516ca172aa 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(02) Small IN100 Smooth Mesh.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(02) Small IN100 Smooth Mesh.d3dpipeline @@ -31,7 +31,6 @@ "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/NewGrain Data", "DataContainer/NewGrain Data/Active", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Feature Data/AspectRatios", "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/Cell Feature Data/AvgQuats", @@ -44,7 +43,6 @@ "DataContainer/Cell Feature Data/NumElements", "DataContainer/Cell Feature Data/NumNeighbors", "DataContainer/Cell Feature Data/Omega3s", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/Poles", "DataContainer/Cell Feature Data/Schmids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(03) Small IN100 Mesh Statistics.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(03) Small IN100 Mesh Statistics.d3dpipeline index 4feecf0aaf..e0c29cbe79 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(03) Small IN100 Mesh Statistics.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(03) Small IN100 Mesh Statistics.d3dpipeline @@ -1120,7 +1120,6 @@ "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/NewGrain Data", "DataContainer/NewGrain Data/Active", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Feature Data/AspectRatios", "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/Cell Feature Data/AvgQuats", @@ -1133,7 +1132,6 @@ "DataContainer/Cell Feature Data/NumElements", "DataContainer/Cell Feature Data/NumNeighbors", "DataContainer/Cell Feature Data/Omega3s", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/Poles", "DataContainer/Cell Feature Data/Schmids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(04) Small IN100 GBCD.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(04) Small IN100 GBCD.d3dpipeline index 85219630e1..ba619c12d3 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(04) Small IN100 GBCD.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(04) Small IN100 GBCD.d3dpipeline @@ -1291,7 +1291,6 @@ "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/NewGrain Data", "DataContainer/NewGrain Data/Active", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Feature Data/AspectRatios", "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/Cell Feature Data/AvgQuats", @@ -1304,7 +1303,6 @@ "DataContainer/Cell Feature Data/NumElements", "DataContainer/Cell Feature Data/NumNeighbors", "DataContainer/Cell Feature Data/Omega3s", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/Poles", "DataContainer/Cell Feature Data/Schmids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(05) Small IN100 GBCD Metric.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(05) Small IN100 GBCD Metric.d3dpipeline index ac05e2844c..8ec317f307 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(05) Small IN100 GBCD Metric.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(05) Small IN100 GBCD Metric.d3dpipeline @@ -1291,7 +1291,6 @@ "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/NewGrain Data", "DataContainer/NewGrain Data/Active", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Feature Data/AspectRatios", "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/Cell Feature Data/AvgQuats", @@ -1304,7 +1303,6 @@ "DataContainer/Cell Feature Data/NumElements", "DataContainer/Cell Feature Data/NumNeighbors", "DataContainer/Cell Feature Data/Omega3s", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/Poles", "DataContainer/Cell Feature Data/Schmids", diff --git a/src/Plugins/SimplnxCore/test/ComputeSurfaceFeaturesTest.cpp b/src/Plugins/SimplnxCore/test/ComputeSurfaceFeaturesTest.cpp index c276f36520..132a80f736 100644 --- a/src/Plugins/SimplnxCore/test/ComputeSurfaceFeaturesTest.cpp +++ b/src/Plugins/SimplnxCore/test/ComputeSurfaceFeaturesTest.cpp @@ -86,10 +86,10 @@ void test_impl(const std::vector& geometryDims, const std::string& featu auto executeResult = filter.execute(dataStructure, args); SIMPLNX_RESULT_REQUIRE_VALID(executeResult.result) - REQUIRE_NOTHROW(dataStructure.getDataRefAs(k_SurfaceFeaturesArrayPath)); + REQUIRE_NOTHROW(dataStructure.getDataRefAs(k_SurfaceFeaturesArrayPath)); REQUIRE_NOTHROW(dataStructure.getDataRefAs(k_SurfaceFeaturesExemplaryPath)); - BoolArray& surfaceFeatures = dataStructure.getDataRefAs(k_SurfaceFeaturesArrayPath); + UInt8Array& surfaceFeatures = dataStructure.getDataRefAs(k_SurfaceFeaturesArrayPath); Int8Array& surfaceFeaturesExemplary = dataStructure.getDataRefAs(k_SurfaceFeaturesExemplaryPath); REQUIRE(surfaceFeatures.getSize() == surfaceFeaturesExemplary.getSize()); REQUIRE(surfaceFeatures.getSize() == 796); @@ -106,7 +106,7 @@ void test_impl(const std::vector& geometryDims, const std::string& featu } } // namespace -TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in 3D", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") +TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: 3D", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") { Application::GetOrCreateInstance()->loadPlugins(unit_test::k_BuildDir.view(), true); const nx::core::UnitTest::TestFileSentinel testDataSentinel(nx::core::unit_test::k_CMakeExecutable, nx::core::unit_test::k_TestFilesDir, "6_5_test_data_1.tar.gz", "6_5_test_data_1"); @@ -137,12 +137,12 @@ TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in } { - REQUIRE_NOTHROW(dataStructure.getDataRefAs(computedSurfaceFeaturesPath)); + REQUIRE_NOTHROW(dataStructure.getDataRefAs(computedSurfaceFeaturesPath)); DataPath exemplaryDataPath = Constants::k_CellFeatureDataPath.createChildPath(k_SurfaceFeaturesExemplar); - const DataArray& featureArrayExemplary = dataStructure.getDataRefAs>(exemplaryDataPath); + const BoolArray& featureArrayExemplary = dataStructure.getDataRefAs(exemplaryDataPath); - const DataArray& createdFeatureArray = dataStructure.getDataRefAs>(computedSurfaceFeaturesPath); + const UInt8Array& createdFeatureArray = dataStructure.getDataRefAs(computedSurfaceFeaturesPath); REQUIRE(createdFeatureArray.getNumberOfTuples() == featureArrayExemplary.getNumberOfTuples()); for(usize i = 0; i < featureArrayExemplary.getSize(); i++) @@ -152,17 +152,17 @@ TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in } } -TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in 2D - XY Plane", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") +TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: 2D(XY Plane)", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") { test_impl(std::vector({100, 100, 1}), k_FeatureIds2DFileName, 10000, k_SurfaceFeatures2DExemplaryFileName); } -TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in 2D - XZ Plane", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") +TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: 2D(XZ Plane)", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") { test_impl(std::vector({100, 1, 100}), k_FeatureIds2DFileName, 10000, k_SurfaceFeatures2DExemplaryFileName); } -TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in 2D - YZ Plane", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") +TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: 2D(YZ Plane)", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") { test_impl(std::vector({1, 100, 100}), k_FeatureIds2DFileName, 10000, k_SurfaceFeatures2DExemplaryFileName); }