2.1 KiB
2.1 KiB
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:
LinearElasticMaterialDefinitionstores material id, Young's modulus, and Poisson's ratio.ShellPropertyDefinitionstores property id, material id, and thickness.Domainstores 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:
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.