2.8 KiB
2.8 KiB
Step 1: element-material-property-runtime-storage
Read First
Read these files before editing:
/AGENTS.md/docs/AGENT_RULES.md/docs/implementation-plans/domain-runtime-storage-implementation-plan.md/include/fesa/core/Domain.hpp/include/fesa/core/ModelTypes.hpp/include/fesa/core/ElementDefinition.hpp/include/fesa/element/Element.hpp/include/fesa/element/Mitc4Element.hpp/include/fesa/material/Material.hpp/include/fesa/material/LinearElasticMaterial.hpp/include/fesa/property/ShellProperty.hpp/src/core/Domain.cpp/tests/core/domain_storage_test.cpp/tests/core/domain_model_object_test.cpp
Task
Make runtime element, material, and shell property objects the canonical Domain storage.
Required API shape:
void Domain::addElement(std::unique_ptr<fesa::element::Element> element)const fesa::element::Element* Domain::findElement(ElementId id) const noexceptconst fesa::element::Element& Domain::element(ElementId id) conststd::size_t Domain::elementCount() const noexceptvoid Domain::addMaterial(std::unique_ptr<fesa::material::Material> material)const fesa::material::Material* Domain::findMaterial(MaterialId id) const noexceptconst fesa::material::Material& Domain::material(MaterialId id) conststd::size_t Domain::materialCount() const noexceptvoid Domain::addShellProperty(fesa::property::ShellProperty property)const fesa::property::ShellProperty* Domain::findShellProperty(PropertyId id) const noexceptconst fesa::property::ShellProperty& Domain::shellProperty(PropertyId id) conststd::size_t Domain::shellPropertyCount() const noexcept
Rules:
- Move
ElementTypeto/include/fesa/core/ModelTypes.hppso runtimeElementno longer includes/include/fesa/core/ElementDefinition.hpp. Domain::addShellPropertymust reject duplicate property ids and missing material ids.Domain::addElementmust reject null pointers, duplicate element ids, missing node ids, and missing shell property ids.- Keep C++17/MSVC compatibility and RAII ownership.
Tests To Write First
- Rewrite or extend
/tests/core/domain_storage_test.cppso element, material, and shell property storage uses runtime objects instead ofElementDefinition,LinearElasticMaterialDefinition, andShellPropertyDefinition. - Add or adjust a test that proves
Elementno longer depends onElementDefinitionforElementType.
Acceptance Criteria
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"
python scripts/validate_workspace.py
Verification Notes
- Run the targeted CTest before and after implementation to capture RED then GREEN.
- Do not delete definition classes in this step; only remove them from Domain storage.
- Update
phases/domain-runtime-storage/index.jsonfor this step result.