Files
FESADev/docs/implementation-plans/property-model-foundation-implementation-plan.md
T
2026-06-09 11:56:42 +09:00

109 lines
3.2 KiB
Markdown

# 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
```