feat: add analysis model objects

This commit is contained in:
김경종
2026-06-09 09:04:21 +09:00
parent fdeac602f4
commit 8f24213ab7
44 changed files with 1893 additions and 0 deletions
+72
View File
@@ -0,0 +1,72 @@
{
"project": "FESA Structural Solver",
"phase": "analysis-model-objects",
"steps": [
{
"step": 0,
"name": "model-object-contract",
"status": "completed",
"summary": "Created analysis model object implementation plan with base-class contracts, exclusions, and TDD traceability."
},
{
"step": 1,
"name": "node-model-class",
"status": "completed",
"summary": "Added Node DOF count contract and tests while keeping Node free of solver state."
},
{
"step": 2,
"name": "element-base-interface",
"status": "completed",
"summary": "Added identity-only Element base interface and model-object CTest target."
},
{
"step": 3,
"name": "mitc4-element-model",
"status": "completed",
"summary": "Added MITC4 element model skeleton with four-node connectivity and 24-DOF count tests."
},
{
"step": 4,
"name": "material-base-interface",
"status": "completed",
"summary": "Added Material base and LinearElasticMaterial model object with ownership tests."
},
{
"step": 5,
"name": "property-section-model",
"status": "completed",
"summary": "Added ShellProperty model object with positive-thickness validation tests."
},
{
"step": 6,
"name": "load-base-interface",
"status": "completed",
"summary": "Added Load base and NodalLoad model object with polymorphic access tests."
},
{
"step": 7,
"name": "boundary-base-interface",
"status": "completed",
"summary": "Added BoundaryCondition base and SinglePointConstraint model object with polymorphic access tests."
},
{
"step": 8,
"name": "domain-polymorphic-ownership",
"status": "completed",
"summary": "Extended Domain with unique_ptr ownership APIs for element, material, load, and boundary model objects while preserving existing definition APIs."
},
{
"step": 9,
"name": "legacy-definition-compatibility",
"status": "completed",
"summary": "Documented compatibility between core definition DTOs and new runtime model object ownership APIs."
},
{
"step": 10,
"name": "validation-report-handoff",
"status": "completed",
"summary": "Recorded build/test evidence, updated project progress, and marked the phase completed."
}
]
}
+54
View File
@@ -0,0 +1,54 @@
# Step 0: model-object-contract
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/PLAN.md`
- `/docs/PROGRESS.md`
- `/docs/WORKNOTE.md`
- `/docs/AGENT_RULES.md`
- `/docs/PRD.md`
- `/docs/ADR.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/domain-model-foundation-implementation-plan.md`
- `/include/fesa/core/Domain.hpp`
## Task
Create `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`.
The document must define the model object layer that will be stored by `Domain`:
- `Node` model object.
- abstract `Element` base and MITC4 model object skeleton.
- abstract `Material` base and linear elastic material model object.
- shell property/section model object.
- abstract `Load` base and nodal load model object.
- abstract `BoundaryCondition` base and single-point constraint model object.
- `Domain` RAII ownership of polymorphic model objects through `std::unique_ptr`.
State explicitly that this phase does not implement MITC4 stiffness, material constitutive matrices, global force assembly, boundary-condition matrix application, equation numbering, solver vectors, HDF5 output, reference comparison, or reference-solver execution.
Document how existing `*Definition` value objects remain compatible as input DTOs until parser/factory work replaces or maps them.
## Tests To Write First
This is a documentation planning step. Do not write C++ production code in this step.
## Acceptance Criteria
Run:
```powershell
python -m unittest discover -s scripts -p "test_*.py"
python scripts/validate_workspace.py
```
Update `/phases/analysis-model-objects/index.json` step 0 with `completed`, `error`, or `blocked`.
## Do Not
- Do not change C++ code in this step.
- Do not change MITC4 formulation, I/O contracts, reference artifacts, or tolerance policy.
+53
View File
@@ -0,0 +1,53 @@
# Step 1: node-model-class
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/core/Node.hpp`
- `/tests/core/node_test.cpp`
## Task
Refine the existing `Node` model class contract without adding solver state.
Allowed files:
- Modify `/include/fesa/core/Node.hpp`
- Modify `/src/core/Domain.cpp` only if constructor/accessor definitions move or change
- Modify `/tests/core/node_test.cpp`
Required behavior:
- `Node` exposes `id()`, `coordinates()`, `x()`, `y()`, `z()`.
- `Node` exposes `static constexpr std::size_t dofCount()` or equivalent compile-time DOF count of 6.
- `Node` does not store equation ids, displacements, residuals, reactions, or constraints.
## Tests To Write First
Extend `/tests/core/node_test.cpp` before production changes:
- Verify `Node::dofCount() == 6`.
- Verify coordinate order is preserved.
- Verify the returned coordinate data is const from a const `Node`.
Run the targeted build and confirm RED before implementation.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain
```
Update `/phases/analysis-model-objects/index.json` step 1 with status and summary.
## Do Not
- Do not add equation ids or solver state to `Node`.
+54
View File
@@ -0,0 +1,54 @@
# Step 10: validation-report-handoff
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/build-test-reports/README.md`
- `/docs/PROGRESS.md`
- `/docs/WORKNOTE.md`
- `/phases/analysis-model-objects/index.json`
## Task
Run final verification and write handoff evidence.
Allowed files:
- Create `/docs/build-test-reports/analysis-model-objects-build-test.md`
- Modify `/docs/PROGRESS.md`
- Modify `/docs/WORKNOTE.md` only if new traps or failed approaches occurred
- Modify `/phases/analysis-model-objects/index.json`
- Modify `/phases/index.json`
The build/test report must include command log summary, exit codes, configure/build/CTest status, failure classification or `N/A`, and no-change assertions for reference artifacts and tolerance policy.
## Tests To Write First
This is a validation/reporting step. Do not write new C++ production behavior.
## Acceptance Criteria
Run:
```powershell
git status --short --branch
git remote -v
python -m unittest discover -s scripts -p "test_*.py"
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"
git diff --check
```
Update:
- `/phases/analysis-model-objects/index.json` step 10 with `completed`, `error`, or `blocked`.
- `/phases/index.json` phase status to `completed` only if all steps are completed.
- `/docs/PROGRESS.md` with validation evidence.
## Do Not
- Do not claim MITC4 numerical implementation, reference comparison success, or release readiness.
- Do not run Abaqus, Nastran, or any reference solver.
+58
View File
@@ -0,0 +1,58 @@
# Step 2: element-base-interface
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/core/ElementDefinition.hpp`
- `/CMakeLists.txt`
## Task
Add the abstract element model interface.
Allowed files:
- Create `/include/fesa/element/Element.hpp`
- Create `/tests/element/element_base_test.cpp`
- Modify `/tests/core/domain_bootstrap_test.cpp` only if the current test executable remains the single test runner
- Modify `/CMakeLists.txt`
Required interface:
- virtual destructor.
- `ElementId id() const noexcept`.
- `ElementType type() const noexcept`.
- `std::size_t nodeCount() const noexcept`.
- `std::span` is not allowed because this project targets C++17.
- Use const reference return for connectivity data.
- no stiffness, residual, stress, state, or equation API in this phase.
## Tests To Write First
Write `/tests/element/element_base_test.cpp` before production changes. Use a small test subclass to prove:
- base pointer dispatch works.
- id/type/connectivity/property id are readable through base API.
- deleting through `std::unique_ptr<Element>` is valid.
Run targeted build and confirm RED because `Element.hpp` is missing.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
```
Update step 2 status.
## Do Not
- Do not implement MITC4 stiffness or numerical element behavior.
+57
View File
@@ -0,0 +1,57 @@
# Step 3: mitc4-element-model
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/element/Element.hpp`
- `/include/fesa/core/ElementDefinition.hpp`
## Task
Add a MITC4 element model object skeleton.
Allowed files:
- Create `/include/fesa/element/Mitc4Element.hpp`
- Create `/src/element/Mitc4Element.cpp`
- Create `/tests/element/mitc4_element_model_test.cpp`
- Modify `/CMakeLists.txt`
Required behavior:
- `Mitc4Element` derives from `Element`.
- Stores element id, four node ids, and property id.
- Reports `ElementType::Mitc4`.
- Reports `nodeCount() == 4`.
- Reports `dofCount() == 24`.
- Preserves connectivity order.
## Tests To Write First
Write `/tests/element/mitc4_element_model_test.cpp` before production changes:
- Construct `Mitc4Element`.
- Access it through `const Element&`.
- Verify id, type, node count, DOF count, connectivity, and property id.
Run targeted build and confirm RED because `Mitc4Element.hpp` is missing.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
```
Update step 3 status.
## Do Not
- Do not implement element stiffness, Jacobians, MITC shear interpolation, resultants, stress, or integration-point state.
+55
View File
@@ -0,0 +1,55 @@
# Step 4: material-base-interface
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/core/MaterialDefinition.hpp`
## Task
Add material model base and linear elastic material model object.
Allowed files:
- Create `/include/fesa/material/Material.hpp`
- Create `/include/fesa/material/LinearElasticMaterial.hpp`
- Create `/src/material/LinearElasticMaterial.cpp`
- Create `/tests/material/material_base_test.cpp`
- Modify `/CMakeLists.txt`
Required behavior:
- `Material` has virtual destructor and `MaterialId id() const noexcept`.
- `LinearElasticMaterial` derives from `Material`.
- Stores Young's modulus and Poisson ratio.
- No constitutive matrix or stress update in this phase.
## Tests To Write First
Write `/tests/material/material_base_test.cpp` before production changes:
- Access `LinearElasticMaterial` through `const Material&`.
- Verify id, E, and nu.
- Verify deletion through `std::unique_ptr<Material>`.
Run targeted build and confirm RED.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
```
Update step 4 status.
## Do Not
- Do not implement constitutive matrices, stress updates, or tangent stiffness.
+53
View File
@@ -0,0 +1,53 @@
# Step 5: property-section-model
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/core/PropertyDefinition.hpp`
## Task
Add shell property/section model object.
Allowed files:
- Create `/include/fesa/property/ShellProperty.hpp`
- Create `/src/property/ShellProperty.cpp`
- Create `/tests/property/shell_property_test.cpp`
- Modify `/CMakeLists.txt`
Required behavior:
- Stores property id, material id, and thickness.
- Exposes const accessors.
- Rejects non-positive thickness with `std::invalid_argument`.
- Does not compute shell section stiffness.
## Tests To Write First
Write `/tests/property/shell_property_test.cpp` before production changes:
- Valid property stores id/material/thickness.
- Zero or negative thickness throws.
Run targeted build and confirm RED.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
```
Update step 5 status.
## Do Not
- Do not implement membrane, bending, or shear constitutive stiffness.
+55
View File
@@ -0,0 +1,55 @@
# Step 6: load-base-interface
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/core/LoadDefinition.hpp`
## Task
Add load model base and nodal load object.
Allowed files:
- Create `/include/fesa/load/Load.hpp`
- Create `/include/fesa/load/NodalLoad.hpp`
- Create `/src/load/NodalLoad.cpp`
- Create `/tests/load/load_base_test.cpp`
- Modify `/CMakeLists.txt`
Required behavior:
- `Load` has virtual destructor and a load kind enum.
- `NodalLoad` derives from `Load`.
- Stores node id, DOF, and value.
- No global vector assembly in this phase.
## Tests To Write First
Write `/tests/load/load_base_test.cpp` before production changes:
- Access `NodalLoad` through `const Load&`.
- Verify kind, node id, DOF, value.
- Verify deletion through `std::unique_ptr<Load>`.
Run targeted build and confirm RED.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
```
Update step 6 status.
## Do Not
- Do not assemble forces or apply time/load factors.
+55
View File
@@ -0,0 +1,55 @@
# Step 7: boundary-base-interface
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/core/BoundaryCondition.hpp`
## Task
Add boundary condition model base and single-point constraint object.
Allowed files:
- Create `/include/fesa/boundary/BoundaryCondition.hpp`
- Create `/include/fesa/boundary/SinglePointConstraint.hpp`
- Create `/src/boundary/SinglePointConstraint.cpp`
- Create `/tests/boundary/boundary_base_test.cpp`
- Modify `/CMakeLists.txt`
Required behavior:
- `BoundaryCondition` has virtual destructor and a boundary kind enum.
- `SinglePointConstraint` derives from `BoundaryCondition`.
- Stores node id, DOF, prescribed value.
- No matrix elimination or reaction recovery in this phase.
## Tests To Write First
Write `/tests/boundary/boundary_base_test.cpp` before production changes:
- Access `SinglePointConstraint` through `const BoundaryCondition&`.
- Verify kind, node id, DOF, value.
- Verify deletion through `std::unique_ptr<BoundaryCondition>`.
Run targeted build and confirm RED.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
```
Update step 7 status.
## Do Not
- Do not apply constraints to matrices or compute reactions.
+62
View File
@@ -0,0 +1,62 @@
# Step 8: domain-polymorphic-ownership
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/core/Domain.hpp`
- all model object headers created by previous steps
## Task
Extend `Domain` with RAII ownership APIs for polymorphic model objects while preserving existing definition-storage tests.
Allowed files:
- Modify `/include/fesa/core/Domain.hpp`
- Modify `/src/core/Domain.cpp`
- Create `/tests/core/domain_model_object_test.cpp`
- Modify `/tests/core/domain_bootstrap_test.cpp`
- Modify `/CMakeLists.txt`
Required behavior:
- `Domain::addElementObject(std::unique_ptr<Element>)`
- `Domain::findElementObject(ElementId)` and `Domain::elementObject(ElementId)`
- equivalent add/find/direct APIs for `Material`, `Load`, and model `BoundaryCondition`.
- duplicate ids or duplicate load/boundary keys throw `std::invalid_argument`.
- missing direct lookup throws `std::out_of_range`.
- retrieval returns const base references or const base pointers.
- existing `Definition` APIs remain available.
## Tests To Write First
Write `/tests/core/domain_model_object_test.cpp` before production changes:
- Domain owns `Mitc4Element`, `LinearElasticMaterial`, `NodalLoad`, and `SinglePointConstraint` through `std::unique_ptr`.
- Find/direct lookup through base APIs works.
- Duplicate ids throw for element/material.
- Missing direct lookup throws.
Run targeted build and confirm RED.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R model-object
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R domain
```
Update step 8 status.
## Do Not
- Do not remove existing definition APIs in this step.
- Do not add solver state to Domain.
+49
View File
@@ -0,0 +1,49 @@
# Step 9: legacy-definition-compatibility
## Read First
Read these files before editing:
- `/AGENTS.md`
- `/docs/AGENT_RULES.md`
- `/docs/ARCHITECTURE.md`
- `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- `/include/fesa/core/Domain.hpp`
- `/tests/core/domain_storage_test.cpp`
- `/tests/core/domain_model_object_test.cpp`
## Task
Preserve and document compatibility between existing `*Definition` value objects and new model-object base classes.
Allowed files:
- Modify `/docs/implementation-plans/analysis-model-objects-implementation-plan.md`
- Modify tests only if compatibility gaps are found
- Modify production code only for narrow compatibility fixes
Required behavior:
- Existing Domain definition-storage tests still pass.
- New model-object ownership tests still pass.
- The implementation plan clearly states that `*Definition` objects remain parser/factory DTOs until the parser phase decides whether to map or replace them.
## Tests To Write First
If production code must change, write or extend a failing C++ test before the change. If this is documentation-only, do not add production code.
## Acceptance Criteria
Run:
```powershell
python scripts/validate_workspace.py
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "domain|model-object"
```
Update step 9 status.
## Do Not
- Do not delete existing `*Definition` headers or tests.
- Do not rewrite parser or factory behavior.
+4
View File
@@ -3,6 +3,10 @@
{
"dir": "domain-model-foundation",
"status": "completed"
},
{
"dir": "analysis-model-objects",
"status": "completed"
}
]
}