mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1136 from joakim-hove/restart-optional-keys
Using optional restart loading instead of extra.
This commit is contained in:
commit
df3f763ec4
@ -175,29 +175,29 @@ void solutionToSim( const data::Solution& sol,
|
||||
state.getCellData("SSOL") = sol.data("SSOL");
|
||||
}
|
||||
|
||||
if ( extra.find("SOMAX") != extra.end() ) {
|
||||
if ( sol.has("SOMAX")) {
|
||||
state.registerCellData("SOMAX", 1);
|
||||
state.getCellData("SOMAX") = extra.find("SOMAX")->second;
|
||||
state.getCellData("SOMAX") = sol.data("SOMAX");
|
||||
}
|
||||
|
||||
if ( extra.find("PCSWM_OW") != extra.end() ) {
|
||||
if ( sol.has("PCSWM_OW")) {
|
||||
state.registerCellData("PCSWMDC_OW", 1);
|
||||
state.getCellData("PCSWMDC_OW") = extra.find("PCSWM_OW")->second;
|
||||
state.getCellData("PCSWMDC_OW") = sol.data("PCSWM_OW");
|
||||
}
|
||||
|
||||
if ( extra.find("KRNSW_OW") != extra.end() ) {
|
||||
if ( sol.has("KRNSW_OW")) {
|
||||
state.registerCellData("KRNSWMDC_OW", 1);
|
||||
state.getCellData("KRNSWMDC_OW") = extra.find("KRNSW_OW")->second;
|
||||
state.getCellData("KRNSWMDC_OW") = sol.data("KRNSW_OW");
|
||||
}
|
||||
|
||||
if ( extra.find("PCSWM_GO") != extra.end() ) {
|
||||
if ( sol.has("PCSWM_GO")) {
|
||||
state.registerCellData("PCSWMDC_GO", 1);
|
||||
state.getCellData("PCSWMDC_GO") = extra.find("PCSWM_GO")->second;
|
||||
state.getCellData("PCSWMDC_GO") = sol.data("PCSWM_GO");
|
||||
}
|
||||
|
||||
if ( extra.find("KRNSW_GO") != extra.end() ) {
|
||||
if ( sol.has("KRNSW_GO")) {
|
||||
state.registerCellData("KRNSWMDC_GO", 1);
|
||||
state.getCellData("KRNSWMDC_GO") = extra.find("KRNSW_GO")->second;
|
||||
state.getCellData("KRNSWMDC_GO") = sol.data("KRNSW_GO");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,19 +407,20 @@ namespace Opm
|
||||
WellState& wellstate,
|
||||
ExtraData& extra )
|
||||
{
|
||||
std::map<std::string, UnitSystem::measure> solution_keys {{"PRESSURE" , UnitSystem::measure::pressure},
|
||||
{"SWAT" , UnitSystem::measure::identity},
|
||||
{"SGAS" , UnitSystem::measure::identity},
|
||||
{"TEMP" , UnitSystem::measure::temperature},
|
||||
{"RS" , UnitSystem::measure::gas_oil_ratio},
|
||||
{"RV" , UnitSystem::measure::oil_gas_ratio}};
|
||||
std::map<std::string, RestartKey> solution_keys {{"PRESSURE" , UnitSystem::measure::pressure},
|
||||
{"SWAT" , UnitSystem::measure::identity},
|
||||
{"SGAS" , UnitSystem::measure::identity},
|
||||
{"TEMP" , UnitSystem::measure::temperature},
|
||||
{"RS" , UnitSystem::measure::gas_oil_ratio},
|
||||
{"RV" , UnitSystem::measure::oil_gas_ratio},
|
||||
{"SOMAX", {UnitSystem::measure::identity, false}},
|
||||
{"PCSWM_OW", {UnitSystem::measure::identity, false}},
|
||||
{"KRNSW_OW", {UnitSystem::measure::identity, false}},
|
||||
{"PCSWM_GO", {UnitSystem::measure::identity, false}},
|
||||
{"KRNSW_GO", {UnitSystem::measure::identity, false}}};
|
||||
|
||||
std::map<std::string, bool> extra_keys {
|
||||
{"OPMEXTRA" , false},
|
||||
{"SOMAX", false},
|
||||
{"PCSWM_OW", false},
|
||||
{"KRNSW_OW", false},
|
||||
{"PCSWM_GO", false},
|
||||
{"KRNSW_GO", false}
|
||||
{"OPMEXTRA" , false}
|
||||
};
|
||||
|
||||
if (restart_double_si_) {
|
||||
|
Loading…
Reference in New Issue
Block a user