# Step 15: Generic DofManager > 과거 개발 계획이다. 아래 작업·상태·예시는 현재 실행 지시가 아니다. > 현재 구현과 검증 한계는 [기능 요약](../../docs/cpp-object-oriented-modular-refactoring/README.md)을 따른다. ## 읽어야 할 파일 - `/AGENTS.md` - `../../docs/solver-core/README.md` - `../../docs/solver-core/README.md` - `../../docs/solver-core/README.md` - `../../docs/cpp-object-oriented-modular-refactoring/README.md` - Step 13 Domain/AnalysisModel files - Step 14 `element.h`, `element_factory.h`, concrete runtime elements - `/include/fesa/fem/dof_manager.h`, `/src/fesa/fem/dof_manager.cpp` - `/tests/unit/fem/dof_manager_test.cpp` - `/tests/unit/assembly/sparse_assembler_test.cpp` - `/phases/cpp-object-oriented-modular-refactoring/index.json` - `/phases/cpp-object-oriented-modular-refactoring/step15.md` ## 작업 Requirement `R-PIPELINE-001`의 DofManager portion과 `R-DUP-002`의 DOF invariant owner를 구현한다. 1. `dof_manager_test.cpp`에 `C-DOF-001`을 먼저 추가한다. A test-only fake `Element` supplies a layout not named B33 or MITC4; DofManager must number/scatter it in source order. 2. Tests also corrupt duplicate/full/free/constrained/equation mappings through an approved test seam and expect `ValidateInvariants()` to reject each exact inconsistency. 3. Current DofManager cannot consume fake base layouts or expose owner validation, producing RED. 4. Candidate API: ```cpp Status DofManager::Build( const AnalysisModel& analysis_model, const ElementView& elements); Result> DofManager::ElementScatter( const ElementDofLayout& layout) const; Status DofManager::ValidateInvariants() const; ``` 5. Replace B33/MITC4 concrete scatter/pattern branches with the ordered layout. Node DOF ownership, constrained/free mappings, equation numbering and sparse pattern remain solely in DofManager. 6. Preserve stable node/source/component order, no/mixed/all-constraint behavior, and valid 0 free equations. Do not store equation ids in Node/Element. 7. Remove same-meaning `ValidateDofOrder` helpers from other modules only after their callers use `ValidateInvariants()` or an owner-issued immutable mapping. ## Acceptance Criteria 과거 도구 실행·출력 지시는 정리했으며, 현재 검증 방법은 기능 요약을 따른다. `ValidateDofOrder` scan must show no duplicate local definitions. Existing public compatibility wrappers may remain temporarily only if they delegate to DofManager and are removed by Step 20. ## 검증 및 상태 갱신 - RED fake-element/invariant failures, focused stable ordering, branch scan and full CTest를 summary에 기록한다. - Equation or sparse pattern ordering regression is `error`. - 성공 시 현재 Step만 `completed`로 갱신한다. - timestamp, retry, commit, advancement는 Executor 소유다. ## 금지사항 - Element에 equation ids or global CSR를 저장하지 마라. - DOF component order를 element kind switch로 재구성하지 마라. - Sparse assembly algorithm을 수정하지 마라. 이유: Step 16 소유다. - 직접 commit하거나 hook script를 수동 실행하지 마라.