# 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`; - `std::unique_ptr`; - `fesa::property::ShellProperty` values; - `std::unique_ptr`; - `std::unique_ptr`; - 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 ```