#ifndef FESA_RESULTS_RESULT_RECOVERY_H_ #define FESA_RESULTS_RESULT_RECOVERY_H_ #include #include #include "fesa/analysis/analysis_model.h" #include "fesa/analysis/analysis_state.h" #include "fesa/core/status.h" #include "fesa/fem/dof_manager.h" #include "fesa/math/sparse_matrix.h" namespace fesa { /// @brief Stores one normalized positive-local-x node-station row. struct NodeStationResultRow { SourceEntityId node; EntityIndex representative_element; std::array section_resultant; }; /// @brief Recovers full equilibrium and active concrete element rows. class ResultRecovery { public: /// @brief Builds and atomically commits a complete recovery candidate. /// @return Success after full residual K*d-F and all result rows validate. static Status Recover(const AnalysisModel& model, const DofManager& dofs, const SparseMatrix& full_stiffness, AnalysisState& state); /// @brief Normalizes eligible endpoint rows to source node stations. /// @param component_tolerances Per-component interior-station tolerances. /// @return Stable source-node rows or a structured identity/value failure. static Result> NormalizeSectionResultantsToNodeStations( const AnalysisModel& model, const std::vector& endpoint_rows, const std::array& component_tolerances); }; } // namespace fesa #endif // FESA_RESULTS_RESULT_RECOVERY_H_