mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use network pressures from restart
This commit is contained in:
@@ -154,6 +154,11 @@ namespace {
|
||||
std::move(python), outputInterval, init_state);
|
||||
}
|
||||
|
||||
// Read network pressures from restart
|
||||
if (rst_state.network.isActive()) {
|
||||
eclipseState.loadRestartNetworkPressures(rst_state.network);
|
||||
}
|
||||
|
||||
udqState = std::make_unique<Opm::UDQState>
|
||||
((*schedule)[0].udq().params().undefinedValue());
|
||||
udqState->load_rst(rst_state);
|
||||
|
||||
@@ -91,20 +91,27 @@ BlackoilWellModelGeneric(Schedule& schedule,
|
||||
, nupcol_wgstate_(phase_usage)
|
||||
{
|
||||
|
||||
const auto numProcs = comm_.size();
|
||||
this->not_on_process_ = [this, numProcs](const Well& well) {
|
||||
if (numProcs == decltype(numProcs){1})
|
||||
return false;
|
||||
const auto numProcs = comm_.size();
|
||||
this->not_on_process_ = [this, numProcs](const Well& well) {
|
||||
if (numProcs == decltype(numProcs){1})
|
||||
return false;
|
||||
|
||||
// Recall: false indicates NOT active!
|
||||
const auto value = std::make_pair(well.name(), true);
|
||||
auto candidate = std::lower_bound(this->parallel_well_info_.begin(),
|
||||
this->parallel_well_info_.end(),
|
||||
value);
|
||||
// Recall: false indicates NOT active!
|
||||
const auto value = std::make_pair(well.name(), true);
|
||||
auto candidate = std::lower_bound(this->parallel_well_info_.begin(),
|
||||
this->parallel_well_info_.end(),
|
||||
value);
|
||||
|
||||
return (candidate == this->parallel_well_info_.end())
|
||||
|| (*candidate != value);
|
||||
};
|
||||
return (candidate == this->parallel_well_info_.end())
|
||||
|| (*candidate != value);
|
||||
};
|
||||
|
||||
const auto& node_pressures = eclState.getRestartNetworkPressures();
|
||||
if (node_pressures.has_value()) {
|
||||
for (const auto& it: node_pressures.value()) {
|
||||
this->node_pressures_[it.first] = it.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user