Add MITC4 drilling diagnostics output and comparison contract
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#ifndef FESA_TESTS_REFERENCE_MITC4_DRILLING_READER_H_
|
||||
#define FESA_TESTS_REFERENCE_MITC4_DRILLING_READER_H_
|
||||
|
||||
#include "mitc4_drilling_report.h"
|
||||
#include "io/hdf5/mitc4_drilling_diagnostics.h"
|
||||
|
||||
namespace fesa::test {
|
||||
|
||||
inline std::optional<Mitc4DrillingDiagnosticsReport> ReadMitc4DrillingReport(hid_t file) {
|
||||
const auto stored = hdf5_internal::ReadDrillingDiagnostics(file);
|
||||
if (!stored) return std::nullopt;
|
||||
Mitc4DrillingDiagnosticsReport result{stored->formulation, stored->version, {}};
|
||||
for (const auto& frame : stored->frames)
|
||||
result.frames.push_back({frame.storage_step, frame.frame_index, frame.raw_equilibrium,
|
||||
frame.drilling_moment, frame.equilibrium_with_drilling});
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace fesa::test
|
||||
|
||||
#endif // FESA_TESTS_REFERENCE_MITC4_DRILLING_READER_H_
|
||||
Reference in New Issue
Block a user