From a02024929ca62c714335dd9811eea6eab816af38 Mon Sep 17 00:00:00 2001 From: "KOKO\\Mimi" Date: Fri, 31 Jul 2026 16:37:34 +0900 Subject: [PATCH] docs(equation-and-linear-solve): align completed contracts --- phases/equation-and-linear-solve/index.json | 8 ++++---- phases/equation-and-linear-solve/step0.md | 3 ++- phases/equation-and-linear-solve/step1.md | 15 +++++++-------- phases/equation-and-linear-solve/step2.md | 3 +++ 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/phases/equation-and-linear-solve/index.json b/phases/equation-and-linear-solve/index.json index 65a065b..5df3d93 100644 --- a/phases/equation-and-linear-solve/index.json +++ b/phases/equation-and-linear-solve/index.json @@ -7,7 +7,7 @@ "name": "symmetric-csr-assembly", "status": "completed", "started_at": "2026-07-31T15:19:35+0900", - "summary": "Added upper-triangle symmetric CSR types and deterministic serial Beam stiffness/load assembly with stable merge and regression tests.", + "summary": "Added upper-triangle symmetric CSR with every-row diagonals and deterministic serial Beam stiffness/load assembly with stable floating-point merge tests.", "completed_at": "2026-07-31T15:45:02+0900" }, { @@ -15,7 +15,7 @@ "name": "essential-bc-elimination", "status": "completed", "started_at": "2026-07-31T15:45:03+0900", - "summary": "Added upper-triangle essential BC elimination with zero/nonzero RHS shifts, full reconstruction mapping, conflict diagnostics, and original-system reaction recovery.", + "summary": "Added DofManager-owned essential BC elimination with zero/nonzero RHS shifts, all-constrained handling, full reconstruction, and finite original-system reaction recovery.", "completed_at": "2026-07-31T16:00:44+0900" }, { @@ -23,10 +23,10 @@ "name": "pardiso-linear-solver", "status": "completed", "started_at": "2026-07-31T16:00:45+0900", - "summary": "Added an LP64 MKL PARDISO SPD solver with private RAII lifecycle, CSR validation, residual diagnostics, and regression tests.", + "summary": "Added a noncopyable LP64 MKL PARDISO SPD solver with explicit diagnostic-aware RAII release, CSR validation, residual diagnostics, and regression tests.", "completed_at": "2026-07-31T16:16:28+0900" } ], "created_at": "2026-07-31T15:19:35+0900", "completed_at": "2026-07-31T16:16:28+0900" -} \ No newline at end of file +} diff --git a/phases/equation-and-linear-solve/step0.md b/phases/equation-and-linear-solve/step0.md index 72f5227..b6e8f95 100644 --- a/phases/equation-and-linear-solve/step0.md +++ b/phases/equation-and-linear-solve/step0.md @@ -33,8 +33,9 @@ struct EquationSystem final { - sparsity pattern builder와 numeric contribution merge를 분리한다. - `(row,column,element-origin,local-order)`의 안정된 순서로 합산한다. +- 연결되지 않은 자유도를 포함해 모든 CSR row에 diagonal entry를 보존한다. - hand-calculated 2-element system, duplicate contribution, external ID 순서 변화, - CSR invariant를 실패 테스트로 먼저 작성한다. + 비결합적 부동소수점 합산 순서와 CSR invariant를 실패 테스트로 먼저 작성한다. ## Acceptance Criteria diff --git a/phases/equation-and-linear-solve/step1.md b/phases/equation-and-linear-solve/step1.md index cc8d8aa..d777449 100644 --- a/phases/equation-and-linear-solve/step1.md +++ b/phases/equation-and-linear-solve/step1.md @@ -9,30 +9,29 @@ - `/include/fesa/assembly/symmetric_csr.hpp` - `/include/fesa/assembly/equation_system.hpp` - `/include/fesa/fem/dof_manager.hpp` -- `/include/fesa/model/step_definition.hpp` ## 작업 -0과 비영 지정변위를 지원하는 essential-BC elimination과 full-vector 복원을 구현한다. +`DofManager`가 소유한 equation mapping과 지정변위로 essential-BC elimination을 +수행하고, 기존 `DofManager::reconstruct_full()`로 full vector를 복원한다. ```cpp struct ReducedSystem final { SymmetricCsr stiffness; std::vector force; - std::vector free_to_full; - std::vector prescribed_full; }; [[nodiscard]] ConstraintResult eliminate_essential_bcs( const EquationSystem& original, - const DofManager& dofs, - std::span prescribed); + const DofManager& dofs); [[nodiscard]] std::vector recover_reaction( const EquationSystem& original, std::span full_displacement); ``` - 작은 hand calculation으로 RHS shift, 0/비영 prescribed value, all constrained, - 충돌 조건, \(r=Ku-f\) 반력 복원을 먼저 테스트한다. + \(r=Ku-f\) 반력 복원을 먼저 테스트한다. +- 별도 prescribed 인수나 full/free mapping 상태를 중복하지 않는다. +- 입력과 산술 결과의 NaN/Inf를 성공 결과로 반환하지 않는다. ## Acceptance Criteria @@ -46,7 +45,7 @@ ctest --preset windows-debug --output-on-failure 1. 비영 지정값 테스트의 실패를 먼저 확인한다. 2. 원래 EquationSystem을 보존한 채 reduced system을 생성한다. -3. 복원 변위와 원래 평형식 반력을 assertion한다. +3. `DofManager` 복원 변위와 원래 평형식 반력을 assertion한다. 4. 전체 테스트와 index를 갱신한다. ## 금지사항 diff --git a/phases/equation-and-linear-solve/step2.md b/phases/equation-and-linear-solve/step2.md index fe35327..0258b52 100644 --- a/phases/equation-and-linear-solve/step2.md +++ b/phases/equation-and-linear-solve/step2.md @@ -32,6 +32,8 @@ class PardisoLinearSolver final : public LinearSolver { public: PardisoLinearSolver(); ~PardisoLinearSolver() override; + PardisoLinearSolver(const PardisoLinearSolver&) = delete; + PardisoLinearSolver& operator=(const PardisoLinearSolver&) = delete; [[nodiscard]] LinearSolveResult solve( const SymmetricCsr&, std::span) override; @@ -42,6 +44,7 @@ public: 테스트한다. - `mtype=2`, LP64 index, `iparm[34]=1`, matrix checker, analysis/factor/solve/release phase를 사용한다. +- analysis/factor/solve/release의 모든 MKL 오류를 solver diagnostic으로 변환한다. ## Acceptance Criteria