#ifndef FESA_TESTS_REFERENCE_THERMAL_REFERENCE_COMPARISON_H_ #define FESA_TESTS_REFERENCE_THERMAL_REFERENCE_COMPARISON_H_ #include #include #include #include #include "fesa/core/status.h" #include "reference_tolerance_policy.h" namespace fesa::test { struct ThermalReferenceRow { std::string instance; std::uint64_t label; double value; }; struct ThermalReferenceSnapshot { std::string step; double time = 0; std::uint64_t increment = 0; int source_dof = 0; std::vector rows; std::string source_input_identity; }; struct ThermalReferenceRowDecision { std::string instance; std::uint64_t label; int source_dof; double actual; double reference; ReferenceToleranceRowDecision tolerance; }; struct ThermalReferenceReport { // Numerical family verdict, retained even when the original artifact is // classified as nonblocking diagnostic by the approved option A decision. bool passed = false; std::vector rows; ReferenceToleranceFamilyDecision family; }; /// Identity checks precede the unchanged common tolerance policy. Expected /// labels come from the actual input Domain, never CSV row order. Result CompareThermalSnapshots( const ThermalReferenceSnapshot& actual, const ThermalReferenceSnapshot& reference, const std::vector& expected_labels, const std::string& instance); Result ReadThermalReferenceCsv( const std::filesystem::path& path, const std::string& sole_instance); Result ReadThermalReferenceHdf5( const std::filesystem::path& path); Result CompareThermalReferenceFiles( const std::filesystem::path& input, const std::filesystem::path& csv, const std::filesystem::path& hdf5); } // namespace fesa::test #endif