# Step 1: nonlinear-static-domain-contract ## 읽어야 할 파일 - `AGENTS.md` - `docs/ARCHITECTURE.md` - `docs/ADR.md` - `docs/nonlinear-static-newton-raphson/requirements.md` - `docs/nonlinear-static-newton-raphson/io.md` - `docs/nonlinear-static-newton-raphson/reference-model.md` - `docs/nonlinear-static-newton-raphson/implementation-plan.md` - `include/fesa/model/model_types.h` - `include/fesa/model/domain.h` - `src/fesa/model/domain.cpp` - `src/fesa/io/abaqus/step_definition_mapper.cpp` - `src/fesa/io/abaqus/domain_mapping_context.h` - `src/fesa/io/abaqus/domain_mapping_context.cpp` - `tests/unit/model/model_types_test.cpp` - `tests/unit/model/domain_test.cpp` - `tests/unit/io/abaqus/domain_mapper_test.cpp` - `tests/unit/io/abaqus/domain_mapping_components_test.cpp` - Step 0 files: `include/fesa/app/output_paths.h`, `include/fesa/analysis/analysis.h`, `src/fesa/app/fesa_application.cpp` ## 이전 Step 전제 Step 0이 app-level path/log request fields를 만들었고 기존 linear invocation이 `_results.h5`를 사용한다. ## 소유 파일 - Modify: `include/fesa/model/model_types.h` - Modify: `include/fesa/model/domain.h` - Modify: `src/fesa/model/domain.cpp` - Modify: `src/fesa/io/abaqus/step_definition_mapper.cpp` - Modify: `src/fesa/io/abaqus/domain_mapping_context.h` - Modify: `src/fesa/io/abaqus/domain_mapping_context.cpp` - Test: `tests/unit/model/model_types_test.cpp` - Test: `tests/unit/model/domain_test.cpp` - Test: `tests/unit/io/abaqus/domain_mapper_test.cpp` - Test: `tests/unit/io/abaqus/domain_mapping_components_test.cpp` ## 인터페이스 ```cpp namespace fesa { enum class StaticProcedureKind { kLinearSmallDisplacement, kNonlinearFullNewton }; struct StaticStepDefinition { std::string name; std::vector boundaries; std::vector loads; StaticProcedureKind procedure_kind; bool nlgeom; double initial_increment; double time_period; double minimum_increment; double maximum_increment; SourceLocation location; }; class StepDefinition { public: StaticProcedureKind ProcedureKind() const noexcept; bool IsNonlinearStatic() const noexcept; double InitialIncrement() const noexcept; double TimePeriod() const noexcept; double MinimumIncrement() const noexcept; double MaximumIncrement() const noexcept; }; } // namespace fesa ``` Domain stores procedure identity and raw four `*STATIC` values only. Factor sequence is derived in Step 5. PRESELECT output requests are warning no-ops and do not create Domain, Analysis, or HDF5 state. ## RED Add tests first. - `NSNR-IO-001`: `*STEP, NLGEOM=YES` maps to `StaticProcedureKind::kNonlinearFullNewton`. - `NSNR-IO-002`: `*STEP, NLGEOM=NO` maps to `kLinearSmallDisplacement` and existing shell linear tests keep passing. - `NSNR-IO-003`: missing `NLGEOM` keeps current linear behavior. - `NSNR-IO-004`: nonlinear `*STATIC` requires four finite positive values and time period exactly `1.0`. - `NSNR-IO-005`: raw values are preserved in `StepDefinition` without derived factor list. - `NSNR-IO-006`: unsupported nonlinear procedure or mixed linear/nonlinear steps fail closed with `unsupported-analysis-procedure`. - `NSNR-IO-007`: S4 and S4R shell definitions remain approved nonlinear semantic inputs. - `NSNR-IO-008`: mixed B33/S4 nonlinear model fails with `unsupported-mixed-element-model`. - `NSNR-IO-009`: `*OUTPUT, FIELD, VARIABLE=PRESELECT` is accepted with deterministic warning and no Domain state. - `NSNR-IO-010`: `*OUTPUT, HISTORY, VARIABLE=PRESELECT` is accepted with deterministic warning and no Domain state. - `NSNR-IO-011`: malformed PRESELECT parameters fail as input errors. Run: ```powershell cmake --build .harness/build --config Debug ctest --test-dir .harness/build -C Debug -R "Domain|DomainMapping|Abaqus" --output-on-failure ``` Expected: new tests fail. Unexpected pass stops the Step. ## GREEN - Extend `StaticStepDefinition` and `StepDefinition` exactly with the fields and accessors above. - Update domain construction so source-order boundaries and loads remain deterministic. - Update `domain_mapping_context` to parse `NLGEOM=YES`, preserve raw `*STATIC`, emit PRESELECT warnings, and keep PRESELECT out of Domain state. - Preserve existing linear shell and beam mappings. ## VERIFY ```powershell cmake --fresh -S . -B .harness/build -G "Visual Studio 18 2026" -A x64 ` "-DFESA_GTEST_SOURCE_DIR=$gtestSource" ` "-DMKL_DIR=$mklDir" ` "-DTBB_DIR=$tbbDir" ` "-DHDF5_DIR=$hdf5Dir" cmake --build .harness/build --config Debug ctest --test-dir .harness/build -C Debug -R "Domain|DomainMapping|Abaqus" --output-on-failure ctest --test-dir .harness/build -C Debug --show-only=json-v1 ctest --test-dir .harness/build -C Debug --output-on-failure ``` Recheck `.harness/config.json` before using these defaults. ## 상태 기록 Only Step 1 status and one-line summary/error/blocked payload may be updated by the Implementation Agent. Executor owns timestamps, commits, retry, and next Step selection. ## 금지사항 - Do not add `LoadFactorSequence()` to Domain. 이유: factor sequence ownership belongs to Step 5 control. - Do not store PRESELECT flags in Domain or HDF5 state. 이유: approved I/O contract makes PRESELECT an ignored warning no-op. - Do not alter requirements or I/O docs. 이유: upstream contracts are approved.