feat: add domain model foundation

This commit is contained in:
김경종
2026-06-08 16:40:04 +09:00
parent e4e2f57808
commit fdeac602f4
38 changed files with 2685 additions and 5 deletions
+66
View File
@@ -0,0 +1,66 @@
# Step 5: model-attribute-storage
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ADR.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/domain-model-foundation-implementation-plan.md`
- `/include/fesa/core/Domain.hpp`
- `/include/fesa/core/ElementDefinition.hpp`
- `/tests/core/domain_storage_test.cpp`
## Task
Add minimal material, shell property, node set, and element set storage.
Allowed files:
- Create `/include/fesa/core/MaterialDefinition.hpp`
- Create `/include/fesa/core/PropertyDefinition.hpp`
- Modify `/include/fesa/core/Domain.hpp`
- Modify `/src/core/Domain.cpp`
- Modify `/tests/core/domain_storage_test.cpp`
Required behavior:
- `LinearElasticMaterialDefinition` stores material id, Young's modulus, and Poisson's ratio.
- `ShellPropertyDefinition` stores property id, material id, and thickness.
- `Domain` stores node sets and element sets by string name.
- Duplicate material ids, property ids, or set names throw `std::invalid_argument`.
- Adding a shell property with missing material id throws `std::invalid_argument`.
- Node sets can only reference existing nodes.
- Element sets can only reference existing elements.
- All retrieval APIs return const data.
## Tests To Write First
Write failing tests before production changes:
- Add material and shell property, then retrieve them.
- Duplicate material/property id throws.
- Shell property referencing missing material throws.
- Node set stores existing node ids in input order.
- Element set stores existing element ids in input order.
- Sets referencing missing ids throw.
Run targeted CTest and verify RED before implementation.
## Acceptance Criteria
Run:
```powershell
cmake --build build/msvc-debug --config Debug
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain
python scripts/validate_workspace.py
```
Update `/phases/domain-model-foundation/index.json` step 5 with `completed`, `error`, or `blocked`.
## Do Not
- Do not implement constitutive matrices, shell section stiffness, units conversion, or parser behavior.