feat(linear-static-3d-euler-beam): step 9 - dense-math-adapters

This commit is contained in:
KOKO\Mimi
2026-08-09 11:36:01 +09:00
parent a3a5edcdb0
commit 21f59235e1
9 changed files with 610 additions and 0 deletions
@@ -85,3 +85,45 @@
- handoff: `SourceLocation`, `SourceEntityId`, `Diagnostic`, deterministic
diagnostic sorting, `FailureCategory`, `Status`, and `Result<T>` are available
to Step 9 and later parser/model/solver tasks.
## Step 9 — dense-math-adapters
- task_id: `TASK-09`
- status: `completed`
- changed_files: `include/fesa/math/vector.hpp`,
`include/fesa/math/matrix.hpp`, `src/fesa/math/vector.cpp`,
`src/fesa/math/matrix.cpp`, `tests/unit/math/vector_test.cpp`,
`tests/unit/math/matrix_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`
- requirement_ids: `FESA-REQ-LS3DEB-025`, `FESA-REQ-LS3DEB-034`
- test_ids: `T09-DENSE-001`, `T09-DENSE-002`
| stage | exact command | exit_code | expected_or_observed_result | evidence_tail |
| --- | --- | ---: | --- | --- |
| RED | `cmake --build .harness/build --config Debug --target fesa_tests`; `ctest --test-dir .harness/build -C Debug -R DenseMath --output-on-failure` | 1 | Both planned tests are registered before production and the build fails for the missing dense-math API | MSVC C1083 for `fesa/math/matrix.hpp` and `fesa/math/vector.hpp`; DenseMath discovery is unavailable until the test executable builds |
| GREEN-build | `cmake --build .harness/build --config Debug --target fesa_tests` | 0 | Minimal dense adapters, tests, and runtime staging compile, link, and complete GoogleTest discovery | `matrix.cpp`, `vector.cpp`, both math tests, `fesa_solver.lib`, and `fesa_unit_tests.exe` built; no FESA warning under `/W4 /WX` |
| GREEN-test | `ctest --test-dir .harness/build -C Debug -R DenseMath --output-on-failure` | 0 | Storage/ownership/checking and row-major BLAS contracts pass | 2/2 DenseMath 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 MSVC x64 build tree regenerates with explicit dependencies | Configure/generate completed; oneMKL 2026.1 dynamic ILP64 backend resolved |
| 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 DenseMath --output-on-failure` | 0 | Focused dense-math suite remains green | 2/2 tests passed |
| VERIFY-discovery | `ctest --test-dir .harness/build -C Debug --show-only=json-v1` | 0 | CTest discovers the accumulated tests and both exact DenseMath names | 7 tests discovered with feature/unit labels |
| VERIFY-full | `ctest --test-dir .harness/build -C Debug --output-on-failure` | 0 | Full accumulated C++ suite has zero failures | 7/7 tests passed |
| VERIFY-public-header | `$leaks = rg -n "mkl\.h\|MKL_INT\|CBLAS_" include/fesa; if ($LASTEXITCODE -eq 0) { throw "MKL API leaked into public headers:`n$leaks" }; if ($LASTEXITCODE -ne 1) { throw 'Public-header dependency scan failed' }` | 0 | Public headers remain independent of oneMKL API and types | `rg` returned the required no-match exit 1; wrapper scan completed with zero leaks |
- contract_checks: `Vector` accepts zero size, owns contiguous doubles, deep-copies,
leaves moved-from objects empty and usable, checks every index, and rejects dot/axpy
mismatches; `Matrix` accepts zero dimensions, owns row-major contiguous doubles,
deep-copies, leaves moved-from objects empty and usable, checks every index, and
rejects GEMV/GEMM mismatches. Hand-derived nonsquare GEMV `[50,122]` and GEMM
`[[58,64],[139,154]]` pass. All copy, dot, norm, scale, axpy, GEMV, and GEMM calls
cross CBLAS only inside `.cpp` files. Windows tests stage the package-resolved
oneMKL/OpenMP runtime before post-build discovery because the exact shell does not
assume oneAPI in `PATH`.
- 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: backend-free `fesa::Vector` and `fesa::Matrix` public APIs, with owning
dense storage and checked BLAS operations, are available to Step 10 and later
DOF/element/assembly tasks.