From fcdca081b06cc9eb263ade3e7b34e083a17fffde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 8 May 2012 12:03:50 +0200 Subject: [PATCH] Fix a likely indexing error leading to non-unit strides. --- opm/core/utility/miscUtilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/utility/miscUtilities.cpp b/opm/core/utility/miscUtilities.cpp index b58cc0ec..7f42bd9b 100644 --- a/opm/core/utility/miscUtilities.cpp +++ b/opm/core/utility/miscUtilities.cpp @@ -539,7 +539,7 @@ namespace Opm for (int wix = 0; wix < nw; ++wix) { for (int phase = 0; phase < np; ++phase) { // Reset vector - phase_flow_per_well[wix + np*phase] = 0.0; + phase_flow_per_well[wix*np + phase] = 0.0; } for (int i = wells.well_connpos[wix]; i < wells.well_connpos[wix + 1]; ++i) { for (int phase = 0; phase < np; ++phase) {