Add MITC4 drilling diagnostics output and comparison contract

This commit is contained in:
KOKO\Mimi
2026-10-20 09:45:58 +09:00
parent 3d5c296651
commit a73d3fc9ca
31 changed files with 1175 additions and 45 deletions
+42
View File
@@ -0,0 +1,42 @@
#ifndef FESA_IO_HDF5_MITC4_FILE_HOOKS_H_
#define FESA_IO_HDF5_MITC4_FILE_HOOKS_H_
#include <hdf5.h>
#include <filesystem>
#include <functional>
#include <vector>
#include "fesa/core/status.h"
namespace fesa {
class Domain;
class AnalysisState;
class NonlinearAnalysisState;
class DynamicAnalysisState;
struct EigenAnalysisState;
struct Diagnostic;
namespace hdf5_internal {
// Private lifecycle fault seams. Production uses real closers and no callback.
// Injected closers must release the handle even when reporting failure.
struct Mitc4FileHooks {
herr_t (*candidate_close)(hid_t) = H5Fclose;
herr_t (*reader_close)(hid_t) = H5Fclose;
std::function<void(const std::filesystem::path&)> before_self_check;
};
Status WriteStaticFile(const std::filesystem::path&, const Domain&,
const AnalysisState&, const std::vector<Diagnostic>&, const Mitc4FileHooks& = {});
Status WriteNonlinearFile(const std::filesystem::path&, const Domain&,
const NonlinearAnalysisState&, const std::vector<Diagnostic>&, const Mitc4FileHooks& = {});
Status WriteDynamicFile(const std::filesystem::path&, const Domain&,
const DynamicAnalysisState&, const std::vector<Diagnostic>&, const Mitc4FileHooks& = {});
Status WriteEigenFile(const std::filesystem::path&, const Domain&,
const EigenAnalysisState&, const std::vector<Diagnostic>&, const Mitc4FileHooks& = {});
} // namespace hdf5_internal
} // namespace fesa
#endif // FESA_IO_HDF5_MITC4_FILE_HOOKS_H_