feat(linear-static-3d-euler-beam): step 18 - sparse-assembly
This commit is contained in:
@@ -716,3 +716,66 @@
|
||||
| REVIEW1-VERIFY-discovery | `ctest --test-dir .harness/build -C Debug --show-only=json-v1` | 0 | 42 tests discovered, including the unchanged three exact ParallelFor names |
|
||||
| REVIEW1-VERIFY-full | `ctest --test-dir .harness/build -C Debug --output-on-failure` | 0 | full accumulated suite passed 42/42 |
|
||||
| REVIEW1-VERIFY-scans | public TBB leak, production scope, atomic reliability, reference, and diff/whitespace scans | 0 | public leaks 0; forbidden production scope 0; atomic vectors 5; relaxed duplicate counters 4; legacy non-atomic visit/output paths 0; reference unchanged; diff clean |
|
||||
|
||||
## Step 18 — sparse-assembly
|
||||
|
||||
- task_id: `TASK-18`
|
||||
- status: `completed`
|
||||
- changed_files: `include/fesa/math/sparse_matrix.hpp`,
|
||||
`src/fesa/math/sparse_matrix.cpp`,
|
||||
`include/fesa/assembly/sparse_assembler.hpp`,
|
||||
`src/fesa/assembly/sparse_assembler.cpp`,
|
||||
`tests/unit/math/sparse_matrix_test.cpp`,
|
||||
`tests/unit/assembly/sparse_assembler_test.cpp`, `src/fesa/CMakeLists.txt`,
|
||||
`tests/CMakeLists.txt`,
|
||||
`docs/implementation-plans/linear-static-3d-euler-beam-implementation-report.md`,
|
||||
`phases/linear-static-3d-euler-beam/index.json`,
|
||||
`.superpowers/sdd/linear-static-3d-euler-beam/task-18-report.md`
|
||||
- requirement_ids: `FESA-REQ-LS3DEB-024`, `FESA-REQ-LS3DEB-025`,
|
||||
`FESA-REQ-LS3DEB-034`, `FESA-REQ-LS3DEB-035`
|
||||
- test_ids: `T18-SPARSE-001`, `T18-SPARSE-002`, `T18-SPARSE-003`,
|
||||
`T18-SPARSE-004`, `T18-SPARSE-005`
|
||||
|
||||
| stage | exact command | exit_code | expected_or_observed_result | evidence_tail |
|
||||
| --- | --- | ---: | --- | --- |
|
||||
| RED-build | `cmake --build .harness/build --config Debug --target fesa_tests` | 1 | Exactly five planned tests were registered before production and both sparse public APIs were absent | CMake regenerated, then MSVC C1083 reported missing `fesa/assembly/sparse_assembler.hpp` and `fesa/math/sparse_matrix.hpp` from the two new test files |
|
||||
| GREEN-build | `cmake --build .harness/build --config Debug --target fesa_tests` | 0 | Minimum CSR owner, deterministic assembler, five tests, solver library, and unit executable compile and link | `sparse_assembler.cpp`, `sparse_matrix.cpp`, both tests, `fesa_solver.lib`, and `fesa_unit_tests.exe` built without a FESA warning under `/W4 /WX` |
|
||||
| GREEN-test | `ctest --test-dir .harness/build -C Debug -R SparseAssembly --output-on-failure` | 0 | CSR validation/reduction/zero policy and serial/TBB deterministic beam assembly pass | 5/5 exact `SparseAssembly` tests passed |
|
||||
| VERIFY-configure | `cmake -S . -B .harness/build -A x64 -DFESA_GTEST_SOURCE_DIR=C:/git/googletest "-DMKL_DIR=C:/Program Files (x86)/Intel/oneAPI/mkl/2026.1/lib/cmake/mkl" "-DTBB_DIR=C:/Program Files (x86)/Intel/oneAPI/tbb/2023.1/lib/cmake/tbb" "-DHDF5_DIR=C:/Program Files/HDF_Group/HDF5/2.1.1/cmake"` | 0 | Approved explicit-dependency MSVC x64 build tree generates | Windows SDK, oneMKL 2026.1, oneTBB, and HDF5 resolved; configure and generate completed |
|
||||
| VERIFY-build | `cmake --build .harness/build --config Debug` | 0 | Full Debug build passes without a new FESA warning | `fesa_solver.lib` and `fesa_unit_tests.exe` built under `/W4 /WX` |
|
||||
| VERIFY-targeted | `ctest --test-dir .harness/build -C Debug -R SparseAssembly --output-on-failure` | 0 | Focused Step 18 suite remains green | 5/5 exact `SparseAssembly` tests passed |
|
||||
| VERIFY-discovery | `ctest --test-dir .harness/build -C Debug --show-only=json-v1` | 0 | CTest discovers the accumulated suite and all five exact SparseAssembly names | 47 tests discovered, including 5 `SparseAssembly` tests, with feature/unit labels |
|
||||
| VERIFY-full | `ctest --test-dir .harness/build -C Debug --output-on-failure` | 0 | Full accumulated C++ suite has zero failures | 47/47 tests passed |
|
||||
| VERIFY-contract-scans | Public backend/upward-dependency/PARDISO, assembler shared-CSR-member, dense inheritance, exact-test-count, and CMake registration scans using fail-on-match/count `rg` wrappers | 0 | Sparse storage and reduction remain behind the exact approved boundaries | public backend leaks 0; math-header upward dependencies 0; PARDISO matches 0; assembler CSR-member writes 0; dense inheritance 0; tests 5; registrations 2/2 |
|
||||
| VERIFY-determinism | Exact bytes, reversed completion, serial/TBB, repeated TBB, tuple-cancellation, structural-zero, empty-row, multiply, validation, and symmetry assertions in the targeted suite | 0 | NR-O02 fixed-order reduction and NR-T11 scheduler independence are observable | one serial, one TBB, one reverse-order, and eight repeated TBB assemblies produced byte-identical row/column/value vectors; duplicate cancellation produced the tuple-ordered literal `1.0` |
|
||||
| VERIFY-diff | `git diff --check` plus trailing-whitespace scan over the six new files | 0 | Tracked and untracked Step 18 files have no whitespace errors | Diff check exit 0; new-file trailing whitespace matches 0 |
|
||||
| VERIFY-reference | `git diff --exit-code -- reference/`; `git status --short -- reference/` | 0 | Approved legacy reference artifacts remain read-only and unchanged | Reference diff exit 0 and reference status empty |
|
||||
|
||||
- contract_checks: `SparseMatrix` is a separate owning CSR type with 0-based
|
||||
row offsets and sorted-unique columns. It validates row-offset shape/range,
|
||||
column range/order/uniqueness, COO dimensions, expected-pattern membership,
|
||||
finite inputs, finite ordered sums, and multiply dimensions. Empty rows and
|
||||
rectangular/zero structural layouts remain valid; every expected slot is
|
||||
emitted even when its exact stored value is zero.
|
||||
- contract_checks: COO contributions are stable-sorted by exactly
|
||||
`(row,column,elementOrder,localOrder)` and duplicates are accumulated in
|
||||
that sequence. The cancellation fixture distinguishes tuple order from
|
||||
incoming vector order, and input permutation retains the same result.
|
||||
- contract_checks: `SparseAssembler` validates model/DOF dimensions,
|
||||
element references, and scatter ownership before work. It invokes the
|
||||
injected `ParallelFor` once over stable active-element order; each worker
|
||||
writes only its caller-indexed 144-entry row-major local buffer and failure
|
||||
slot. CSR allocation and reduction occur only after the parallel call.
|
||||
- contract_checks: the public headers expose no oneTBB, MKL, HDF5, or PARDISO
|
||||
type. `SparseMatrix` neither includes nor inherits dense `Matrix`; the math
|
||||
header forward-declares DofManager-owned `SparsePattern` to avoid a public
|
||||
upward include.
|
||||
- generated_evidence: `.harness/build/src/fesa/Debug/fesa_solver.lib`,
|
||||
`.harness/build/tests/Debug/fesa_unit_tests.exe`
|
||||
- reference_diff: unchanged; `git diff --exit-code -- reference/` exit 0
|
||||
- handoff: Step 19 can consume canonical full CSR arrays and deterministic
|
||||
matrix-vector multiplication without depending on dense storage, oneTBB,
|
||||
or a solver backend. Step 20 remains solely responsible for PARDISO
|
||||
descriptors, indexing conversion, factorization, and substitution.
|
||||
- concerns: none; no implementation, environment, backend, or upstream
|
||||
contract conflict was found.
|
||||
|
||||
Reference in New Issue
Block a user