feat(nonlinear-static-newton-raphson): step 9 - nonlinear-hdf5-schema-v1-writer
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#ifndef FESA_IO_HDF5_NONLINEAR_HDF5_RESULTS_WRITER_H_
|
||||
#define FESA_IO_HDF5_NONLINEAR_HDF5_RESULTS_WRITER_H_
|
||||
|
||||
#include "fesa/results/nonlinear_results_writer.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Writes authoritative schema-v1 nonlinear HDF5 results atomically.
|
||||
/// @note HDF5 and platform types remain private to the implementation.
|
||||
class NonlinearHdf5ResultsWriter final : public NonlinearResultsWriter {
|
||||
public:
|
||||
/// @brief Writes and self-checks committed nonlinear frames before publish.
|
||||
/// @return Success only after atomic replacement or structured output failure.
|
||||
/// @note Factor-zero state remains metadata and is not an accepted frame.
|
||||
Status Write(const std::filesystem::path& output_path,
|
||||
const Domain& domain, const NonlinearAnalysisState& state,
|
||||
const std::vector<Diagnostic>& diagnostics) override;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_IO_HDF5_NONLINEAR_HDF5_RESULTS_WRITER_H_
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef FESA_RESULTS_NONLINEAR_RESULTS_WRITER_H_
|
||||
#define FESA_RESULTS_NONLINEAR_RESULTS_WRITER_H_
|
||||
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/nonlinear_analysis_state.h"
|
||||
#include "fesa/core/diagnostic.h"
|
||||
#include "fesa/core/status.h"
|
||||
#include "fesa/model/domain.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Isolates nonlinear authoritative result storage from solver code.
|
||||
class NonlinearResultsWriter {
|
||||
public:
|
||||
virtual ~NonlinearResultsWriter() = default;
|
||||
|
||||
/// @brief Writes complete accepted nonlinear frames.
|
||||
/// @param output_path Final authoritative path in the model input directory.
|
||||
/// @param domain Immutable source and semantic model identity.
|
||||
/// @param state Committed state containing every accepted increment frame.
|
||||
/// @param diagnostics Deterministically ordered run diagnostics.
|
||||
/// @return Success only after backend-specific finalization completes.
|
||||
virtual Status Write(const std::filesystem::path& output_path,
|
||||
const Domain& domain,
|
||||
const NonlinearAnalysisState& state,
|
||||
const std::vector<Diagnostic>& diagnostics) = 0;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_RESULTS_NONLINEAR_RESULTS_WRITER_H_
|
||||
Reference in New Issue
Block a user