3.9 KiB
Step 15: AnalysisState
과거 개발 계획이다. 아래 작업·상태·예시는 현재 실행 지시가 아니다. 현재 구현과 검증 한계는 기능 요약을 따른다.
읽어야 할 파일
/AGENTS.md../../docs/solver-core/README.md../../docs/solver-core/README.md../../docs/linear-static-3d-euler-beam/README.md../../docs/linear-static-3d-euler-beam/README.md../../docs/linear-static-3d-euler-beam/README.md/include/fesa/math/vector.hpp/include/fesa/analysis/analysis_model.hpp/include/fesa/fem/dof_manager.hpp/src/fesa/fem/dof_manager.cpp
소유 파일
- Create:
/include/fesa/results/result_records.hpp - Create:
/include/fesa/analysis/analysis_state.hpp - Create:
/src/fesa/analysis/analysis_state.cpp - Create:
/tests/unit/results/result_records_test.cpp - Create:
/tests/unit/analysis/analysis_state_test.cpp - Modify:
/src/fesa/CMakeLists.txt - Modify:
/tests/CMakeLists.txt
작업
V0에서 실제 할당하는 mutable analysis quantities와 output row identity를 소유하는
AnalysisState를 위 exact paths에 구현하라. 최소 계약은 다음 의미를 가진다.
struct StepFrameIdentity { std::string stepName; std::size_t frameIndex; };
struct EndpointResultRow { EntityIndex element; int endpoint; SourceEntityId node;
std::array<double, 6> endAction;
std::array<double, 4> sectionResultant; };
struct GaussResultRow { EntityIndex element; int gaussPoint;
std::array<double, 4> generalizedStrain;
std::array<double, 4> generalizedResultant; };
struct StressS11Row { EntityIndex element; int gaussPoint; std::size_t sectionPoint;
double x1; double x2; double s11; std::string source; };
class AnalysisState {
public:
static AnalysisState create(const DofManager& dofs, StepFrameIdentity identity);
Vector& displacement() noexcept;
Vector& externalForce() noexcept;
Vector& internalForce() noexcept;
Vector& residual() noexcept;
Vector& reaction() noexcept;
// const overloads and owned element-recovery row accessors
};
각 full vector 크기는 fullDofCount()이고 zero-initialized다. Reaction은 constrained value를
동일 full-index space에 두며 free component는 residual sanity에 사용할 수 있어야 한다.
Endpoint/Gauss/stress row는 stable element/point order로 저장한다. Velocity, acceleration,
temperature, iteration history, nonlinear state storage를 만들지 않는다.
Tests는 allocation/zero initialization, independent ownership, step/frame identity, row ordering,
copy/move policy, forbidden-state API 부재 review를 포함하고 AnalysisState regex로 등록한다.
Acceptance Criteria
과거 도구 실행·출력 지시는 정리했으며, 현재 검증 방법은 기능 요약을 따른다.
RED 후 GREEN/VERIFY:
과거 도구 실행·출력 지시는 정리했으며, 현재 검증 방법은 기능 요약을 따른다.
검증 절차
- state ownership tests를 먼저 작성하고 RED를 확인한다.
- V0에서 필요한 field만 최소 구현해 GREEN을 만든다.
- 전체 VERIFY와 output row identity/order를 확인한다.
../../docs/linear-static-3d-euler-beam/README.md의 Step 15 section에 실제 RED/GREEN/VERIFY command, exit code, 핵심 output과 변경 파일을 기록한다.- Step 15를
completed로 갱신하고 allocated fields/omitted fields를 summary에 기록한다.
금지사항
- velocity, acceleration, temperature, nonlinear iteration history를 할당하지 마라. 이유: V0 범위 밖이다.
- Domain 정의를 state에 복사하지 마라. 이유: model/state ownership을 분리해야 한다.
- HDF5 API를 state에 노출하지 마라. 이유: ResultsWriter adapter 책임이다.
- 직접 commit하지 마라. 이유: Harness executor가 담당한다.