This commit is contained in:
김경종
2026-06-10 10:03:11 +09:00
parent 87529c811a
commit 0912ee6f3b
174 changed files with 414 additions and 8544 deletions
+7 -7
View File
@@ -2,7 +2,7 @@
이 디렉터리는 Implementation Planning Agent가 작성하거나 제안한 기능별 구현계획 문서를 보관하는 위치다.
Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정식화, 수치 리뷰, I/O 정의, reference model 계약을 C++/MSVC 구현 전 TDD 작업계획으로 변환한다. Agent는 코드, 테스트, CMake 파일을 작성하지 않고, Abaqus/Nastran을 실행하지 않으며, reference HDF5 artifact나 reference CSV 생성, solver 결과 비교, release readiness 승인도 하지 않는다.
Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정식화, 수치 리뷰, I/O 정의, reference model 계약을 C++/MSVC 구현 전 TDD 작업계획으로 변환한다. Agent는 코드, 테스트, CMake 파일을 작성하지 않고, Abaqus/Nastran을 실행하지 않으며, reference CSV 생성이나 solver 결과 비교, release readiness 승인도 하지 않는다.
기본 파일명은 `docs/implementation-plans/<feature-id>-implementation-plan.md` 형식을 사용한다. 각 문서는 Implementation Agent가 먼저 작성해야 할 실패 테스트, 최소 구현 순서, CMake/CTest 등록 계획, acceptance traceability를 제공해야 한다.
@@ -23,7 +23,7 @@ Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정
- CMake 파일을 수정하지 않는다.
- CMake/CTest를 실행하지 않는다.
- Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않는다.
- reference HDF5 artifact 또는 reference CSV를 생성하지 않는다.
- reference CSV를 생성하지 않는다.
- solver 결과를 비교하지 않는다.
- release readiness를 승인하지 않는다.
- C++ API, class name, storage layout, file ownership을 확정하지 않는다.
@@ -73,7 +73,7 @@ Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정
| TEST-001 | 1 | unit | test fails because behavior is missing | test passes after minimal implementation | TASK-001 | ctest -C Debug -R <test-name> |
| TEST-002 | 2 | integration | integrated path fails before implementation | integrated path passes | TASK-002 | ctest -C Debug -R <test-name> |
| TEST-003 | 3 | parser/I/O | Abaqus .inp case is not accepted or mapped | input maps to expected semantic model | TASK-003 | ctest -C Debug -R <test-name> |
| TEST-004 | 4 | reference-comparison | solver HDF5 comparison fails before implementation | comparison is within planned tolerance | TASK-004 | ctest -C Debug -R <test-name> |
| TEST-004 | 4 | reference-comparison | solver CSV comparison fails before implementation | comparison is within planned tolerance | TASK-004 | ctest -C Debug -R <test-name> |
## CMake/CTest Plan
- target_candidates: <library/test executable targets>
@@ -95,8 +95,8 @@ Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정
## Data Flow Contract
1. Abaqus `.inp` input follows docs/io-definitions/<feature-id>-io.md.
2. Parser/I/O path maps model data and history data into the internal semantic model.
3. Solver path produces `results.h5` with displacement, reaction, element force, stress, or feature-specific result datasets.
4. Reference comparison tests compare solver `results.h5` against `references/<feature-id>/<model-id>/` HDF5 artifacts.
3. Solver path produces displacement, reaction, element force, stress, or feature-specific result CSV.
4. Reference comparison tests compare solver CSV against `references/<feature-id>/<model-id>/` artifacts.
## Acceptance Traceability Matrix
@@ -123,7 +123,7 @@ ctest -C Debug -R <feature-or-label>
- <likely failure classifications and upstream rollback guidance>
### Reference Verification Agent
- <planned HDF5 comparison tests, reference model ids, tolerance mapping, ID matching assumptions>
- <planned CSV comparison tests, reference model ids, tolerance mapping, ID matching assumptions>
## Open Issues
- <requirement, formulation, I/O, reference artifact, tolerance, or architecture issue>
@@ -133,7 +133,7 @@ ctest -C Debug -R <feature-or-label>
- 모든 `must` requirement는 최소 하나의 task와 test에 연결되어야 한다.
- C++ production 변경마다 선행 테스트 파일 또는 테스트 추가 계획이 있어야 한다.
- reference artifact가 필요한 기능은 `references/<feature-id>/<model-id>/`와 HDF5 비교 테스트 계획을 가져야 한다.
- reference artifact가 필요한 기능은 `references/<feature-id>/<model-id>/`와 CSV 비교 테스트 계획을 가져야 한다.
- CMake/CTest 계획은 MSVC x64 Debug 검증 경로와 호환되어야 한다.
- 구현 계획은 테스트 작성, 실패 확인, 최소 구현, validation 순서를 명시해야 한다.
- upstream 문서가 불완전하면 값을 임의로 채우지 않고 `needs-upstream-decision` 또는 `blocked`로 표시한다.
@@ -1,179 +0,0 @@
# Analysis Model Objects Implementation Plan
## Metadata
- feature_id: analysis-model-objects
- source_requirement: AGENTS.md; docs/ARCHITECTURE.md; docs/ADR.md
- source_research: N/A for this architecture/model-object slice
- source_formulation: N/A for this architecture/model-object slice
- source_numerical_review: N/A for this architecture/model-object slice
- source_io_definition: docs/ARCHITECTURE.md Domain and factory/registry ownership rules
- source_reference_models: N/A for this architecture/model-object slice
- status: ready-for-implementation
- owner_agent: implementation-planning-agent
- date: 2026-06-09
## Readiness Check
| input | required_status | observed_status | decision |
| --- | --- | --- | --- |
| architecture | model object boundaries documented | documented in docs/ARCHITECTURE.md and ADR-004/010/011 | proceed |
| domain foundation | base Domain storage available | implemented in `domain-model-foundation` | proceed |
| formulation | not required for identity-only model object skeletons | N/A | proceed |
| numerical_review | not required for identity-only model object skeletons | N/A | proceed |
| io_definition | parser DTO compatibility sufficient | existing `*Definition` objects remain input DTOs | proceed |
| reference_models | not required because this slice produces no solver result | N/A | proceed |
## Implementation Scope
- included_behavior: C++17 model object classes for nodes, elements, materials, shell properties, loads, and boundary conditions.
- included_behavior: abstract base classes for element, material, load, and boundary condition model objects.
- included_behavior: MITC4 element model skeleton with id, connectivity, property id, 4-node count, and 24-DOF count.
- included_behavior: Domain RAII ownership for polymorphic model objects through `std::unique_ptr`.
- included_behavior: compatibility with existing `*Definition` value objects and tests.
- excluded_behavior: MITC4 stiffness, Jacobian, MITC shear interpolation, constitutive matrices, global force assembly, boundary-condition elimination, equation numbering, solver vectors, reaction recovery, HDF5 output, parser/factory implementation, and reference comparison.
- non_goals: numerical correctness claims, release readiness, reference-solver execution, and reference artifact generation.
## Model Object Contract
`Domain` remains the owner of parsed model definition. This phase adds runtime model objects that can later be used by `AnalysisModel`, factories, and element/material implementations without storing analysis state in `Domain`.
Model object responsibilities:
- `Node`: id and reference coordinates only; fixed six-DOF count from project convention.
- `Element`: identity, element type, connectivity, property reference, and node count only.
- `Mitc4Element`: MITC4 model skeleton with four node ids and 24 element DOFs only.
- `Material`: material identity only.
- `LinearElasticMaterial`: id, Young's modulus, and Poisson ratio only.
- `ShellProperty`: property id, material id, and thickness only.
- `Load`: load kind only.
- `NodalLoad`: node id, DOF, and scalar value only.
- `BoundaryCondition`: boundary kind only.
- `SinglePointConstraint`: node id, DOF, and prescribed scalar value only.
Excluded from all model objects:
- equation ids
- sparse matrix data
- displacement, residual, reaction, velocity, acceleration, or temperature vectors
- current time, increment, or iteration counters
- element integration point state
- MKL, TBB, HDF5, or reference-comparison handles
Existing `*Definition` value objects remain parser/factory DTOs for now. This phase must not delete them. Later parser/factory work may either map DTOs into model objects or retire DTOs with an explicit migration plan.
Compatibility decision:
- Existing `ElementDefinition`, `LinearElasticMaterialDefinition`, `ShellPropertyDefinition`, `BoundaryCondition`, `NodalLoadDefinition`, and `LinearStaticStepDefinition` classes remain under `include/fesa/core/` as value-style input DTOs.
- New runtime model objects live under ownership namespaces: `fesa::element`, `fesa::material`, `fesa::property`, `fesa::load`, and `fesa::boundary`.
- `Domain` supports both existing DTO storage APIs and new polymorphic model-object ownership APIs during the transition.
- Parser/factory work must make an explicit choice to map DTOs to model objects or replace DTOs in a separate phase. This phase does not decide parser behavior.
## Work Breakdown
| task_id | order | purpose | upstream_trace | depends_on | expected_test_first |
| --- | --- | --- | --- | --- | --- |
| AMO-001 | 1 | refine `Node` model class contract | ADR-010; docs/ARCHITECTURE.md Node | none | AMO-TEST-001 |
| AMO-002 | 2 | add abstract `Element` base interface | ADR-004; docs/ARCHITECTURE.md Element | AMO-001 | AMO-TEST-002 |
| AMO-003 | 3 | add MITC4 element model skeleton | AGENTS.md MITC4 scope | AMO-002 | AMO-TEST-003 |
| AMO-004 | 4 | add material base and linear elastic material object | docs/ARCHITECTURE.md Material | AMO-002 | AMO-TEST-004 |
| AMO-005 | 5 | add shell property model object | docs/ARCHITECTURE.md Property | AMO-004 | AMO-TEST-005 |
| AMO-006 | 6 | add load base and nodal load object | docs/ARCHITECTURE.md loads | AMO-002 | AMO-TEST-006 |
| AMO-007 | 7 | add boundary base and single-point constraint object | ADR-012 | AMO-002 | AMO-TEST-007 |
| AMO-008 | 8 | extend Domain with polymorphic object ownership | ADR-010; ADR-011 | AMO-003 to AMO-007 | AMO-TEST-008 |
| AMO-009 | 9 | preserve `*Definition` compatibility | domain-model-foundation plan | AMO-008 | AMO-TEST-009 |
| AMO-010 | 10 | record build/test evidence and handoff | docs/build-test-reports/README.md | AMO-009 | AMO-TEST-010 |
## TDD Test Plan
| test_id | order | test_type | red_condition | green_condition | linked_task | command |
| --- | --- | --- | --- | --- | --- | --- |
| AMO-TEST-001 | 1 | unit | `Node::dofCount()` missing | Node model tests pass | AMO-001 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` |
| AMO-TEST-002 | 2 | unit | `fesa/element/Element.hpp` missing | Element base polymorphism tests pass | AMO-002 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object` |
| AMO-TEST-003 | 3 | unit | `Mitc4Element` missing | MITC4 model skeleton tests pass | AMO-003 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object` |
| AMO-TEST-004 | 4 | unit | material model headers missing | material base and linear elastic tests pass | AMO-004 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object` |
| AMO-TEST-005 | 5 | unit | shell property model missing | shell property tests pass | AMO-005 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object` |
| AMO-TEST-006 | 6 | unit | load model headers missing | load base and nodal load tests pass | AMO-006 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object` |
| AMO-TEST-007 | 7 | unit | boundary model headers missing | boundary base and SPC tests pass | AMO-007 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object` |
| AMO-TEST-008 | 8 | unit | Domain polymorphic APIs missing | Domain owns and retrieves model objects by base interface | AMO-008 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"` |
| AMO-TEST-009 | 9 | regression | existing definition tests fail | existing Domain definition tests remain passing | AMO-009 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` |
| AMO-TEST-010 | 10 | validation | report evidence missing | validation report records passing commands or classified failure | AMO-010 | `python scripts/validate_workspace.py` |
## CMake/CTest Plan
- target_candidates: `fesa_core`, `fesa_domain_tests`, `fesa_model_object_tests`
- labels: `domain`, `core`, `model-object`, `element`, `material`, `property`, `load`, `boundary`
- msvc_config: Debug
- expected_feature_command: `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"`
- workspace_validation: `python scripts/validate_workspace.py`
## Candidate Files and Ownership
| file_candidate | purpose | owner_boundary | notes |
| --- | --- | --- | --- |
| `include/fesa/core/Node.hpp` | existing node model object | core model definition | no solver state |
| `include/fesa/element/Element.hpp` | abstract element model base | element model identity | no stiffness API |
| `include/fesa/element/Mitc4Element.hpp` | MITC4 element model skeleton | element model identity | no formulation implementation |
| `src/element/Mitc4Element.cpp` | MITC4 model accessors | element model identity | no numerical behavior |
| `include/fesa/material/Material.hpp` | abstract material model base | material identity | no constitutive matrix |
| `include/fesa/material/LinearElasticMaterial.hpp` | linear elastic material model | material input values | no stress update |
| `src/material/LinearElasticMaterial.cpp` | linear elastic material accessors | material input values | no numerical behavior |
| `include/fesa/property/ShellProperty.hpp` | shell property model | property input values | no section stiffness |
| `src/property/ShellProperty.cpp` | shell property validation/accessors | property input values | thickness validation only |
| `include/fesa/load/Load.hpp` | abstract load model base | load identity | no assembly |
| `include/fesa/load/NodalLoad.hpp` | nodal load model | load input values | no global vector behavior |
| `src/load/NodalLoad.cpp` | nodal load accessors | load input values | no assembly |
| `include/fesa/boundary/BoundaryCondition.hpp` | abstract boundary model base | boundary identity | no matrix application |
| `include/fesa/boundary/SinglePointConstraint.hpp` | SPC boundary model | boundary input values | no reaction recovery |
| `src/boundary/SinglePointConstraint.cpp` | SPC accessors | boundary input values | no matrix application |
| `include/fesa/core/Domain.hpp` | Domain ownership extension | core ownership | preserve existing APIs |
| `src/core/Domain.cpp` | Domain ownership implementation | core ownership | no solver state |
| `tests/**` | TDD coverage | tests | write before production changes |
## Acceptance Traceability Matrix
| requirement_id | task_id | test_id | reference_model_id | acceptance_criterion | status |
| --- | --- | --- | --- | --- | --- |
| AMO-REQ-001 Node is model data only | AMO-001 | AMO-TEST-001 | N/A | Node tests pass and no solver state added | draft |
| AMO-REQ-002 Element base is identity-only | AMO-002 | AMO-TEST-002 | N/A | Element base tests pass | draft |
| AMO-REQ-003 MITC4 model skeleton has 4 nodes and 24 DOFs | AMO-003 | AMO-TEST-003 | N/A | MITC4 model tests pass | draft |
| AMO-REQ-004 Material model stores input values only | AMO-004 | AMO-TEST-004 | N/A | material tests pass | draft |
| AMO-REQ-005 Shell property validates thickness only | AMO-005 | AMO-TEST-005 | N/A | shell property tests pass | draft |
| AMO-REQ-006 Load and boundary models do not assemble/apply | AMO-006; AMO-007 | AMO-TEST-006; AMO-TEST-007 | N/A | load/boundary tests pass and APIs remain value accessors | draft |
| AMO-REQ-007 Domain owns polymorphic model objects via RAII | AMO-008 | AMO-TEST-008 | N/A | Domain ownership tests pass | draft |
| AMO-REQ-008 Existing definition APIs remain compatible | AMO-009 | AMO-TEST-009 | N/A | existing domain tests pass | draft |
## Validation Commands
```powershell
python -m unittest discover -s scripts -p "test_*.py"
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"
```
## Risks and Downstream Handoff
### Implementation Agent
- Keep model objects identity-only until formulation and solver stages define numerical APIs.
- Preserve existing `*Definition` tests.
- Prefer RAII ownership through `std::unique_ptr` and const retrieval.
### Build/Test Executor Agent
- Use Visual Studio 17 2022, x64, Debug, and `build/msvc-debug`.
- Use `python scripts/validate_workspace.py` as canonical validation.
### Correction Agent
- Implementation-owned failures are expected to be compile or unit-test failures in model object headers, model object sources, CMake registration, or Domain ownership methods.
- Upstream-contract failures include requests to add numerical MITC4 behavior or solver state in this phase.
### Reference Verification Agent
- No reference verification is required for this phase.
- This phase produces no HDF5 result and consumes no reference artifacts.
## Open Issues
- Parser/factory mapping from `*Definition` DTOs to model objects remains deferred.
- MITC4 formulation, material constitutive behavior, shell section stiffness, assembly, solver, and HDF5 output remain separate future phases.
@@ -1,188 +0,0 @@
# Analysis State And Analysis Base Implementation Plan
## Metadata
- feature_id: analysis-state-analysis-base
- source_requirement: AGENTS.md; docs/PRD.md
- source_research: N/A for this architecture foundation slice
- source_formulation: N/A for this architecture foundation slice
- source_numerical_review: N/A for this architecture foundation slice
- source_io_definition: docs/ARCHITECTURE.md state ownership and analysis strategy rules
- source_reference_models: N/A for this architecture foundation slice
- status: ready-for-implementation
- owner_agent: implementation-planning-agent
- date: 2026-06-09
## Readiness Check
| input | required_status | observed_status | decision |
| --- | --- | --- | --- |
| architecture | Domain, Analysis, AnalysisState boundaries documented | documented in docs/ARCHITECTURE.md and ADR-010 | proceed |
| domain foundation | Domain runtime storage available | implemented in prior phases | proceed |
| formulation | not required for state/interface foundation | N/A | proceed |
| numerical_review | not required for state/interface foundation | N/A | proceed |
| io_definition | not required; no result output in this phase | N/A | proceed |
| reference_models | not required because this phase produces no solver result | N/A | proceed |
## Implementation Scope
- included_behavior: `AnalysisState` mutable vector state for displacement, external force, internal force, residual, and reaction.
- included_behavior: `AnalysisState` time, increment, and iteration counters.
- included_behavior: `Analysis` base interface for future analysis strategies.
- included_behavior: CMake/CTest registration for analysis-layer unit tests.
- excluded_behavior: `AnalysisModel`, `DofManager`, equation numbering, global assembly, boundary-condition elimination, linear solve, MITC4 numerical formulation, HDF5 output, and reference comparison.
- non_goals: numerical correctness claims, release readiness, reference-solver execution, and reference artifact generation.
## AnalysisState Contract
`AnalysisState` lives under `fesa::core` and owns mutable analysis quantities only. It does not reference or own `Domain`, model objects, equation maps, sparse matrices, solvers, result writers, or reference artifacts.
Required interface:
```cpp
namespace fesa::core {
class AnalysisState {
public:
AnalysisState();
explicit AnalysisState(std::size_t dof_count);
std::size_t dofCount() const noexcept;
void resize(std::size_t dof_count);
const std::vector<double>& displacement() const noexcept;
const std::vector<double>& externalForce() const noexcept;
const std::vector<double>& internalForce() const noexcept;
const std::vector<double>& residual() const noexcept;
const std::vector<double>& reaction() const noexcept;
void setDisplacement(std::vector<double> values);
void setExternalForce(std::vector<double> values);
void setInternalForce(std::vector<double> values);
void setResidual(std::vector<double> values);
void setReaction(std::vector<double> values);
void clearForces() noexcept;
double currentTime() const noexcept;
void setCurrentTime(double value) noexcept;
std::int64_t incrementIndex() const noexcept;
void setIncrementIndex(std::int64_t value) noexcept;
std::int64_t iterationIndex() const noexcept;
void setIterationIndex(std::int64_t value) noexcept;
};
} // namespace fesa::core
```
This phase intentionally defers velocity, acceleration, temperature, element state, and integration-point state until dynamic, thermal, nonlinear, or element-state phases define concrete contracts.
## Analysis Base Contract
`Analysis` lives under `fesa::analysis` and is the base strategy interface for future analysis algorithms. `Domain` is immutable input. `AnalysisState` is mutable output/state.
Required interface:
```cpp
namespace fesa::analysis {
class Analysis {
public:
virtual ~Analysis() = default;
virtual const char* name() const noexcept = 0;
void run(const fesa::core::Domain& domain, fesa::core::AnalysisState& state);
protected:
virtual void doRun(const fesa::core::Domain& domain, fesa::core::AnalysisState& state) = 0;
};
} // namespace fesa::analysis
```
`Analysis::run` is only an entry-point wrapper in this phase. It does not define assembly, solve, boundary-condition, or output hooks until `AnalysisModel` and `DofManager` exist.
## Work Breakdown
| task_id | order | purpose | upstream_trace | depends_on | expected_test_first |
| --- | --- | --- | --- | --- | --- |
| ASAB-001 | 1 | record state and base-analysis contract | ADR-010; docs/ARCHITECTURE.md | none | N/A |
| ASAB-002 | 2 | add `AnalysisState` zero-sized and sized state | ADR-010 AnalysisState | ASAB-001 | ASAB-TEST-001 |
| ASAB-003 | 3 | add `AnalysisState` mutation guards and counters | docs/ARCHITECTURE.md State Ownership | ASAB-002 | ASAB-TEST-002 |
| ASAB-004 | 4 | add `Analysis` base interface | docs/ARCHITECTURE.md Analysis strategy | ASAB-003 | ASAB-TEST-003 |
| ASAB-005 | 5 | register analysis CTest path | AGENTS.md C++ validation | ASAB-004 | ASAB-TEST-004 |
| ASAB-006 | 6 | record build/test evidence and handoff | docs/build-test-reports/README.md | ASAB-005 | ASAB-TEST-005 |
## TDD Test Plan
| test_id | order | test_type | red_condition | green_condition | linked_task | command |
| --- | --- | --- | --- | --- | --- | --- |
| ASAB-TEST-001 | 1 | unit | `AnalysisState` header/class missing | default and sized state tests pass | ASAB-002 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R analysis` |
| ASAB-TEST-002 | 2 | unit | setter/guard methods missing | mutation guard and counter tests pass | ASAB-003 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R analysis` |
| ASAB-TEST-003 | 3 | unit | `Analysis` header/base missing | derived recording analysis tests pass | ASAB-004 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R analysis` |
| ASAB-TEST-004 | 4 | integration | analysis tests not registered or not built | `ctest -R analysis` runs analysis target | ASAB-005 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "analysis|domain|model-object|io"` |
| ASAB-TEST-005 | 5 | validation | report evidence missing | validation report records passing commands or classified failure | ASAB-006 | `python scripts/validate_workspace.py` |
## CMake/CTest Plan
- target_candidates: `fesa_core`, `fesa_analysis_tests`
- add_test_needs: register `analysis.base`
- labels: `analysis`, `core`
- msvc_config: Debug
- expected_feature_command: `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R analysis`
- workspace_validation: `python scripts/validate_workspace.py`
## Candidate Files and Ownership
| file_candidate | purpose | owner_boundary | notes |
| --- | --- | --- | --- |
| `include/fesa/core/AnalysisState.hpp` | mutable analysis state public contract | core state | no Domain/model object ownership |
| `src/core/AnalysisState.cpp` | state vector/counter implementation | core state | no solver logic |
| `include/fesa/analysis/Analysis.hpp` | base analysis strategy interface | analysis | no LinearStaticAnalysis implementation |
| `tests/core/analysis_state_test.cpp` | state TDD coverage | tests | write before production changes |
| `tests/analysis/analysis_base_test.cpp` | analysis base TDD coverage | tests | write before production changes |
| `CMakeLists.txt` | source and CTest registration | build | MSVC Debug compatible |
## Acceptance Traceability Matrix
| requirement_id | task_id | test_id | reference_model_id | acceptance_criterion | status |
| --- | --- | --- | --- | --- | --- |
| ASAB-REQ-001 mutable state is outside Domain | ASAB-002 | ASAB-TEST-001 | N/A | AnalysisState tests pass and Domain remains unchanged | draft |
| ASAB-REQ-002 state vectors are size-consistent | ASAB-003 | ASAB-TEST-002 | N/A | size mismatch throws and failed setters do not mutate | draft |
| ASAB-REQ-003 Analysis takes const Domain and mutable state | ASAB-004 | ASAB-TEST-003 | N/A | recording analysis updates state through base API | draft |
| ASAB-REQ-004 C++ validation path includes analysis tests | ASAB-005 | ASAB-TEST-004 | N/A | `ctest -R analysis` runs successfully | draft |
## Validation Commands
```powershell
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R analysis
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "analysis|domain|model-object|io"
python -m unittest discover -s scripts -p "test_*.py"
python scripts/validate_workspace.py
git diff --check
```
## Risks and Downstream Handoff
### Implementation Agent
- Keep `AnalysisState` as storage only.
- Keep `Analysis` as a base interface only.
- Do not introduce `LinearStaticAnalysis` until `AnalysisModel` and `DofManager` contracts exist.
### Build/Test Executor Agent
- Use Visual Studio 17 2022, x64, Debug, and `build/msvc-debug`.
- Use `python scripts/validate_workspace.py` as canonical validation.
### Correction Agent
- Implementation-owned failures are expected to be compile or unit-test failures in state headers, state sources, analysis header, analysis tests, or CMake registration.
- Upstream-contract failures include requests to add equation numbering, assembly, solver behavior, HDF5 output, or numerical MITC4 behavior in this phase.
### Reference Verification Agent
- No reference verification is required for this phase.
- This phase produces no HDF5 result and consumes no reference artifacts.
## Open Issues
- `AnalysisModel`, `DofManager`, and `LinearStaticAnalysis` remain separate downstream phases.
@@ -1,190 +0,0 @@
# Domain Model Foundation Implementation Plan
## Metadata
- feature_id: domain-model-foundation
- source_requirement: AGENTS.md; docs/ARCHITECTURE.md; docs/ADR.md
- source_research: N/A for this architecture foundation slice
- source_formulation: N/A for this architecture foundation slice
- source_numerical_review: N/A for this architecture foundation slice
- source_io_definition: docs/ARCHITECTURE.md input-model ownership rules
- source_reference_models: N/A for this architecture foundation slice
- status: ready-for-implementation
- owner_agent: implementation-planning-agent
- date: 2026-06-08
## Readiness Check
| input | required_status | observed_status | decision |
| --- | --- | --- | --- |
| architecture | Domain, AnalysisModel, AnalysisState, DofManager boundaries documented | documented in docs/ARCHITECTURE.md and docs/ADR.md | proceed |
| requirements | Domain ownership rules documented | documented in AGENTS.md and docs/ARCHITECTURE.md | proceed |
| formulation | not required for model-container storage | N/A | proceed |
| numerical_review | not required for model-container storage | N/A | proceed |
| io_definition | parser contract not required; semantic storage boundary documented | sufficient for Domain foundation | proceed |
| reference_models | not required because this slice produces no solver result | N/A | proceed |
## Implementation Scope
- included_behavior: C++17 core model-definition storage for nodes, element definitions, material definitions, shell property definitions, sets, boundary conditions, nodal loads, and linear static step definitions.
- included_behavior: CMake/CTest bootstrap for MSVC x64 Debug validation.
- included_behavior: deterministic id validation and const retrieval APIs for stored model definitions.
- excluded_behavior: MITC4 stiffness, shape functions, Jacobian checks, assembly, solver, reaction recovery, HDF5 output, Abaqus parser, MKL, TBB, and reference comparison.
- non_goals: numerical correctness claims, release readiness, Abaqus/Nastran execution, and stored reference artifact generation.
## Domain Contract
`Domain` owns parsed model definitions only. It preserves the model that an input parser or factory layer creates and should be treated as immutable by analysis code after parsing/building is complete.
Included model definitions:
- nodes
- element definitions
- material definitions
- shell property definitions
- node sets
- element sets
- boundary conditions
- nodal loads
- analysis step definitions
Excluded state:
- equation ids
- sparse matrix structure or values
- reduced or full displacement vectors
- residual vectors
- reaction vectors
- current time
- increment counters
- nonlinear iteration counters
- element integration point state
- MKL, TBB, or HDF5 handles
Boundary responsibilities:
- `DofManager` owns active DOF discovery, constrained/free DOF mapping, equation numbering, sparse pattern connectivity, and full-vector reconstruction.
- `AnalysisModel` owns the step-local execution view over active domain objects. It references `Domain` objects by id or stable reference and does not copy the whole domain.
- `AnalysisState` owns mutable solution, residual, load vector, time/increment, and future element state.
Common data rules:
- All ids use signed 64-bit storage.
- Node DOF order is `U1, U2, U3, UR1, UR2, UR3`.
- Coordinates and scalar physical values use `double`.
- Units are user-consistent and are not enforced or converted by `Domain`.
- Duplicate ids fail with `std::invalid_argument`.
- Insertions that reference missing required objects fail with `std::invalid_argument`.
- Direct lookup of a missing object fails with `std::out_of_range`.
- Optional `find*` lookup APIs return `nullptr` for missing objects.
- Retrieval APIs return const references or const pointers.
## Work Breakdown
| task_id | order | purpose | upstream_trace | depends_on | expected_test_first |
| --- | --- | --- | --- | --- | --- |
| TASK-001 | 1 | Bootstrap CMake, core target, and CTest for Domain tests | ADR-002 | none | TEST-001 |
| TASK-002 | 2 | Define signed 64-bit id aliases and six-DOF ordering constants | ADR-014; AGENTS.md MITC4 scope | TASK-001 | TEST-002 |
| TASK-003 | 3 | Add `Node` and node storage/retrieval in `Domain` | ADR-010; docs/ARCHITECTURE.md Domain section | TASK-002 | TEST-003 |
| TASK-004 | 4 | Add MITC4 element definition storage without element computation | ADR-004; docs/ARCHITECTURE.md Core Runtime Objects | TASK-003 | TEST-004 |
| TASK-005 | 5 | Add material, shell property, node set, and element set storage | docs/ARCHITECTURE.md Domain included data | TASK-004 | TEST-005 |
| TASK-006 | 6 | Add boundary condition, nodal load, and linear static step definition storage | ADR-012; docs/ARCHITECTURE.md Domain included data | TASK-005 | TEST-006 |
| TASK-007 | 7 | Lock down Domain invariants and failed-insert stability | ADR-010; docs/AGENT_RULES.md boundaries | TASK-006 | TEST-007 |
| TASK-008 | 8 | Record build/test evidence and handoff status | docs/build-test-reports/README.md | TASK-007 | TEST-008 |
## TDD Test Plan
| test_id | order | test_type | red_condition | green_condition | linked_task | command |
| --- | --- | --- | --- | --- | --- | --- |
| TEST-001 | 1 | CTest bootstrap | `domain.bootstrap` is not registered or cannot run | `domain.bootstrap` passes under MSVC Debug | TASK-001 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain.bootstrap` |
| TEST-002 | 2 | unit | `fesa/core/ModelTypes.hpp` is missing | id aliases are 64-bit and DOF ordinals are 0..5 | TASK-002 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` |
| TEST-003 | 3 | unit | `Node` and `Domain` node APIs are missing | add/find/direct lookup/duplicate node tests pass | TASK-003 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` |
| TEST-004 | 4 | unit | element definition APIs are missing | element add/find/direct lookup/connectivity/missing-node tests pass | TASK-004 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` |
| TEST-005 | 5 | unit | material, property, and set APIs are missing | material/property/set validation tests pass | TASK-005 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` |
| TEST-006 | 6 | unit | boundary, load, and step APIs are missing | BC/load/step storage tests pass | TASK-006 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` |
| TEST-007 | 7 | unit | failed insertion mutates Domain or mutable access leaks | invariant and failed-insert stability tests pass | TASK-007 | `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` |
| TEST-008 | 8 | validation | build/test evidence is missing | build/test report records passing validation or classified failure | TASK-008 | `python scripts/validate_workspace.py` |
## CMake/CTest Plan
- target_candidates: `fesa_core`, `fesa_domain_tests`
- add_test_needs: `domain.bootstrap` initially, then Domain behavior tests under the same `domain` CTest filter.
- labels: `domain`, `core`
- msvc_config: Debug
- expected_feature_command: `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain`
- workspace_validation: `python scripts/validate_workspace.py`
## Candidate Files and Ownership
| file_candidate | purpose | owner_boundary | notes |
| --- | --- | --- | --- |
| `CMakeLists.txt` | root CMake project, core library, CTest registration | build/test bootstrap | MSVC x64 Debug baseline |
| `include/fesa/core/ModelTypes.hpp` | id aliases and DOF constants | core model definitions | no solver state |
| `include/fesa/core/Node.hpp` | node id and coordinate definition | core model definitions | no displacement storage |
| `include/fesa/core/ElementDefinition.hpp` | element id, type, connectivity, property reference | core model definitions | no stiffness behavior |
| `include/fesa/core/MaterialDefinition.hpp` | linear elastic material input definition | core model definitions | no constitutive matrix |
| `include/fesa/core/PropertyDefinition.hpp` | shell property input definition | core model definitions | no section stiffness |
| `include/fesa/core/BoundaryCondition.hpp` | prescribed DOF value definition | core model definitions | no matrix application |
| `include/fesa/core/LoadDefinition.hpp` | nodal load definition | core model definitions | no global vector assembly |
| `include/fesa/core/StepDefinition.hpp` | linear static step definition | core model definitions | no analysis driver |
| `include/fesa/core/Domain.hpp` | Domain public storage/retrieval API | core model definitions | const retrieval only |
| `src/core/Domain.cpp` | Domain validation and storage implementation | core model definitions | no external dependencies |
| `tests/core/domain_bootstrap_test.cpp` | CTest bootstrap executable | test | created before production code |
| `tests/core/model_types_test.cpp` | id and DOF tests | test | optional separate executable |
| `tests/core/domain_storage_test.cpp` | Domain behavior tests | test | required before production changes |
## Data Flow Contract
1. A future Abaqus parser and factory/registry layer creates semantic model definitions.
2. `Domain` stores those definitions and validates duplicate ids and missing required references.
3. A future `AnalysisModel` builds a step-local execution view from `Domain` ids or stable references.
4. A future `DofManager` derives active DOFs and equation ids outside `Domain`.
5. A future `AnalysisState` stores solution and iteration state outside `Domain`.
## Acceptance Traceability Matrix
| requirement_id | task_id | test_id | reference_model_id | acceptance_criterion | status |
| --- | --- | --- | --- | --- | --- |
| DOM-REQ-001 Domain owns parsed model definitions | TASK-003 to TASK-006 | TEST-003 to TEST-006 | N/A | storage and const retrieval tests pass | draft |
| DOM-REQ-002 Domain excludes solver state | TASK-007 | TEST-007 | N/A | invariant tests and member review pass | draft |
| DOM-REQ-003 ids use signed 64-bit storage | TASK-002 | TEST-002 | N/A | `sizeof(Id) == 8` test passes | draft |
| DOM-REQ-004 node DOF order is fixed | TASK-002 | TEST-002 | N/A | DOF ordinal test passes | draft |
| DOM-REQ-005 duplicate ids are rejected | TASK-003 to TASK-006 | TEST-003 to TEST-006 | N/A | duplicate tests throw `std::invalid_argument` | draft |
| DOM-REQ-006 missing required references are rejected | TASK-004 to TASK-006 | TEST-004 to TEST-006 | N/A | missing-reference tests throw `std::invalid_argument` | draft |
| DOM-REQ-007 direct missing lookup is deterministic | TASK-003 to TASK-007 | TEST-003 to TEST-007 | N/A | direct missing lookup throws `std::out_of_range` | draft |
| DOM-REQ-008 validation uses MSVC CMake/CTest | TASK-001; TASK-008 | TEST-001; TEST-008 | N/A | configure/build/CTest evidence recorded | draft |
## Validation Commands
```powershell
python -m unittest discover -s scripts -p "test_*.py"
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain
```
## Risks and Downstream Handoff
### Implementation Agent
- Keep each storage layer separate and test-first.
- Do not add numerical behavior while implementing model definitions.
- Preserve `Domain` as a model container, not a solver-state object.
### Build/Test Executor Agent
- Use Visual Studio 17 2022, x64, Debug, and `build/msvc-debug`.
- After `CMakeLists.txt` exists, `python scripts/validate_workspace.py` must configure, build, and run CTest instead of taking the no-CMake path.
### Correction Agent
- Implementation-owned failures are expected to be compile or unit-test failures in `fesa_core` or `fesa_domain_tests`.
- Upstream-contract failures include requests to store equation ids, displacements, reaction vectors, or integration point state inside `Domain`.
### Reference Verification Agent
- No reference verification is required for this phase.
- This phase produces no HDF5 result and consumes no reference artifacts.
## Open Issues
- The full MITC4 requirements, formulation, I/O definition, and reference model artifacts are still separate upstream stages.
- The parser-to-Domain factory API is intentionally deferred until the Abaqus input subset phase.
@@ -1,98 +0,0 @@
# Domain Runtime Storage Implementation Plan
## Objective
Make `Domain` store runtime model objects as its canonical model representation instead of persisting parser-style definition DTOs.
This follows the approved direction:
```text
Abaqus .inp parser
-> temporary parsed or semantic records
-> factory / DomainBuilder
-> Domain owns runtime objects
```
The parser and factory are not implemented in this phase. Definition DTOs may remain as temporary parser/factory-local records, but `Domain` must not use them as persistent storage.
## Phase Overview
1. `runtime-storage-contract`
- Record the migration contract and clarify which model objects are canonical in `Domain`.
- Keep parser/factory work out of scope.
2. `element-material-property-runtime-storage`
- Store elements as `fesa::element::Element`.
- Store materials as `fesa::material::Material`.
- Store shell properties as `fesa::property::ShellProperty`.
- Move `ElementType` to `ModelTypes.hpp` so runtime element interfaces do not depend on `ElementDefinition`.
3. `load-boundary-runtime-storage`
- Store loads as `fesa::load::Load`.
- Store boundary conditions as `fesa::boundary::BoundaryCondition`.
- Validate runtime `NodalLoad` and `SinglePointConstraint` node references during insertion.
4. `step-and-set-runtime-references`
- Validate element sets against runtime elements.
- Validate step load and boundary indices against runtime containers.
- Keep `LinearStaticStepDefinition` as a step configuration record until a dedicated runtime step object is designed.
5. `legacy-definition-extraction`
- Remove `core::*Definition` DTOs from `Domain` includes, fields, and public API.
- Keep focused DTO tests only for parser/factory-local record compatibility.
6. `validation-report-handoff`
- Run harness and CMake/CTest validation.
- Update project handoff documents with concrete evidence.
## Canonical Domain Storage
`Domain` stores:
- `fesa::core::Node` values;
- `std::unique_ptr<fesa::element::Element>`;
- `std::unique_ptr<fesa::material::Material>`;
- `fesa::property::ShellProperty` values;
- `std::unique_ptr<fesa::load::Load>`;
- `std::unique_ptr<fesa::boundary::BoundaryCondition>`;
- node sets and element sets by id;
- `LinearStaticStepDefinition` as a temporary step configuration record.
`Domain` must not store:
- `ElementDefinition`;
- `LinearElasticMaterialDefinition`;
- `ShellPropertyDefinition`;
- `NodalLoadDefinition`;
- `fesa::core::BoundaryCondition`.
## Non-Goals
- No Abaqus parser implementation.
- No factory/registry implementation.
- No MITC4 stiffness, mass, residual, stress, or tangent implementation.
- No equation numbering or solver state in `Domain`.
- No HDF5, MKL, TBB, reference artifact, tolerance, or formulation changes.
## Tests
Primary C++ tests:
- `/tests/core/domain_storage_test.cpp`
- `/tests/core/domain_model_object_test.cpp`
- `/tests/core/model_types_test.cpp`
- `/tests/element/element_base_test.cpp`
- `/tests/element/mitc4_element_model_test.cpp`
- `/tests/material/material_base_test.cpp`
- `/tests/property/shell_property_test.cpp`
- `/tests/load/load_base_test.cpp`
- `/tests/boundary/boundary_base_test.cpp`
Required validation:
```powershell
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"
python -m unittest discover -s scripts -p "test_*.py"
python scripts/validate_workspace.py
git diff --check
```
@@ -1,108 +0,0 @@
# Property Model Foundation Implementation Plan
## Objective
Introduce a runtime `Property` base class for element property and section objects, then make `ShellProperty` and `Domain` use that base class consistently.
This phase keeps property objects as model data only. It does not implement shell section stiffness, constitutive matrices, assembly, solver logic, HDF5 output, or reference comparison.
## Phase Overview
1. `property-base-contract`
- Record the runtime property model contract and exclusions.
2. `property-base-interface`
- Add `PropertyKind` and abstract `Property`.
- Add unit tests for polymorphic use and virtual deletion.
3. `shell-property-polymorphism`
- Make `ShellProperty` derive from `Property`.
- Preserve id, material id, thickness, and positive-thickness validation.
4. `domain-property-ownership`
- Change `Domain` property storage to `std::unique_ptr<Property>`.
- Validate duplicate property ids and shell-property material references.
- Validate element property references against runtime property storage.
5. `validation-report-handoff`
- Run targeted CTest, harness self-tests, workspace validation, and whitespace checks.
- Update handoff documents.
## Runtime Property Contract
`Property` represents element property and section data that is owned by `Domain` and referenced by elements through `PropertyId`.
Required interface:
```cpp
namespace fesa::property {
enum class PropertyKind {
Shell
};
class Property {
public:
virtual ~Property() = default;
virtual PropertyId id() const noexcept = 0;
virtual PropertyKind kind() const noexcept = 0;
};
} // namespace fesa::property
```
`ShellProperty`:
- derives from `Property`;
- returns `PropertyKind::Shell`;
- stores `PropertyId`, `MaterialId`, and thickness;
- rejects non-positive thickness;
- does not compute shell stiffness in this phase.
## Domain Contract
`Domain` stores runtime property objects by ownership:
```cpp
std::unordered_map<PropertyId, std::unique_ptr<fesa::property::Property>>
```
`Domain` validates:
- null property pointer rejection;
- duplicate property id rejection;
- missing material id for `ShellProperty`;
- missing property id for elements.
## Hdf5ResultWriter Constraint
The adjacent `Hdf5ResultWriter` work requested for this slice is limited to a skeleton class only. It may expose construction and basic path access, but it must not link HDF5, create files, define result datasets, write metadata, or claim HDF5 output support.
## Non-Goals
- No MITC4 element formulation.
- No shell section stiffness.
- No material constitutive behavior.
- No DofManager work.
- No assembly, solver, sparse matrix, or reaction recovery.
- No HDF5 file writing or result schema implementation.
- No parser/factory implementation.
## Tests
Primary C++ tests:
- `/tests/property/property_base_test.cpp`
- `/tests/property/shell_property_test.cpp`
- `/tests/core/domain_storage_test.cpp`
- `/tests/core/domain_model_object_test.cpp`
Required validation:
```powershell
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"
python -m unittest discover -s scripts -p "test_*.py"
python scripts/validate_workspace.py
git diff --check
```