feat(result-contract-completion): step 2 — self-contained-hdf5

This commit is contained in:
KOKO\Mimi
2026-08-02 01:51:24 +09:00
parent 9d37465d92
commit 4d04f3dbbe
9 changed files with 1942 additions and 242 deletions
+34
View File
@@ -4,6 +4,7 @@
#include <cstdint>
#include <filesystem>
#include <optional>
#include <string>
#include <vector>
#include <fesa/core/diagnostic.hpp>
@@ -26,27 +27,60 @@ struct Hdf5NodeSnapshot final {
struct Hdf5ElementSnapshot final {
std::uint64_t dense_index;
ElementId id;
EntityOrigin origin;
std::array<std::uint64_t, 2> connectivity;
MaterialId material;
SectionId section;
};
struct Hdf5SectionSnapshot final {
SectionId id;
std::string name;
double area;
double iy;
double iz;
double torsion_j;
double shear_area_y;
double shear_area_z;
ShearPropertySource shear_source;
Vec3 orientation;
std::vector<std::array<double, 2>> recovery_points;
};
struct Hdf5ModelSnapshot final {
std::vector<Hdf5NodeSnapshot> nodes;
std::vector<Hdf5ElementSnapshot> elements;
std::vector<IsotropicElastic> materials;
std::vector<Hdf5SectionSnapshot> sections;
std::vector<NodeSet> node_sets;
std::vector<ElementSet> element_sets;
};
struct Hdf5MetadataSnapshot final {
std::string schema_version;
std::string fesa_version;
std::string unit_policy;
};
struct Hdf5SolverSettingsSnapshot final {
std::string backend;
std::string matrix_storage;
std::string matrix_type;
std::string constraint_method;
std::string assembly;
};
struct Hdf5AnalysisSnapshot final {
StepDefinition step;
Hdf5SolverSettingsSnapshot solver;
};
struct Hdf5ReadResult final {
std::optional<ResultDatabase> database;
std::vector<Diagnostic> diagnostics;
std::optional<Hdf5ModelSnapshot> model;
std::optional<Hdf5MetadataSnapshot> metadata;
std::optional<Hdf5AnalysisSnapshot> analysis;
};
[[nodiscard]] std::vector<Diagnostic> write_hdf5(