FIX: CompareArrays all-elements check + GBCD double-precision Pi/180#1607
Open
joeykleingers wants to merge 3 commits intoBlueQuartzSoftware:developfrom
Open
FIX: CompareArrays all-elements check + GBCD double-precision Pi/180#1607joeykleingers wants to merge 3 commits intoBlueQuartzSoftware:developfrom
joeykleingers wants to merge 3 commits intoBlueQuartzSoftware:developfrom
Conversation
Remove erroneous `break` after the first mismatched element in both CompareArrays and CompareFloatArraysWithNans. The break caused both functions to stop after finding the first difference that was within EPSILON, silently skipping all remaining elements. This masked pre-existing exemplar-vs-NX mismatches in ComputeFeatureFaceMisorientation and ComputeGBCDMetricBased tests.
Three sites in the algorithm multiplied double-precision resolution and angle values by k_PiOver180F (a float constant). Float promotion to double preserves the quantized float bits rather than recovering the true M_PI/180.0, introducing a ~1e-10 deviation from the legacy SIMPL algorithm (which uses double k_PiOver180). Over ~756k triangles times ~2300 symmetry operations the deviation flipped two near-boundary triangles in/out of the selected set, shifting a handful of distribution bin values by ~3e-2. Switch the three multiplications to the existing k_PiOver180D double constant so the resolution thresholds and fixed-misorientation angle are computed at full double precision. Signed-off-by: Joey Kleingers <joey.kleingers@bluequartz.net>
The stored 6_6_find_gbcd_metric_based.tar.gz exemplar was generated by the original float-precision DREAM3D FindGBCDMetricBased filter and no longer matches the simplnx algorithm after the double-precision fix (BUG: Use double-precision Pi/180 in ComputeGBCDMetricBased). Publish a fresh exemplar from the double-precision legacy pipeline and repoint the tests at it. * Rename archive and top-level folder from 6_6_find_gbcd_metric_based to compute_gbcd_metric_based (drops the legacy 6_6_ prefix in accordance with current archive-naming conventions). * Drop the 6_6_ prefix from the stored .dat exemplar filenames; input .dream3d filename follows the folder name. * ComputeGBPDMetricBasedTest's InValid section reuses the GBCD archive (for crystal-structures and mesh input); update its paths too. * CMakeLists.txt download_test_data entry bumped to the new archive name and SHA512. Signed-off-by: Joey Kleingers <joey.kleingers@bluequartz.net>
28068e6 to
d0d9fe6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UnitTestCommon.hppstopped at the first element within EPSILON via a spuriousbreak. Removing it revealed pre-existing exemplar-vs-NX mismatches the helper had been silently hiding (ComputeFeatureFaceMisorientation,ComputeGBCDMetricBased).k_PiOver180F(float). Promoting float→double preserves the quantized float bits rather than recovering trueM_PI/180.0, introducing a ~1e-10 deviation from the legacy double-precision SIMPL algorithm. Over ~756k triangles × ~2300 symmetry ops this flipped two near-boundary triangles in/out of the selected set, shifting a handful of distribution bin values by ~3e-2. Switched tok_PiOver180D(double) at all three sites.6_6_find_gbcd_metric_based.tar.gzwas generated by the original float-precision DREAM3DFindGBCDMetricBasedand no longer matches the corrected NX output. Published a fresh exemplarcompute_gbcd_metric_based.tar.gzto the Data_Archive release (dropped legacy6_6_prefix per current naming conventions) and repointed bothComputeGBCDMetricBasedTestandComputeGBPDMetricBasedTestat the new archive. The legacy6_6_find_gbcd_metric_based.tar.gzremains in the release for any consumers still referencing it.Test plan
OrientationAnalysis::ComputeGBCDMetricBasedFilter: Valid Filter Executionpasses in-coreOrientationAnalysis::ComputeGBCDMetricBasedFilter: InValid Filter Executionpasses in-coreOrientationAnalysis::ComputeGBPDMetricBasedFilter: Valid Filter Executionpasses in-coreOrientationAnalysis::ComputeGBPDMetricBasedFilter: InValid Filter Executionpasses in-core (same archive)simplnx-ooc-Rel(verified onooc-filter-optimizationswith the two fixes cherry-picked, since this branch's base predates the OOC infrastructure)