From 7777a8ee07b8499718b202545a29cc41a6f9059f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Mon, 26 Mar 2012 14:20:00 +0200 Subject: [PATCH] Bugfix in solveMultiCell(). --- opm/core/transport/reorder/TransportModelTwophase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opm/core/transport/reorder/TransportModelTwophase.cpp b/opm/core/transport/reorder/TransportModelTwophase.cpp index 7d9aadac0..70d9876ec 100644 --- a/opm/core/transport/reorder/TransportModelTwophase.cpp +++ b/opm/core/transport/reorder/TransportModelTwophase.cpp @@ -362,7 +362,9 @@ namespace Opm for (int j = ia_downw_[cell]; j < ia_downw_[cell+1]; ++j) { const int downwind_cell = ja_downw_[j]; int ci = pos[downwind_cell]; - needs_update[ci] = 1; + if (ci != -1) { + needs_update[ci] = 1; + } // ++needs_update[ci]; // if (needs_update[ci] == num_upstream[ci]) { // fully_marked_stack.push_back(ci);