feat(results-and-pipeline): step 1 — minimal-hdf5-schema

This commit is contained in:
KOKO\Mimi
2026-08-01 00:51:34 +09:00
parent f8af2c1485
commit 76a0c8ecde
6 changed files with 2343 additions and 1 deletions
+60
View File
@@ -0,0 +1,60 @@
#pragma once
#include <array>
#include <cstdint>
#include <filesystem>
#include <optional>
#include <vector>
#include <fesa/core/diagnostic.hpp>
#include <fesa/core/vec3.hpp>
#include <fesa/model/beam_section.hpp>
#include <fesa/model/domain.hpp>
#include <fesa/model/entity_origin.hpp>
#include <fesa/model/ids.hpp>
#include <fesa/results/result_database.hpp>
namespace fesa {
struct Hdf5NodeSnapshot final {
std::uint64_t dense_index;
NodeId id;
EntityOrigin origin;
Vec3 coordinates;
};
struct Hdf5ElementSnapshot final {
std::uint64_t dense_index;
ElementId id;
std::array<std::uint64_t, 2> connectivity;
SectionId section;
};
struct Hdf5SectionSnapshot final {
SectionId id;
double shear_area_y;
double shear_area_z;
ShearPropertySource shear_source;
};
struct Hdf5ModelSnapshot final {
std::vector<Hdf5NodeSnapshot> nodes;
std::vector<Hdf5ElementSnapshot> elements;
std::vector<Hdf5SectionSnapshot> sections;
};
struct Hdf5ReadResult final {
std::optional<ResultDatabase> database;
std::vector<Diagnostic> diagnostics;
std::optional<Hdf5ModelSnapshot> model;
};
[[nodiscard]] std::vector<Diagnostic> write_hdf5(
const std::filesystem::path& path,
const Domain& domain,
const ResultDatabase& database);
[[nodiscard]] Hdf5ReadResult read_hdf5_results(
const std::filesystem::path& path);
} // namespace fesa