57 lines
1.9 KiB
Markdown
57 lines
1.9 KiB
Markdown
# Step 1: Minimal HDF5 Schema
|
|
|
|
## 읽어야 할 파일
|
|
|
|
- `/AGENTS.md`
|
|
- `/docs/PRD.md`
|
|
- `/docs/ARCHITECTURE.md`
|
|
- `/docs/ADR.md`
|
|
- `/include/fesa/results/result_database.hpp`
|
|
- `/include/fesa/model/domain.hpp`
|
|
- `/cmake/FesaDependencies.cmake`
|
|
|
|
## 작업
|
|
|
|
먼저 `docs/HDF5_SCHEMA.md`에 schema `1.0.0`의 최소 group/dataset/attribute 계약을
|
|
작성하고 HDF5 writer/reader round trip을 구현한다.
|
|
|
|
```cpp
|
|
struct Hdf5ReadResult final {
|
|
std::optional<ResultDatabase> database;
|
|
std::vector<Diagnostic> diagnostics;
|
|
};
|
|
[[nodiscard]] std::vector<Diagnostic> write_hdf5(
|
|
const std::filesystem::path&,
|
|
const Domain&,
|
|
const ResultDatabase&);
|
|
[[nodiscard]] Hdf5ReadResult read_hdf5_results(
|
|
const std::filesystem::path&);
|
|
```
|
|
|
|
- schema/version, node origin `(part,instance,local label)`, dense ID map, 좌표,
|
|
connectivity, shear property source, nodal displacement/reaction을 round trip한다.
|
|
- 먼저 public reader로 모든 값을 재확인하는 실패 테스트를 작성한다.
|
|
- 모든 `hid_t`는 move-only RAII wrapper로 관리한다.
|
|
|
|
## Acceptance Criteria
|
|
|
|
```powershell
|
|
cmake --build --preset windows-debug
|
|
ctest --preset windows-debug -R "Hdf5|ResultRoundTrip" --output-on-failure
|
|
h5ls -r .\out\build\windows-debug\Testing\Temporary\fesa-round-trip.h5
|
|
ctest --preset windows-debug --output-on-failure
|
|
```
|
|
|
|
## 검증 절차
|
|
|
|
1. schema 문서를 writer보다 먼저 작성한다.
|
|
2. round-trip test 실패를 확인한 뒤 최소 adapter를 구현한다.
|
|
3. HDF5 도구와 public reader 결과를 모두 확인한다.
|
|
4. 전체 테스트와 index를 갱신한다.
|
|
|
|
## 금지사항
|
|
|
|
- global HDF5 handle을 만들지 마라. 이유: 수명과 오류 경계를 훼손한다.
|
|
- reference CSV 기능을 추가하지 마라. 이유: validation phase 책임이다.
|
|
- schema에 빈 미래 분석 결과를 넣지 마라. 이유: 현재 계약만 저장한다.
|