#1304 Absolute simplest fix to make things run. Remove tracer on connection cells iif well flow for cell has inconsistent direction with the with the sum of well fluxes in the same cell.

This commit is contained in:
Jacob Støren
2017-03-09 16:05:48 +01:00
parent b60139c558
commit 5d0df1c86f
2 changed files with 40 additions and 4 deletions

View File

@@ -64,7 +64,10 @@ namespace RigFlowDiagInterfaceTools {
const auto& ijk = completion.ijk;
const int cell_index = G.activeCell(ijk, grid_index);
if (cell_index >= 0) {
inflow.emplace(cell_index, completion.reservoir_inflow_rate);
auto iterIsInsertedPair = inflow.emplace(cell_index, completion.reservoir_inflow_rate);
if (!iterIsInsertedPair.second){ // Not inserted, We had something there already
iterIsInsertedPair.first->second += completion.reservoir_inflow_rate; // Accumulate the flow at this connection
}
}
}
}