Files
FESADev/tests/reference/eigen_reference_comparison.h

54 lines
1.4 KiB
C++

#ifndef FESA_TESTS_REFERENCE_EIGEN_REFERENCE_COMPARISON_H_
#define FESA_TESTS_REFERENCE_EIGEN_REFERENCE_COMPARISON_H_
#include <cstdint>
#include <filesystem>
#include <string>
#include <vector>
#include "fesa/core/status.h"
#include "mitc4_drilling_report.h"
#include "reference_tolerance_policy.h"
namespace fesa::test {
struct EigenReferenceCase {
std::string case_id;
std::filesystem::path input_path;
std::filesystem::path eigenvalues_text_path;
std::filesystem::path results_hdf5_path;
};
struct EigenReferenceRowDecision {
std::string source_step_name;
std::uint64_t mode_id;
std::string component;
double fesa_value;
double reference_value;
ReferenceToleranceRowDecision tolerance;
};
struct EigenReferenceComparisonReport {
std::string case_id;
std::string source_step_name;
std::uint64_t requested_mode_count;
std::vector<EigenReferenceRowDecision> rows;
std::vector<ReferenceToleranceFamilyDecision> families;
bool passed;
std::string policy_id;
double relative_rms_tolerance;
std::optional<Mitc4DrillingDiagnosticsReport> drilling_diagnostics;
};
/// @brief Compares modal eigenvalues without changing the approved input or
/// TXT.
class EigenReferenceComparison {
public:
static Result<EigenReferenceComparisonReport> Compare(
const EigenReferenceCase& reference_case);
};
} // namespace fesa::test
#endif // FESA_TESTS_REFERENCE_EIGEN_REFERENCE_COMPARISON_H_