Merge pull request #3427 from joakim-hove/rst-load-udq

Rst load udq
This commit is contained in:
Joakim Hove 2021-07-07 07:20:51 +02:00 committed by GitHub
commit c121247524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,7 @@ namespace Opm {
void flowEbosBlackoilSetDeck(double setupTime, std::unique_ptr<Deck> deck, void flowEbosBlackoilSetDeck(double setupTime, std::unique_ptr<Deck> deck,
std::unique_ptr<EclipseState> eclState, std::unique_ptr<EclipseState> eclState,
std::unique_ptr<Schedule> schedule, std::unique_ptr<Schedule> schedule,
std::unique_ptr<UDQState> udqState,
std::unique_ptr<SummaryConfig> summaryConfig) std::unique_ptr<SummaryConfig> summaryConfig)
{ {
using TypeTag = Properties::TTag::EclFlowProblem; using TypeTag = Properties::TTag::EclFlowProblem;
@ -42,6 +43,7 @@ void flowEbosBlackoilSetDeck(double setupTime, std::unique_ptr<Deck> deck,
Vanguard::setExternalDeck(std::move(deck)); Vanguard::setExternalDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState)); Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule)); Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalUDQState(std::move(udqState));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig)); Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
} }

View File

@ -26,11 +26,13 @@ class EclipseState;
template<class TypeTag> class FlowMainEbos; template<class TypeTag> class FlowMainEbos;
class Schedule; class Schedule;
class SummaryConfig; class SummaryConfig;
class UDQState;
namespace Properties { namespace TTag { struct EclFlowProblem; } } namespace Properties { namespace TTag { struct EclFlowProblem; } }
void flowEbosBlackoilSetDeck(double setupTime, std::unique_ptr<Deck> deck, void flowEbosBlackoilSetDeck(double setupTime, std::unique_ptr<Deck> deck,
std::unique_ptr<EclipseState> eclState, std::unique_ptr<EclipseState> eclState,
std::unique_ptr<Schedule> schedule, std::unique_ptr<Schedule> schedule,
std::unique_ptr<UDQState> udqState,
std::unique_ptr<SummaryConfig> summaryConfig); std::unique_ptr<SummaryConfig> summaryConfig);
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -33,6 +33,7 @@
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp> #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp> #include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp> #include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
#include <opm/common/utility/String.hpp> #include <opm/common/utility/String.hpp>
#include <fmt/format.h> #include <fmt/format.h>

View File

@ -188,6 +188,7 @@ namespace Opm
std::move(deck_), std::move(deck_),
std::move(eclipseState_), std::move(eclipseState_),
std::move(schedule_), std::move(schedule_),
std::move(udqState_),
std::move(summaryConfig_)); std::move(summaryConfig_));
return flowEbosBlackoilMainInit( return flowEbosBlackoilMainInit(
argc_, argv_, outputCout_, outputFiles_); argc_, argv_, outputCout_, outputFiles_);
@ -326,6 +327,7 @@ namespace Opm
flowEbosBlackoilSetDeck(setupTime_, std::move(deck_), flowEbosBlackoilSetDeck(setupTime_, std::move(deck_),
std::move(eclipseState_), std::move(eclipseState_),
std::move(schedule_), std::move(schedule_),
std::move(udqState_),
std::move(summaryConfig_)); std::move(summaryConfig_));
return flowEbosBlackoilMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosBlackoilMain(argc_, argv_, outputCout_, outputFiles_);
} }

View File

@ -245,6 +245,7 @@ void readDeck(int rank, std::string& deckFilename, std::unique_ptr<Opm::Deck>& d
if (!schedule) if (!schedule)
schedule = std::make_unique<Opm::Schedule>(*deck, *eclipseState, *parseContext, *errorGuard, python, outputInterval, &rst_state); schedule = std::make_unique<Opm::Schedule>(*deck, *eclipseState, *parseContext, *errorGuard, python, outputInterval, &rst_state);
udqState = std::make_unique<Opm::UDQState>( schedule->operator[](0).udq().params().undefinedValue() ); udqState = std::make_unique<Opm::UDQState>( schedule->operator[](0).udq().params().undefinedValue() );
udqState->load_rst(rst_state);
} }
else { else {
if (!schedule) if (!schedule)