Serialize Exit Status

While here, also add missing serialization tests for WGNames and
CompletedCells.
This commit is contained in:
Bård Skaflestad
2022-08-25 11:22:59 +02:00
parent 7ee1fd9ed1
commit 9658257960
2 changed files with 10 additions and 0 deletions

View File

@@ -324,6 +324,7 @@ namespace Opm
this->m_static.serializeOp(serializer);
this->m_sched_deck.serializeOp(serializer);
this->action_wgnames.serializeOp(serializer);
serializer(this->exit_status);
serializer.vector(this->snapshots);
this->restart_output.serializeOp(serializer);
this->completed_cells.serializeOp(serializer);
@@ -531,6 +532,11 @@ namespace Opm
};
// Please update the member functions
// - operator==(const Schedule&) const
// - serializeObject()
// - serializeOp(Serializer&)
// when you update/change this list of data members.
ScheduleStatic m_static;
ScheduleDeck m_sched_deck;
Action::WGNames action_wgnames;

View File

@@ -283,8 +283,11 @@ Schedule::Schedule(const Deck& deck, const EclipseState& es, const std::optional
result.m_static = ScheduleStatic::serializeObject();
result.m_sched_deck = ScheduleDeck::serializeObject();
result.action_wgnames = Action::WGNames::serializeObject();
result.exit_status = EXIT_FAILURE;
result.snapshots = { ScheduleState::serializeObject() };
result.restart_output = WriteRestartFileEvents::serializeObject();
result.completed_cells = CompletedCells::serializeObject();
return result;
}
@@ -1532,6 +1535,7 @@ File {} line {}.)", pattern, location.keyword, location.filename, location.linen
return this->m_static == data.m_static &&
this->m_sched_deck == data.m_sched_deck &&
this->action_wgnames == data.action_wgnames &&
this->exit_status == data.exit_status &&
this->snapshots == data.snapshots &&
this->restart_output == data.restart_output &&
this->completed_cells == data.completed_cells;