103 lines
4.4 KiB
Markdown
103 lines
4.4 KiB
Markdown
# Step 10: Domain Model
|
|
|
|
## 담당 역할과 필수 스킬
|
|
|
|
- 담당 역할: `implementation-agent`
|
|
- 필수 스킬: `fesa-cpp-msvc-tdd`
|
|
- 모든 C++ build/test와 최종 VERIFY는 MSVC x64 Debug 기준으로 수행한다.
|
|
|
|
## 읽어야 할 파일
|
|
|
|
- `/AGENTS.md`
|
|
- `/docs/ARCHITECTURE.md`
|
|
- `/docs/ADR.md`
|
|
- `/docs/requirements/linear-static-3d-euler-beam.md`
|
|
- `/docs/io-definitions/linear-static-3d-euler-beam-io.md`
|
|
- `/docs/implementation-plans/linear-static-3d-euler-beam.md`
|
|
- `/include/fesa/core/source_identity.hpp`
|
|
- `/include/fesa/core/status.hpp`
|
|
- `/src/fesa/CMakeLists.txt`
|
|
- `/tests/CMakeLists.txt`
|
|
|
|
## 소유 파일
|
|
|
|
- Create: `/include/fesa/model/model_types.hpp`
|
|
- Create: `/include/fesa/model/domain.hpp`
|
|
- Create: `/src/fesa/model/domain.cpp`
|
|
- Create: `/tests/unit/model/model_types_test.cpp`
|
|
- Create: `/tests/unit/model/domain_test.cpp`
|
|
- Modify: `/src/fesa/CMakeLists.txt`
|
|
- Modify: `/tests/CMakeLists.txt`
|
|
|
|
## 작업
|
|
|
|
parser와 analysis가 공유할 immutable semantic model을 위 exact paths에 구현하라.
|
|
최소 model types는 다음을 포함한다.
|
|
|
|
```cpp
|
|
using EntityIndex = std::uint32_t;
|
|
struct Node { SourceEntityId sourceId; std::array<double, 3> coordinates; };
|
|
struct LinearElasticMaterial { std::string name; double youngsModulus; double poissonRatio; };
|
|
struct GeneralBeamSection {
|
|
std::string name; double area; double i11; double i12; double i22; double torsionalConstant;
|
|
std::array<double, 3> firstAxis; std::vector<std::array<double, 2>> sectionPoints;
|
|
};
|
|
struct EulerBeam3DDefinition {
|
|
SourceEntityId sourceId; std::array<EntityIndex, 2> nodeIndices;
|
|
EntityIndex materialIndex; EntityIndex sectionIndex;
|
|
};
|
|
struct BoundaryCondition { std::string target; int firstDof; int lastDof; double value; };
|
|
struct NodalLoad { std::string target; int dof; double magnitude; };
|
|
struct StaticStepDefinition { std::string name; std::vector<BoundaryCondition> boundaries;
|
|
std::vector<NodalLoad> loads; };
|
|
```
|
|
|
|
`PartDefinition`과 `InstanceDefinition`은 source name, referenced part, identity-instance
|
|
restriction과 source-to-internal mapping을 보존한다. `NodeSet`, `ElementSet`,
|
|
part/instance/source label mapping을 포함한다. `Domain`은 vectors와
|
|
stable lookup을 소유하고 construction 완료 후 const access만 제공한다. 필요한 builder는
|
|
construction 경계에만 두고 Domain을 복사하지 않아도 view를 만들 수 있는 stable index를
|
|
보장한다. Node/element에는 equation ID를 저장하지 않는다.
|
|
|
|
Tests는 source identity equality/order, same-part multiple-instance distinction, stable
|
|
insertion order/index, deep ownership, const access, one static step storage, equation-ID 부재를
|
|
검증하고 `DomainModel` regex로 등록한다.
|
|
|
|
## Acceptance Criteria
|
|
|
|
RED targeted command 후 최소 구현으로 GREEN을 만든다.
|
|
|
|
```powershell
|
|
cmake --build .harness/build --config Debug --target fesa_tests
|
|
ctest --test-dir .harness/build -C Debug -R DomainModel --output-on-failure
|
|
```
|
|
|
|
```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 DomainModel --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. Domain tests를 먼저 추가하고 compile/test RED를 확인한다.
|
|
2. 최소 semantic types와 immutable Domain ownership으로 GREEN을 만든다.
|
|
3. full VERIFY와 public dependency direction을 확인한다.
|
|
4. `/docs/implementation-plans/linear-static-3d-euler-beam-implementation-report.md`의
|
|
Step 10 section에 실제 RED/GREEN/VERIFY command, exit code,
|
|
핵심 output과 변경 파일을 기록한다.
|
|
5. Step 10을 `completed`로 갱신하고 model types/stable identity를 summary에 기록한다.
|
|
|
|
## 금지사항
|
|
|
|
- Abaqus keyword string을 Domain의 핵심 의미로 저장하지 마라. 이유: syntax/model 경계를 깨뜨린다.
|
|
- Domain에 equation numbering이나 mutable analysis vector를 넣지 마라. 이유: DofManager/AnalysisState 책임이다.
|
|
- parser를 이 step에서 구현하지 마라. 이유: Step 11–12 범위다.
|
|
- 직접 commit하지 마라. 이유: Harness executor가 담당한다.
|