Files
FESADev/include/fesa/results/prepared_results_writer.h

40 lines
1.5 KiB
C++

#ifndef FESA_RESULTS_PREPARED_RESULTS_WRITER_H_
#define FESA_RESULTS_PREPARED_RESULTS_WRITER_H_
#include <filesystem>
#include <vector>
#include "fesa/analysis/prepared_analysis_outcome.h"
#include "fesa/core/diagnostic.h"
#include "fesa/core/status.h"
namespace fesa {
class Domain;
class ResultsWriter;
class NonlinearResultsWriter;
class EigenResultsWriter;
class DynamicResultsWriter;
class ThermalResultsWriter;
class SolidResultsWriter;
/// @brief Routes one completed typed outcome to its authoritative writer.
/// @pre Domain, outcome, diagnostics, and adapters remain alive for this call.
/// The caller has closed its analysis log successfully before publication.
/// @param results_path Explicit output path, retaining each writer's contract.
/// @note Optional adapters are required only for their matching outcome family.
/// @return The selected writer's Status after candidate validation/finalization,
/// or the existing missing-adapter output failure without invoking a writer.
Status WritePreparedAnalysisResult(
const std::filesystem::path& results_path, const Domain& domain,
const PreparedAnalysisOutcome& outcome,
const std::vector<Diagnostic>& diagnostics, ResultsWriter& linear_writer,
NonlinearResultsWriter& nonlinear_writer, EigenResultsWriter& eigen_writer,
DynamicResultsWriter* dynamic_writer = nullptr,
ThermalResultsWriter* thermal_writer = nullptr,
SolidResultsWriter* solid_writer = nullptr);
} // namespace fesa
#endif // FESA_RESULTS_PREPARED_RESULTS_WRITER_H_