feat: add property model foundation

This commit is contained in:
김경종
2026-06-09 11:56:42 +09:00
parent f4196efb10
commit 7ea08441ed
23 changed files with 661 additions and 25 deletions
+7
View File
@@ -38,6 +38,9 @@
- Migrated `Domain` canonical storage away from parser-style definition DTOs to runtime model objects for elements, materials, shell properties, loads, and boundary conditions.
- Moved `ElementType` into `ModelTypes.hpp` so runtime element interfaces no longer include `ElementDefinition.hpp`.
- Updated Domain storage tests so element sets and linear static step indices validate against runtime element, load, and boundary containers.
- Created `docs/implementation-plans/property-model-foundation-implementation-plan.md` and `phases/property-model-foundation/`.
- Added runtime `Property` base class and `PropertyKind`, made `ShellProperty` derive from `Property`, and migrated `Domain` property ownership to `std::unique_ptr<Property>`.
- Added a minimal `Hdf5ResultWriter` skeleton with path validation only; it does not link HDF5 or write files yet.
## In Progress
- Ready for the next upstream MITC4 stage: new solver feature requirements analysis for `mitc4-linear-static-shell`.
@@ -59,6 +62,10 @@
- 2026-06-09: After Domain runtime storage migration, `python -m unittest discover -s scripts -p "test_*.py"` passed. 89 tests ran successfully.
- 2026-06-09: After Domain runtime storage migration, `python scripts/validate_workspace.py` configured CMake with Visual Studio 17 2022 x64, built Debug targets, ran CTest, and passed.
- 2026-06-09: After Domain runtime storage migration, `git diff --check` passed with only Git line-ending normalization warnings.
- 2026-06-09: After property model foundation implementation, `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object|io"` passed. 3 CTest executables ran successfully.
- 2026-06-09: After property model foundation implementation, `python -m unittest discover -s scripts -p "test_*.py"` passed. 89 tests ran successfully.
- 2026-06-09: After property model foundation implementation, `python scripts/validate_workspace.py` configured CMake with Visual Studio 17 2022 x64, built Debug targets, ran CTest, and passed.
- 2026-06-09: After property model foundation implementation, `git diff --check` passed with only Git line-ending normalization warnings.
- 2026-06-08: After Domain model foundation implementation, `python -m unittest discover -s scripts -p "test_*.py"` passed. 89 tests ran successfully.
- 2026-06-08: After Domain model foundation implementation, `python scripts/validate_workspace.py` configured CMake with Visual Studio 17 2022 x64, built Debug targets, ran CTest, and passed.
- 2026-06-08: After Domain model foundation implementation, `ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain` passed. 1 domain/core test executable ran successfully.
@@ -0,0 +1,108 @@
# 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
```