2.2 KiB
2.2 KiB
Step 3: analysis-base-interface
Read First
Read these files before editing:
/AGENTS.md/docs/PLAN.md/docs/PROGRESS.md/docs/WORKNOTE.md/docs/AGENT_RULES.md/docs/ADR.md/docs/ARCHITECTURE.md/docs/implementation-plans/analysis-state-analysis-base-implementation-plan.md/include/fesa/core/Domain.hpp/include/fesa/core/AnalysisState.hpp/CMakeLists.txt
Task
Add fesa::analysis::Analysis as a minimal base interface for future analysis strategies.
Candidate files:
- Create
/include/fesa/analysis/Analysis.hpp - Create
/tests/analysis/analysis_base_test.cpp - Modify
/CMakeLists.txt
Required contract:
Analysishas a virtual destructor.Analysisexposesconst char* name() const noexcept.Analysisexposesvoid run(const fesa::core::Domain& domain, fesa::core::AnalysisState& state).rundelegates to a protected pure virtualdoRun(const fesa::core::Domain&, fesa::core::AnalysisState&).Domainis passed as const;AnalysisStateis mutable.- The base class must not own
Domain,AnalysisState, solver objects, result writers, or reference artifacts.
Tests To Write First
Write tests in /tests/analysis/analysis_base_test.cpp before production changes:
- a derived recording analysis can be used through
Analysis&. runforwards the constDomainand mutableAnalysisStateto the derived implementation.- derived implementation can update
AnalysisStatewithout mutatingDomain. Analysiscan be deleted through a base pointer.
Run the targeted test and confirm it fails before implementation:
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R analysis
Then implement the minimum code needed to pass.
Acceptance Criteria
Run:
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R analysis
python scripts/validate_workspace.py
Update /phases/analysis-state-analysis-base/index.json step 3 with completed, error, or blocked.
Do Not
- Do not implement
LinearStaticAnalysis. - Do not add template-method hook lists for assembly, solve, boundary conditions, or output until
AnalysisModelandDofManagerexist.