118 lines
5.3 KiB
Markdown
118 lines
5.3 KiB
Markdown
# Step 12: INP to Domain Mapping
|
||
|
||
## 담당 역할과 필수 스킬
|
||
|
||
- 담당 역할: `implementation-agent`
|
||
- 필수 스킬: `fesa-cpp-msvc-tdd`
|
||
- 모든 C++ build/test와 최종 VERIFY는 MSVC x64 Debug 기준으로 수행한다.
|
||
|
||
## 읽어야 할 파일
|
||
|
||
- `/AGENTS.md`
|
||
- `/docs/ARCHITECTURE.md`
|
||
- `/docs/ADR.md`
|
||
- `/docs/linear-static-3d-euler-beam/requirements.md`
|
||
- `/docs/linear-static-3d-euler-beam/formulation.md`
|
||
- `/docs/linear-static-3d-euler-beam/io.md`
|
||
- `/docs/linear-static-3d-euler-beam/implementation-plan.md`
|
||
- `/include/fesa/model/model_types.hpp`
|
||
- `/include/fesa/model/domain.hpp`
|
||
- `/src/fesa/model/domain.cpp`
|
||
- `/tests/unit/model/domain_test.cpp`
|
||
- `/include/fesa/io/abaqus/input_syntax.hpp`
|
||
- `/include/fesa/io/abaqus/input_reader.hpp`
|
||
- `/src/fesa/io/abaqus/input_reader.cpp`
|
||
- `/tests/unit/io/abaqus/input_reader_test.cpp`
|
||
- `/reference/cantilever beam/cantilever beam.inp`
|
||
|
||
## 소유 파일
|
||
|
||
- Create: `/include/fesa/io/abaqus/domain_mapper.hpp`
|
||
- Create: `/src/fesa/io/abaqus/domain_mapper.cpp`
|
||
- Create: `/tests/unit/io/abaqus/domain_mapper_test.cpp`
|
||
- Modify: `/src/fesa/CMakeLists.txt`
|
||
- Modify: `/tests/CMakeLists.txt`
|
||
|
||
## 작업
|
||
|
||
ParsedInput을 검증된 immutable Domain으로 바꾸는 semantic mapper를 구현하라.
|
||
|
||
```cpp
|
||
class AbaqusDomainMapper {
|
||
public:
|
||
Result<Domain> map(const ParsedInput& input) const;
|
||
};
|
||
```
|
||
|
||
지원 범위는 승인 I/O contract와 정확히 같아야 한다.
|
||
|
||
- `*HEADING`, `*PART`/`*END PART`, `*NODE`, `*ELEMENT, TYPE=B33`,
|
||
`*NSET`/`*ELSET` 및 `GENERATE`, `*MATERIAL`/`*ELASTIC`,
|
||
`*BEAM GENERAL SECTION, SECTION=GENERAL`, `*SECTION POINTS`,
|
||
`*ASSEMBLY`/`*END ASSEMBLY`, `*INSTANCE`/`*END INSTANCE`,
|
||
`*BOUNDARY`, `*CLOAD`, `*STEP`/`*STATIC`/`*END STEP`를 mapping한다.
|
||
- 같은 part의 여러 identity instance를 deterministic stable internal IDs로 expand하고
|
||
`SourceEntityId {instance_name, source_label}`를 보존한다.
|
||
- assembly set의 `INSTANCE` parameter와 node/set target을 해석한다.
|
||
- `A,I11,I12,I22,J`, `E,nu`, `G=E/(2*(1+nu))`, `Iy=I11`, `Iz=I22`,
|
||
`n1 -> local y`를 mapping한다. `E>0`, `-1<nu<0.5`, 계산한 `G>0`과 section
|
||
properties의 positivity를 검증한다.
|
||
- `*STEP`의 `NLGEOM`은 absent/`NO`만 accept하고 `YES`는 model diagnostic으로 거부한다.
|
||
`*STATIC`의 1개 또는 2–4개 time-control data field를 finite positive 값으로 읽되 V0는
|
||
하나의 final frame 0만 만든다. Step 앞의 model-level `*BOUNDARY`는 sole static step에
|
||
활성화하고 step 안 `*CLOAD`와 함께 `StaticStepDefinition`에 연결한다.
|
||
- B31은 `unsupported-element-formulation`, instance translation/rotation data는
|
||
`unsupported-instance-transform` diagnostic으로 거부한다. Second step, nested assembly,
|
||
`I12!=0`, invalid DOF, duplicate label, dangling target/reference, nonpositive properties,
|
||
invalid geometry에도 설계/I/O contract가 정한 structured diagnostic code를 반환한다.
|
||
- `*PREPRINT`, `*RESTART`, `*TRANSVERSE SHEAR STIFFNESS`, `*OUTPUT, FIELD`,
|
||
`*OUTPUT, HISTORY`, `*NODE OUTPUT`, `*ELEMENT OUTPUT`, `*CONTACT OUTPUT`와 그
|
||
output-variable data는 warning으로 보존하고 무시한다. 이 allowlist 밖 unknown keyword는
|
||
error다. FESA default outputs를 output request로 필터링하지 않는다.
|
||
|
||
Tests는 모든 supported keyword의 positive path, mixed case, Generate, multiple identity
|
||
instances, allowlist warning, unknown keyword, B31 rejection, transform/nested/multi-step,
|
||
duplicate/dangling/invalid numeric와 approved legacy input mapping을 포함하고
|
||
`InpDomainMapping` regex로 등록한다.
|
||
|
||
## Acceptance Criteria
|
||
|
||
RED targeted command:
|
||
|
||
```powershell
|
||
cmake --build .harness/build --config Debug --target fesa_tests
|
||
ctest --test-dir .harness/build -C Debug -R InpDomainMapping --output-on-failure
|
||
```
|
||
|
||
GREEN/VERIFY:
|
||
|
||
```powershell
|
||
cmake -S . -B .harness/build -A x64 `
|
||
-DFESA_GTEST_SOURCE_DIR=C:/git/googletest `
|
||
"-DMKL_DIR=C:/Program Files (x86)/Intel/oneAPI/mkl/2026.1/lib/cmake/mkl" `
|
||
"-DTBB_DIR=C:/Program Files (x86)/Intel/oneAPI/tbb/2023.1/lib/cmake/tbb" `
|
||
"-DHDF5_DIR=C:/Program Files/HDF_Group/HDF5/2.1.1/cmake"
|
||
cmake --build .harness/build --config Debug
|
||
ctest --test-dir .harness/build -C Debug -R InpDomainMapping --output-on-failure
|
||
ctest --test-dir .harness/build -C Debug --show-only=json-v1
|
||
ctest --test-dir .harness/build -C Debug --output-on-failure
|
||
```
|
||
|
||
## 검증 절차
|
||
|
||
1. semantic positive/negative tests를 production mapper보다 먼저 작성하고 RED를 확인한다.
|
||
2. 승인 subset에 필요한 최소 mapping/validation만 구현해 GREEN을 만든다.
|
||
3. diagnostic field/order와 Domain non-mutation을 점검하고 전체 VERIFY를 수행한다.
|
||
4. `/docs/linear-static-3d-euler-beam/implementation-report.md`의
|
||
Step 12 section에 실제 RED/GREEN/VERIFY command, exit code,
|
||
핵심 output과 변경 파일을 기록한다.
|
||
5. Step 12를 `completed`로 갱신하고 supported mapping/negative diagnostics를 summary에 기록한다.
|
||
|
||
## 금지사항
|
||
|
||
- B31을 Euler element로 alias하지 마라. 이유: 물리 formulation 의미가 다르다.
|
||
- transform을 무시하거나 fallback local axis를 선택하지 마라. 이유: 입력 의미를 왜곡한다.
|
||
- `*DLOAD` 또는 multiple-step propagation을 구현하지 마라. 이유: 승인 범위 밖이다.
|
||
- reference input/CSV를 수정하지 마라. 이유: read-only baseline이다.
|
||
- 직접 commit하지 마라. 이유: Harness executor가 담당한다.
|