mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Re-introducing check for negative reportStepIdx and adding forgotten hasGroup check.
This commit is contained in:
parent
f137565bb6
commit
429b312bc0
@ -912,6 +912,7 @@ BlackoilWellModelGeneric::
|
||||
assignNodeValues(std::map<std::string, data::NodeData>& nodevalues, const int reportStepIdx) const
|
||||
{
|
||||
nodevalues.clear();
|
||||
if (reportStepIdx < 0) return;
|
||||
|
||||
for (const auto& [node, pressure] : node_pressures_) {
|
||||
nodevalues.emplace(node, data::NodeData{pressure});
|
||||
@ -938,7 +939,9 @@ assignNodeValues(std::map<std::string, data::NodeData>& nodevalues, const int re
|
||||
assert(it != nodevalues.end() );
|
||||
it->second.converged_pressure = converged_pressure;
|
||||
// Assign node values of group to GPR:WELLNAME
|
||||
const auto& group = schedule().getGroup(node, reportStepIdx);
|
||||
const auto& sched = schedule();
|
||||
if (!sched.hasGroup(node, reportStepIdx)) continue;
|
||||
const auto& group = sched.getGroup(node, reportStepIdx);
|
||||
for (const std::string& wellname : group.wells()) {
|
||||
auto it2 = nodevalues.find(wellname);
|
||||
assert(it2 != nodevalues.end());
|
||||
|
Loading…
Reference in New Issue
Block a user