Connect HHT field convergence to production acceptance and v2 logs
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "fesa/analysis/nonlinear_static_control.h"
|
||||
@@ -52,6 +53,17 @@ struct NewtonIterationLogRecord {
|
||||
bool combined_passed;
|
||||
};
|
||||
|
||||
/// @brief Vendor-neutral field evidence in full global u/total-phi coordinates.
|
||||
/// @note Missing quantities serialize as literal not-evaluated. Force uses
|
||||
/// force/length units; generalized moment uses moment/rad units.
|
||||
struct DynamicFieldLogEvidence {
|
||||
std::optional<double> residual_numerator, residual_scale, spatial_flux;
|
||||
std::optional<double> time_average_flux, correction_numerator, increment_norm;
|
||||
std::optional<double> estimated_correction, residual_threshold, correction_threshold;
|
||||
std::string branch = "not-evaluated";
|
||||
std::optional<bool> residual_pass, correction_pass, field_pass;
|
||||
};
|
||||
|
||||
/// @brief Carries two-channel HHT endpoint convergence evidence.
|
||||
/// @note Array entries are translation and rotation channels, respectively.
|
||||
/// Corrections are dimensionless N2 metrics; rate corrections already include
|
||||
@@ -71,6 +83,14 @@ struct DynamicNewtonIterationLogRecord {
|
||||
std::array<double, 2U> algorithmic_correction{};
|
||||
bool residual_pass = false;
|
||||
bool correction_pass = false;
|
||||
// Absent policy preserves the historical v1 direct-writer/frame-zero contract.
|
||||
std::string policy_id;
|
||||
std::string step_name;
|
||||
std::array<DynamicFieldLogEvidence, 2U> fields;
|
||||
std::optional<bool> field_pass;
|
||||
bool accepted = false;
|
||||
bool strict_residual_evaluated = false;
|
||||
bool strict_correction_evaluated = false;
|
||||
};
|
||||
|
||||
/// @brief Writes deterministic, line-oriented Newton iteration diagnostics.
|
||||
@@ -90,7 +110,7 @@ class NewtonIterationLogWriter {
|
||||
/// failure with code `log-output-failure`.
|
||||
Status Write(const NewtonIterationLogRecord& record);
|
||||
|
||||
/// @brief Writes one complete HHT record using schema `hht-log-v1`.
|
||||
/// @brief Writes HHT v1 evidence, or v2 when the field policy is identified.
|
||||
/// @return Success after the complete line is written; invalid numeric
|
||||
/// evidence or stream failure permanently fails this writer instance.
|
||||
Status Write(const DynamicNewtonIterationLogRecord& record);
|
||||
|
||||
Reference in New Issue
Block a user