changed: introduce EclGenericVanguard::SimulationModelParams

this is a struct that holds the information transferred
from the simulator prior to vanguard instantation.
this way we can avoid the static members for state,
which causes issues for serialization (in particular, it makes
it impossible to compare two instances like we do in tests).
This commit is contained in:
Arne Morten Kvarving
2023-02-01 10:35:20 +01:00
parent 70e9a503a0
commit c33240f5c1
3 changed files with 48 additions and 60 deletions

View File

@@ -211,13 +211,13 @@ void Main::readDeck(const std::string& deckFilename,
void Main::setupVanguard()
{
EclGenericVanguard::defineSimulationModel(this->setupTime_,
this->eclipseState_,
this->schedule_,
std::move(this->udqState_),
std::move(this->actionState_),
std::move(this->wtestState_),
this->summaryConfig_);
EclGenericVanguard::modelParams_.setupTime_ = this->setupTime_;
EclGenericVanguard::modelParams_.actionState_ = std::move(this->actionState_);
EclGenericVanguard::modelParams_.eclSchedule_ = this->schedule_;
EclGenericVanguard::modelParams_.eclState_ = this->eclipseState_;
EclGenericVanguard::modelParams_.eclSummaryConfig_ = this->summaryConfig_;
EclGenericVanguard::modelParams_.udqState_ = std::move(udqState_);
EclGenericVanguard::modelParams_.wtestState_ = std::move(wtestState_);
}
#if HAVE_DAMARIS