feat: add property model foundation
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
{
|
||||
"dir": "domain-runtime-storage",
|
||||
"status": "completed"
|
||||
},
|
||||
{
|
||||
"dir": "property-model-foundation",
|
||||
"status": "completed"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"project": "FESA Structural Solver",
|
||||
"phase": "property-model-foundation",
|
||||
"steps": [
|
||||
{
|
||||
"step": 0,
|
||||
"name": "property-base-contract",
|
||||
"status": "completed",
|
||||
"summary": "Created the property model foundation implementation plan with runtime Property ownership rules and HDF5 skeleton limits."
|
||||
},
|
||||
{
|
||||
"step": 1,
|
||||
"name": "property-base-interface",
|
||||
"status": "completed",
|
||||
"summary": "Added PropertyKind and abstract Property base with polymorphic ownership tests."
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "shell-property-polymorphism",
|
||||
"status": "completed",
|
||||
"summary": "Made ShellProperty derive from Property while preserving material id and positive-thickness validation."
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "domain-property-ownership",
|
||||
"status": "completed",
|
||||
"summary": "Migrated Domain property storage to std::unique_ptr<Property> with shell-property compatibility accessors and cross-reference validation."
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "validation-report-handoff",
|
||||
"status": "completed",
|
||||
"summary": "Validated targeted CTest, workspace validation, script self-tests, and whitespace checks; updated project progress."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
# Step 0: property-base-contract
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/PLAN.md`
|
||||
- `/docs/PROGRESS.md`
|
||||
- `/docs/WORKNOTE.md`
|
||||
- `/docs/AGENT_RULES.md`
|
||||
- `/docs/ARCHITECTURE.md`
|
||||
- `/docs/ADR.md`
|
||||
- `/docs/implementation-plans/domain-runtime-storage-implementation-plan.md`
|
||||
- `/include/fesa/property/ShellProperty.hpp`
|
||||
- `/include/fesa/core/Domain.hpp`
|
||||
- `/src/core/Domain.cpp`
|
||||
|
||||
## Task
|
||||
|
||||
Create `/docs/implementation-plans/property-model-foundation-implementation-plan.md`.
|
||||
|
||||
The plan must define the runtime property model contract:
|
||||
|
||||
- `Property` is the base class for element properties and sections.
|
||||
- `PropertyKind` identifies concrete property families; phase 1 supports only `Shell`.
|
||||
- `ShellProperty` derives from `Property`.
|
||||
- `Domain` owns property objects through RAII.
|
||||
- `Domain` validates duplicate property ids and missing material ids.
|
||||
- `Element::propertyId()` remains an id reference; elements do not own property objects.
|
||||
|
||||
Keep out of scope:
|
||||
|
||||
- shell section stiffness;
|
||||
- material constitutive matrices;
|
||||
- shear correction;
|
||||
- element formulation;
|
||||
- assembly, solver, HDF5 output, and reference comparison.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
- Documentation-only step. No C++ test is required in this step.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
```
|
||||
|
||||
## Verification Notes
|
||||
|
||||
1. Confirm the plan does not change MITC4 formulation or tolerance policy.
|
||||
2. Confirm the plan keeps solver state out of `Domain`.
|
||||
3. Update `phases/property-model-foundation/index.json` for this step result.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Step 1: property-base-interface
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/AGENT_RULES.md`
|
||||
- `/docs/implementation-plans/property-model-foundation-implementation-plan.md`
|
||||
- `/include/fesa/core/ModelTypes.hpp`
|
||||
- `/include/fesa/property/ShellProperty.hpp`
|
||||
- `/tests/property/shell_property_test.cpp`
|
||||
- `/CMakeLists.txt`
|
||||
|
||||
## Task
|
||||
|
||||
Add the runtime property base interface.
|
||||
|
||||
Required API:
|
||||
|
||||
- File: `/include/fesa/property/Property.hpp`
|
||||
- Namespace: `fesa::property`
|
||||
- `enum class PropertyKind { Shell };`
|
||||
- `class Property`
|
||||
- virtual destructor;
|
||||
- `virtual PropertyId id() const noexcept = 0;`
|
||||
- `virtual PropertyKind kind() const noexcept = 0;`
|
||||
|
||||
Rules:
|
||||
|
||||
- Use `fesa::core::PropertyId`.
|
||||
- Do not add section stiffness or material behavior.
|
||||
- Keep this header independent from HDF5, MKL, TBB, and parser headers.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
- Add `/tests/property/property_base_test.cpp`.
|
||||
- Test that a small derived class can be used through `const Property&`.
|
||||
- Test virtual deletion through `std::unique_ptr<Property>`.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Notes
|
||||
|
||||
1. Run targeted CTest before implementation and confirm the expected compile failure.
|
||||
2. Keep all code C++17/MSVC-compatible.
|
||||
3. Update `phases/property-model-foundation/index.json` for this step result.
|
||||
@@ -0,0 +1,49 @@
|
||||
# Step 2: shell-property-polymorphism
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/AGENT_RULES.md`
|
||||
- `/docs/implementation-plans/property-model-foundation-implementation-plan.md`
|
||||
- `/include/fesa/property/Property.hpp`
|
||||
- `/include/fesa/property/ShellProperty.hpp`
|
||||
- `/src/property/ShellProperty.cpp`
|
||||
- `/tests/property/shell_property_test.cpp`
|
||||
|
||||
## Task
|
||||
|
||||
Make `ShellProperty` derive from `Property`.
|
||||
|
||||
Required behavior:
|
||||
|
||||
- `ShellProperty::id()` overrides `Property::id()`.
|
||||
- `ShellProperty::kind()` returns `PropertyKind::Shell`.
|
||||
- `ShellProperty` keeps `materialId()` and `thickness()` accessors.
|
||||
- Constructor still rejects `thickness <= 0.0`.
|
||||
|
||||
Rules:
|
||||
|
||||
- Do not rename `ShellProperty` in this phase.
|
||||
- Do not add shell section stiffness.
|
||||
- Do not add material lookup inside `ShellProperty`; Domain validates cross references.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
- Extend `/tests/property/shell_property_test.cpp`.
|
||||
- Test `const Property& base = shell_property` exposes id and kind.
|
||||
- Preserve positive-thickness validation tests.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Notes
|
||||
|
||||
1. Run targeted CTest before production edits and confirm failure.
|
||||
2. Keep `ShellProperty` free of solver state.
|
||||
3. Update `phases/property-model-foundation/index.json` for this step result.
|
||||
@@ -0,0 +1,60 @@
|
||||
# Step 3: domain-property-ownership
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/AGENT_RULES.md`
|
||||
- `/docs/implementation-plans/property-model-foundation-implementation-plan.md`
|
||||
- `/include/fesa/core/Domain.hpp`
|
||||
- `/src/core/Domain.cpp`
|
||||
- `/include/fesa/property/Property.hpp`
|
||||
- `/include/fesa/property/ShellProperty.hpp`
|
||||
- `/tests/core/domain_storage_test.cpp`
|
||||
- `/tests/core/domain_model_object_test.cpp`
|
||||
|
||||
## Task
|
||||
|
||||
Make `Domain` own runtime property objects through the `Property` base class.
|
||||
|
||||
Required API shape:
|
||||
|
||||
- `void Domain::addProperty(std::unique_ptr<fesa::property::Property> property);`
|
||||
- `const fesa::property::Property* Domain::findProperty(PropertyId id) const noexcept;`
|
||||
- `const fesa::property::Property& Domain::property(PropertyId id) const;`
|
||||
- `std::size_t Domain::propertyCount() const noexcept;`
|
||||
|
||||
Compatibility helpers may remain if useful:
|
||||
|
||||
- `addShellProperty(std::unique_ptr<fesa::property::ShellProperty>)`
|
||||
- `findShellProperty(PropertyId)`
|
||||
- `shellProperty(PropertyId)`
|
||||
- `shellPropertyCount()`
|
||||
|
||||
Rules:
|
||||
|
||||
- Property storage must be `std::unique_ptr<Property>`.
|
||||
- Reject null property pointers.
|
||||
- Reject duplicate property ids.
|
||||
- For `ShellProperty`, reject missing material id.
|
||||
- `Domain::addElement` must validate `Element::propertyId()` using runtime property storage.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
- Rewrite relevant property assertions in `/tests/core/domain_storage_test.cpp` to use runtime property ownership.
|
||||
- Add a test that `const Domain::property(id)` returns `const Property&`.
|
||||
- Preserve direct `ShellProperty` lookup for now if compatibility helpers remain.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Notes
|
||||
|
||||
1. Run targeted CTest before production edits and confirm failure.
|
||||
2. Do not add solver vectors, equation ids, or integration-point state to `Domain`.
|
||||
3. Update `phases/property-model-foundation/index.json` for this step result.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Step 4: validation-report-handoff
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/PLAN.md`
|
||||
- `/docs/PROGRESS.md`
|
||||
- `/docs/WORKNOTE.md`
|
||||
- `/docs/AGENT_RULES.md`
|
||||
- `/docs/implementation-plans/property-model-foundation-implementation-plan.md`
|
||||
- `/phases/property-model-foundation/index.json`
|
||||
|
||||
## Task
|
||||
|
||||
Record validation evidence and handoff notes after the property model foundation implementation.
|
||||
|
||||
Required updates:
|
||||
|
||||
- Update `/docs/PROGRESS.md` with completed property base and Domain property ownership work.
|
||||
- Update `/docs/PLAN.md` only if sequencing or acceptance criteria changed.
|
||||
- Update `/docs/WORKNOTE.md` only if there were failures, repeated mistakes, or environment traps.
|
||||
- Mark `/phases/property-model-foundation/index.json` steps and `/phases/index.json` according to actual results.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
- Documentation/reporting step. No new C++ test is required.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
python scripts/validate_workspace.py
|
||||
git diff --check
|
||||
```
|
||||
|
||||
## Verification Notes
|
||||
|
||||
1. Do not claim MITC4 formulation correctness.
|
||||
2. Do not claim HDF5 result output is implemented.
|
||||
3. Keep validation evidence concrete: command, result, and scope.
|
||||
Reference in New Issue
Block a user