feat(cpp-object-oriented-modular-refactoring): step 5 - solver-workflow-google-style

This commit is contained in:
KOKO\Mimi
2026-08-16 06:20:08 +09:00
parent e1c0e357dd
commit 24f006fe4a
52 changed files with 5817 additions and 6369 deletions
+43
View File
@@ -0,0 +1,43 @@
#ifndef FESA_RESULTS_RESULT_RECOVERY_H_
#define FESA_RESULTS_RESULT_RECOVERY_H_
#include <array>
#include <vector>
#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<double, 4> 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<std::vector<NodeStationResultRow>>
NormalizeSectionResultantsToNodeStations(
const AnalysisModel& model,
const std::vector<EndpointResultRow>& endpoint_rows,
const std::array<double, 4>& component_tolerances);
};
} // namespace fesa
#endif // FESA_RESULTS_RESULT_RECOVERY_H_