Skip to content

VV: Create Element Array from Feature Array fully V&V'ed - #1689

Open
imikejackson wants to merge 1 commit into
BlueQuartzSoftware:developfrom
imikejackson:vv/copy_feature_array_to_element_array
Open

VV: Create Element Array from Feature Array fully V&V'ed#1689
imikejackson wants to merge 1 commit into
BlueQuartzSoftware:developfrom
imikejackson:vv/copy_feature_array_to_element_array

Conversation

@imikejackson

Copy link
Copy Markdown
Contributor

Summary

Full V&V of CopyFeatureArrayToElementArrayFilter per the v2 MTR V&V policy (Class 1 Analytical oracle + Class 4 Invariant companions), followed by a five-review hardening pass (adversarial, senior-engineer, CPU-perf, memory-perf, out-of-core). V&V report/deviations are archived to OneDrive per program decision.

Correctness

  • Class 1 analytical oracle (hand-derived indirection-lookup constants on a 4x3x1 / 4-feature fixture across float32/1-comp, int32/3-comp, and bool arrays) encoded as inline test assertions; SIMPLNX matched exactly.
  • A/B vs DREAM3D 6.5.171: numeric output bit-identical on valid input (re-verified after the kernel rewrite). 3 documented deviations, all naming/validation semantics: D1 output naming for converted pipelines; D2 over-provisioned feature array accepted in NX (legacy error -5555); D3 legacy bug — silent out-of-bounds garbage for negative feature ids (NX errors -5355).

Bug fixes

  • Selecting a NeighborList/StringArray threw an uncaught std::bad_cast from preflight — parameter now constrained to ArrayType::DataArray (pinned by test).
  • A / in the created-array suffix threw an uncaught std::invalid_argument — now a clean preflight error (-3021).
  • Zero-tuple FeatureIds dereferenced end() (UB) in the shared ValidateFeatureIdsToFeatureAttributeMatrixIndexing — empty-store guard added.

Performance

  • Raw-pointer fast path in the copy kernel when all three stores are concrete in-core DataStore<T> (removes ~3 virtual calls per component-element); OOC/other store types keep the serial virtual path (requireArraysInMemory added).
  • FeatureIds min/max validation hoisted out of the per-selected-array loop (was one full array scan per selected array).

Tests

  • 21 ctest entries (was 17), 13 of 14 enumerated code paths exercised (cancel path excluded). New negative tests: non-DataArray selection, / suffix, name collision (-266), zero-tuple FeatureIds, negative id (-5355), id-out-of-range (-5351), over-provisioned pin (D2). The TEMPLATE_LIST test previously compared uninitialized feature data (could not detect indexing bugs) — now uses distinct per-feature values. SIMPL backcompat test now asserts the converted multi-path value.

Docs

  • Xmdf→Xdmf typo, suffix/multi-array naming semantics, validation error codes, memory note, example pipelines.

Test Plan

  • All 21 filter tests pass on in-core build
  • All 21 filter tests pass on out-of-core build configuration
  • Full SimplnxCore suite green in-core (one pre-existing unrelated failure: EMsoftSO3SamplerFilter missing SIMPL fixture in SimplnxReview)
  • A/B comparison vs 6.5.171 re-run post-rewrite: bit-identical

@imikejackson
imikejackson requested a review from nyoungbq July 24, 2026 01:39
Summary:
- Found and fixed 3 bugs (uncaught std::bad_cast in preflight when a
  NeighborList/StringArray was selected - parameter now constrained to
  ArrayType::DataArray; uncaught std::invalid_argument for a '/' in the
  created-array suffix - now clean preflight error -3021; end() iterator
  dereference (UB) on zero-tuple FeatureIds in the shared
  ValidateFeatureIdsToFeatureAttributeMatrixIndexing utility);
- documented 3 deviations from DREAM3D 6.5.171 (D1 output-array naming for
  converted pipelines, D2 over-provisioned feature array accepted in NX vs
  legacy error -5555, D3 legacy bug: silent out-of-bounds garbage for
  negative feature ids vs NX error -5355) - numeric output bit-identical
  on valid input across float32/int32x3/bool fixtures;
- retired 1 test (Parameter Check exercised parameter validation instead of
  the filter's empty-selection guard; replaced with a guard-specific test);
- augmented existing tests with 6 inlined Class 1 (Analytical) + Class 4
  (Invariant) test fixtures (21 ctest entries total, 13 of 14 code paths;
  cancel path excluded);
- V&V deliverables (report, deviations) archived to OneDrive per program
  decision; no exemplar archive needed (all fixtures in-memory);
- PERF: raw-pointer fast path for in-core DataStore<T> in the copy kernel
  (removes ~3 virtual calls per component-element), FeatureIds min/max
  validation hoisted out of the per-selected-array loop, cancel check
  throttled; OOC and other store types keep the serial virtual path;
- fixed Xmdf->Xdmf typo, documented error codes, memory note, and example
  pipelines in the user-facing doc.

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
@imikejackson
imikejackson force-pushed the vv/copy_feature_array_to_element_array branch from 7fa565f to af11360 Compare July 24, 2026 01:39
@imikejackson imikejackson changed the title VV/PERF: Create Element Array from Feature Array fully V&V'ed VV: Create Element Array from Feature Array fully V&V'ed Jul 24, 2026
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