mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Avoid negative indicies in minPvFillNtg_
This commit is contained in:
@@ -429,6 +429,10 @@ private:
|
||||
|
||||
// use the original ntg values if the cell above has porv > minPVvalue.
|
||||
int cartesianCellIdxAbove = cartesianCellIdx - nxny;
|
||||
|
||||
if (cartesianCellIdxAbove < 0)
|
||||
continue;
|
||||
|
||||
if (porv[cartesianCellIdxAbove] > eclGrid.getMinpvValue() ){
|
||||
averageNtg[cartesianCellIdx] = ntg[cartesianCellIdx];
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user