Merge pull request #2485 from akva2/i_want_no_deck_dammit

fixed: double-parsing of the deck
This commit is contained in:
Arne Morten Kvarving 2020-03-20 11:17:06 +01:00 committed by GitHub
commit 7775a665d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,8 +244,7 @@ public:
* as the simulator vanguard object is alive.
*/
static void setExternalDeck(Opm::Deck* deck)
{ externalDeck_ = deck; }
{ externalDeck_ = deck; externalDeckSet_ = true; }
/*!
* \brief Set the Opm::EclipseState object which ought to be used when the simulator
* vanguard is instantiated.
@ -319,7 +318,7 @@ public:
else
errorGuard_ = externalErrorGuard_;
if (!externalDeck_) {
if (!externalDeck_ && !externalDeckSet_) {
if (myRank == 0)
std::cout << "Reading the deck file '" << fileName << "'" << std::endl;
@ -609,6 +608,7 @@ private:
static Opm::ParseContext* externalParseContext_;
static Opm::ErrorGuard* externalErrorGuard_;
static Opm::Deck* externalDeck_;
static bool externalDeckSet_;
static Opm::EclipseState* externalEclState_;
static Opm::Schedule* externalEclSchedule_;
static Opm::SummaryConfig* externalEclSummaryConfig_;
@ -652,6 +652,9 @@ Opm::ErrorGuard* EclBaseVanguard<TypeTag>::externalErrorGuard_ = nullptr;
template <class TypeTag>
Opm::Deck* EclBaseVanguard<TypeTag>::externalDeck_ = nullptr;
template <class TypeTag>
bool EclBaseVanguard<TypeTag>::externalDeckSet_ = false;
template <class TypeTag>
Opm::EclipseState* EclBaseVanguard<TypeTag>::externalEclState_;