1.5 KiB
1.5 KiB
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.cpponly 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::spanis 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:
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.