feat(thermal): execute certified backward Euler histories

This commit is contained in:
KOKO\Mimi
2026-09-29 21:35:21 +09:00
parent 983e2febda
commit ef8ec4732a
6 changed files with 1248 additions and 0 deletions
@@ -0,0 +1,39 @@
#ifndef FESA_ANALYSIS_TRANSIENT_HEAT_PROCEDURE_H_
#define FESA_ANALYSIS_TRANSIENT_HEAT_PROCEDURE_H_
#include <vector>
#include "fesa/analysis/thermal_analysis_state.h"
#include "fesa/core/status.h"
namespace fesa {
class LinearSolver;
class ParallelFor;
/// @brief Owns complete thermal history before any result output is opened.
struct ThermalExecutionResult {
ThermalAnalysisState state;
std::vector<Diagnostic> diagnostics;
};
/// @brief Executes fixed-increment backward Euler with checked thermal
/// recovery.
class TransientHeatProcedureExecutor final {
public:
/// @brief Retains caller-owned adapters, which must outlive Execute calls.
TransientHeatProcedureExecutor(const ParallelFor& parallel_for,
LinearSolver& linear_solver);
/// @brief Returns a complete independently owned state or a structured
/// failure.
/// @note Uses raw initial values; prescribed temperatures start at increment
/// one. No output files are opened. A failed trial is never committed to
/// history.
Result<ThermalExecutionResult> Execute(const Domain& domain) const;
private:
const ParallelFor& parallel_for_;
LinearSolver& linear_solver_;
};
} // namespace fesa
#endif // FESA_ANALYSIS_TRANSIENT_HEAT_PROCEDURE_H_