mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-07-07 04:53:03 -05:00
Add support for GRUPSLAV keyword
This commit is contained in:
parent
c68cad57f1
commit
f322d7f668
|
@ -146,7 +146,7 @@ void FlowGenericVanguard::readDeck(const std::string& filename)
|
|||
modelParams_.actionState_,
|
||||
modelParams_.wtestState_,
|
||||
modelParams_.eclSummaryConfig_,
|
||||
nullptr, "normal", "100", false, false, {});
|
||||
nullptr, "normal", "100", false, false, {}, /*slaveMode=*/false);
|
||||
modelParams_.setupTime_ = setupTimer.stop();
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,10 @@ template<class TypeTag, class MyTypeTag>
|
|||
struct EnableLoggingFalloutWarning {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct Slave {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
|
||||
// TODO: enumeration parameters. we use strings for now.
|
||||
template<class TypeTag>
|
||||
|
@ -70,6 +74,10 @@ template<class TypeTag>
|
|||
struct OutputInterval<TypeTag, TTag::FlowProblem> {
|
||||
static constexpr int value = 1;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct Slave<TypeTag, TTag::FlowProblem> {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -121,7 +129,9 @@ namespace Opm {
|
|||
Parameters::registerParam<TypeTag, Properties::EnableLoggingFalloutWarning>
|
||||
("Developer option to see whether logging was on non-root processors. "
|
||||
"In that case it will be appended to the *.DBG or *.PRT files");
|
||||
|
||||
Parameters::registerParam<TypeTag, Properties::Slave>
|
||||
("Specify if the simulation is a slave simulation in a master-slave simulation");
|
||||
Parameters::hideParam<TypeTag, Properties::Slave>();
|
||||
Simulator::registerParameters();
|
||||
|
||||
// register the base parameters
|
||||
|
|
|
@ -203,6 +203,7 @@ void Main::readDeck(const std::string& deckFilename,
|
|||
const std::string& inputSkipMode,
|
||||
const std::size_t numThreads,
|
||||
const int output_param,
|
||||
const bool slaveMode,
|
||||
const std::string& parameters,
|
||||
std::string_view moduleVersion,
|
||||
std::string_view compileTimestamp)
|
||||
|
@ -236,7 +237,8 @@ void Main::readDeck(const std::string& deckFilename,
|
|||
inputSkipMode,
|
||||
init_from_restart_file,
|
||||
outputCout_,
|
||||
outputInterval);
|
||||
outputInterval,
|
||||
slaveMode);
|
||||
|
||||
verifyValidCellGeometry(FlowGenericVanguard::comm(), *this->eclipseState_);
|
||||
|
||||
|
|
|
@ -422,6 +422,7 @@ private:
|
|||
Parameters::get<PreTypeTag, Properties::InputSkipMode>(),
|
||||
getNumThreads<PreTypeTag>(),
|
||||
Parameters::get<PreTypeTag, Properties::EclOutputInterval>(),
|
||||
Parameters::get<PreTypeTag, Properties::Slave>(),
|
||||
cmdline_params,
|
||||
Opm::moduleVersion(),
|
||||
Opm::compileTimestamp());
|
||||
|
@ -697,6 +698,7 @@ private:
|
|||
const std::string& inputSkipMode,
|
||||
const std::size_t numThreads,
|
||||
const int output_param,
|
||||
const bool slaveMode,
|
||||
const std::string& parameters,
|
||||
std::string_view moduleVersion,
|
||||
std::string_view compileTimestamp);
|
||||
|
|
|
@ -244,7 +244,6 @@ const KeywordValidation::UnsupportedKeywords& unsupportedKeywords()
|
|||
{"GRAVDRM", {true, std::nullopt}},
|
||||
{"GRDREACH", {true, std::nullopt}},
|
||||
{"GRUPRIG", {true, std::nullopt}},
|
||||
{"GRUPSLAV", {true, std::nullopt}},
|
||||
{"GRUPTARG", {true, std::nullopt}},
|
||||
{"GSATINJE", {true, std::nullopt}},
|
||||
{"GSEPCOND", {true, std::nullopt}},
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace {
|
|||
if (schedule == nullptr) {
|
||||
schedule = std::make_shared<Opm::Schedule>
|
||||
(deck, eclipseState, parseContext, errorGuard,
|
||||
std::move(python), outputInterval, init_state);
|
||||
std::move(python), /*slaveMode=*/false, outputInterval, init_state);
|
||||
}
|
||||
|
||||
// Read network pressures from restart
|
||||
|
@ -177,14 +177,17 @@ namespace {
|
|||
std::unique_ptr<Opm::UDQState>& udqState,
|
||||
std::unique_ptr<Opm::Action::State>& actionState,
|
||||
std::unique_ptr<Opm::WellTestState>& wtestState,
|
||||
Opm::ErrorGuard& errorGuard)
|
||||
Opm::ErrorGuard& errorGuard,
|
||||
const bool slaveMode)
|
||||
{
|
||||
if (schedule == nullptr) {
|
||||
schedule = std::make_shared<Opm::Schedule>
|
||||
(deck, eclipseState, parseContext,
|
||||
errorGuard, std::move(python));
|
||||
errorGuard, std::move(python), slaveMode);
|
||||
}
|
||||
if (slaveMode) {
|
||||
std::cout << "Slave mode is enabled\n";
|
||||
}
|
||||
|
||||
udqState = std::make_unique<Opm::UDQState>
|
||||
((*schedule)[0].udq().params().undefinedValue());
|
||||
|
||||
|
@ -244,7 +247,8 @@ namespace {
|
|||
const bool checkDeck,
|
||||
const bool treatCriticalAsNonCritical,
|
||||
const std::optional<int>& outputInterval,
|
||||
Opm::ErrorGuard& errorGuard)
|
||||
Opm::ErrorGuard& errorGuard,
|
||||
const bool slaveMode)
|
||||
{
|
||||
OPM_TIMEBLOCK(readDeck);
|
||||
if (((schedule == nullptr) || (summaryConfig == nullptr)) &&
|
||||
|
@ -275,7 +279,7 @@ namespace {
|
|||
createNonRestartDynamicObjects(deck, *eclipseState,
|
||||
*parseContext, std::move(python),
|
||||
schedule, udqState, actionState, wtestState,
|
||||
errorGuard);
|
||||
errorGuard, slaveMode);
|
||||
}
|
||||
|
||||
eclipseState->appendAqufluxSchedule(schedule->getAquiferFluxSchedule());
|
||||
|
@ -538,7 +542,8 @@ void Opm::readDeck(Opm::Parallel::Communication comm,
|
|||
const std::string& inputSkipMode,
|
||||
const bool initFromRestart,
|
||||
const bool checkDeck,
|
||||
const std::optional<int>& outputInterval)
|
||||
const std::optional<int>& outputInterval,
|
||||
const bool slaveMode)
|
||||
{
|
||||
auto errorGuard = std::make_unique<ErrorGuard>();
|
||||
|
||||
|
@ -567,7 +572,8 @@ void Opm::readDeck(Opm::Parallel::Communication comm,
|
|||
readOnIORank(comm, deckFilename, parseContext.get(),
|
||||
eclipseState, schedule, udqState, actionState, wtestState,
|
||||
summaryConfig, std::move(python), initFromRestart,
|
||||
checkDeck, treatCriticalAsNonCritical, outputInterval, *errorGuard);
|
||||
checkDeck, treatCriticalAsNonCritical, outputInterval,
|
||||
*errorGuard, slaveMode);
|
||||
|
||||
// Update schedule so that re-parsing after actions use same strictness
|
||||
assert(schedule);
|
||||
|
|
|
@ -94,7 +94,8 @@ void readDeck(Parallel::Communication comm,
|
|||
const std::string& inputSkipMode,
|
||||
bool initFromRestart,
|
||||
bool checkDeck,
|
||||
const std::optional<int>& outputInterval);
|
||||
const std::optional<int>& outputInterval,
|
||||
bool slaveMode);
|
||||
|
||||
void verifyValidCellGeometry(Parallel::Communication comm,
|
||||
const EclipseState& eclipseState);
|
||||
|
|
Loading…
Reference in New Issue
Block a user