Skip to content

VV: Compute Schmids Fully V&V'ed - #1723

Open
imikejackson wants to merge 3 commits into
BlueQuartzSoftware:developfrom
imikejackson:vv/ComputeSchmids
Open

VV: Compute Schmids Fully V&V'ed#1723
imikejackson wants to merge 3 commits into
BlueQuartzSoftware:developfrom
imikejackson:vv/ComputeSchmids

Conversation

@imikejackson

Copy link
Copy Markdown
Contributor

Summary

Full V&V of ComputeSchmidsFilter, including fixes to EbsdLib itself on its topic/3_1_1_staging branch. Exact-arithmetic Class 1 oracles (textbook Schmid factors: 1/√6 for ⟨001⟩ loading, etc.) replace the circular exemplar comparison against 6_6_stats_test_v2 (archive lines untouched — other consumers remain; the retained archive test now asserts the exact pre-fix bias relationship instead of raw equality).

⚠️ MERGE DEPENDENCY: this PR bumps vcpkg.json to EbsdLib >= 3.1.1 and cannot configure or pass CI until EbsdLib 3.1.1 is released (staging commits exist locally: exact Schmid normalizer constants replacing 1.732f/1.414f — which allowed Schmid factors above the physical 0.5 bound — plus HexagonalLow/stub-class output initialization and a stub-locking test).

  • SIMPLNX-side: adds phase-id bounds preflight guards (-13501/-13502); explicit zero fills on all created outputs — investigated experimentally and reclassified as a latent port regression (the in-core store factory hard-codes zero init; the fill is load-bearing only for external large-data store factories, logged open); per-iteration reinit hardening against EbsdLib stub leaks.
  • Deviations: the pre-fix ≤3.1.0 EbsdLib bias (+0.0180%, quantified, with the >0.5 violation recorded); the override-path SlipSystems numbering divergence vs legacy traced to reordered symmetry tables (same six tying group elements, different first-hit — a labeling convention, not a value difference); legacy initializes Phis/Lambdas to −301; the angleComps cosine-vs-radian unit flip documented in the user doc; twelve hexagonal sqrt-divisor literals recorded as known-open follow-up (one carries 3.4× the cubic bias).
  • A/B vs stock 6.5.171: 93/93 predictions confirmed, including the bias factors to 1e-8. Equivariance, scale-invariance, and 0 ≤ m ≤ 0.5 invariants asserted.

Test Plan

  • ctest -R "OrientationAnalysis::ComputeSchmids" — 6/6 pass (601 assertions), built against local EbsdLib staging via the NX-Com-Qt69-Vtk96-Rel-EbsdLib preset
  • ctest -R "OrientationAnalysis::" — 269/269 unit tests in that build

Note for merge sequencing: this PR and the ComputeShapes PR both add vv/provenance/6_6_stats_test_v2.md — whichever merges second needs a trivial add/add content reconciliation.

Summary:
- Found and fixed 4 bugs (two in EbsdLib on topic/3_1_1_staging: CubicOps normalized
  the Schmid factor with the float literals 1.732f/1.414f instead of sqrt(3)/sqrt(2),
  inflating every value by +0.0180353% and letting it exceed the physical maximum of
  0.5; and HexagonalLowOps read schmidfactor uninitialized while the seven no-slip-system
  Laue classes left angleComps untouched, leaking the previous Feature's angles. Two in
  simplnx: all five output arrays were created with no fill value where legacy passed
  initValue 0, so the filter stated no requirement about the rows it never writes -- a
  latent port regression, since the in-core store factory supplies a zero initValue of
  its own, established by experiment and recorded as such; and
  crystalStructures[featurePhases[i]] was an unbounded index);
- documented 5 deviations from DREAM3D 6.5.171 (D1 +0.018% normalizer bias, D2 -301
  sentinel in the legacy angle arrays, D3 undefined EbsdLib Schmid outputs plus twelve
  known-open SC-2-class hexagonal divisors and the new slipsys=0 sentinel, D4 the
  Phis/Lambdas cosines-vs-radians unit flip and renamed arrays, D5 the table-relative
  override-path symmetry-operator index);
- retired 0 tests (both pre-existing tests kept; the archive-consuming test's three float
  comparisons were converted from equality to the exact per-component EbsdLib bias
  relationship, which is strictly stronger and keeps all 214 regression checks);
- augmented existing tests with 12 value-asserting *Class 1 (Analytical) + Class 4
  (Invariant)* fixtures plus 5 option/guard fixtures across 4 new test cases, 601
  assertions total (measured);
- added 3 V&V source-tree deliverables (report, deviations, provenance);
- documented the loading-direction normalization, the tie-break rule, both Slip Systems
  numbering schemes and their two "no slip system found" zero cases, the Phis/Lambdas
  unit flip, and corrected the claim that Poles is a Miller index plus the (05) -> (04)
  example-pipeline citation in the user-facing doc.

MERGE DEPENDENCY: this PR is blocked until EbsdLib 3.1.1 is released. Two of the four
fixes live in EbsdLib and the Class 1 oracle asserts the post-fix values to 1e-6, so the
branch carries a vcpkg.json bump of ebsdlib from "version>=" 3.1.0 to 3.1.1. Until that
version is published, vcpkg rejects the manifest at configure time in EVERY preset --
including the local SIMPLNX_USE_LOCAL_EBSD_LIB=ON preset, because manifest version
constraints are resolved regardless of which features are enabled. All verification was
performed with the bump not applied, against the local EbsdLib source through the
NX-Com-Qt69-Vtk96-Rel-EbsdLib preset; the bump was applied last as a manifest-only change.
Do not reconfigure a build directory on this branch until 3.1.1 exists. This consequence
was accepted by the requester on 2026-08-20.

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant