60 lines
2.2 KiB
Markdown
60 lines
2.2 KiB
Markdown
# Step 2: load-boundary-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/load/Load.hpp`
|
|
- `/include/fesa/load/NodalLoad.hpp`
|
|
- `/include/fesa/boundary/BoundaryCondition.hpp`
|
|
- `/include/fesa/boundary/SinglePointConstraint.hpp`
|
|
- `/src/core/Domain.cpp`
|
|
- `/tests/core/domain_storage_test.cpp`
|
|
- `/tests/core/domain_model_object_test.cpp`
|
|
|
|
## Task
|
|
|
|
Make runtime load and boundary objects the canonical Domain storage.
|
|
|
|
Required API shape:
|
|
|
|
- `std::size_t Domain::addLoad(std::unique_ptr<fesa::load::Load> load)`
|
|
- `const fesa::load::Load* Domain::findLoad(std::size_t index) const noexcept`
|
|
- `const fesa::load::Load& Domain::load(std::size_t index) const`
|
|
- `std::size_t Domain::loadCount() const noexcept`
|
|
- `std::size_t Domain::addBoundaryCondition(std::unique_ptr<fesa::boundary::BoundaryCondition> boundary)`
|
|
- `const fesa::boundary::BoundaryCondition* Domain::findBoundaryCondition(std::size_t index) const noexcept`
|
|
- `const fesa::boundary::BoundaryCondition& Domain::boundaryCondition(std::size_t index) const`
|
|
- `std::size_t Domain::boundaryConditionCount() const noexcept`
|
|
|
|
Rules:
|
|
|
|
- Reject null load and boundary pointers.
|
|
- `NodalLoad` must reference an existing node.
|
|
- `SinglePointConstraint` must reference an existing node.
|
|
- Duplicate `(node, dof)` nodal loads must throw.
|
|
- Duplicate `(node, dof)` single-point constraints must throw.
|
|
- Runtime load and boundary storage must not use `core::NodalLoadDefinition` or `core::BoundaryCondition`.
|
|
|
|
## Tests To Write First
|
|
|
|
- Rewrite or extend `/tests/core/domain_storage_test.cpp` so load and boundary storage uses runtime objects.
|
|
- Add missing-node tests for `NodalLoad` and `SinglePointConstraint` runtime insertion.
|
|
|
|
## 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. Keep solver state out of `Domain`.
|
|
3. Update `phases/domain-runtime-storage/index.json` for this step result.
|