docs: add linear static beam harness phase
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
# Step 19: Essential Constraints and Matrix Partition
|
||||
|
||||
## 담당 역할과 필수 스킬
|
||||
|
||||
- 담당 역할: `implementation-agent`
|
||||
- 필수 스킬: `fesa-cpp-msvc-tdd`
|
||||
- 모든 C++ build/test와 최종 VERIFY는 MSVC x64 Debug 기준으로 수행한다.
|
||||
|
||||
## 읽어야 할 파일
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/ARCHITECTURE.md`
|
||||
- `/docs/ADR.md`
|
||||
- `/docs/requirements/linear-static-3d-euler-beam.md`
|
||||
- `/docs/formulations/3d-isoparametric-euler-beam-formulation.md`
|
||||
- `/docs/implementation-plans/linear-static-3d-euler-beam.md`
|
||||
- `/include/fesa/math/vector.hpp`
|
||||
- `/include/fesa/math/sparse_matrix.hpp`
|
||||
- `/include/fesa/fem/dof_manager.hpp`
|
||||
- `/include/fesa/assembly/sparse_assembler.hpp`
|
||||
- `/src/fesa/assembly/sparse_assembler.cpp`
|
||||
|
||||
## 소유 파일
|
||||
|
||||
- Create: `/include/fesa/constraints/essential_constraints.hpp`
|
||||
- Create: `/src/fesa/constraints/essential_constraints.cpp`
|
||||
- Create: `/tests/unit/constraints/essential_constraints_test.cpp`
|
||||
- Modify: `/src/fesa/CMakeLists.txt`
|
||||
- Modify: `/tests/CMakeLists.txt`
|
||||
|
||||
## 작업
|
||||
|
||||
조립된 full CSR matrix를 DofManager의 stable free/constrained ordering으로 partition하고
|
||||
full/reduced vector를 mapping하는 essential-constraint module을 구현하라.
|
||||
|
||||
```cpp
|
||||
struct PartitionedStiffness {
|
||||
SparseMatrix kff;
|
||||
SparseMatrix kfc;
|
||||
SparseMatrix kcf;
|
||||
SparseMatrix kcc;
|
||||
};
|
||||
class EssentialConstraints {
|
||||
public:
|
||||
static Result<PartitionedStiffness> partition(const SparseMatrix& full,
|
||||
const DofManager& dofs);
|
||||
static Vector gatherFree(const Vector& full, const DofManager& dofs);
|
||||
static Vector gatherConstrained(const Vector& full, const DofManager& dofs);
|
||||
static Vector reconstructFull(const Vector& freeValues,
|
||||
const Vector& constrainedValues,
|
||||
const DofManager& dofs);
|
||||
};
|
||||
```
|
||||
|
||||
Partition은 numeric value와 row/column order를 보존하고 0-based CSR invariants를 다시
|
||||
검증한다. `dc`는 DofManager prescribed values에서 가져오며 zero로 가정하지 않는다.
|
||||
이 step은 load vector나 RHS를 조립하지 않고 matrix/vector mapping만 소유한다.
|
||||
|
||||
Tests는 hand-computed block extraction, no/all/mixed constraints, nonzero prescribed values,
|
||||
full-free-constrained round trip, invalid dimensions/order를 검증하고
|
||||
`EssentialConstraints` regex로 등록한다.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
cmake --build .harness/build --config Debug --target fesa_tests
|
||||
ctest --test-dir .harness/build -C Debug -R EssentialConstraints --output-on-failure
|
||||
```
|
||||
|
||||
RED 후 GREEN/VERIFY:
|
||||
|
||||
```powershell
|
||||
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"
|
||||
cmake --build .harness/build --config Debug
|
||||
ctest --test-dir .harness/build -C Debug -R EssentialConstraints --output-on-failure
|
||||
ctest --test-dir .harness/build -C Debug --show-only=json-v1
|
||||
ctest --test-dir .harness/build -C Debug --output-on-failure
|
||||
```
|
||||
|
||||
## 검증 절차
|
||||
|
||||
1. partition/mapping tests를 먼저 추가하고 RED를 확인한다.
|
||||
2. elimination에 필요한 최소 block extraction으로 GREEN을 만든다.
|
||||
3. nonzero `dc`와 전체 VERIFY를 확인한다.
|
||||
4. `/docs/implementation-plans/linear-static-3d-euler-beam-implementation-report.md`의
|
||||
Step 19 section에 실제 RED/GREEN/VERIFY command, exit code,
|
||||
핵심 output과 변경 파일을 기록한다.
|
||||
5. Step 19를 `completed`로 갱신하고 partition/reconstruction evidence를 summary에 기록한다.
|
||||
|
||||
## 금지사항
|
||||
|
||||
- prescribed displacement를 zero로 덮어쓰지 마라. 이유: 승인된 nonzero BC를 깨뜨린다.
|
||||
- penalty/MPC solver를 추가하지 마라. 이유: V0는 essential partition만 지원한다.
|
||||
- RHS/load assembly를 이 step에 섞지 마라. 이유: factorization-before-load 순서를 검증해야 한다.
|
||||
- 직접 commit하지 마라. 이유: Harness executor가 담당한다.
|
||||
Reference in New Issue
Block a user