initBlackoilSurfvol(): Use loop order consistent with column-major ordering.

This commit is contained in:
Bård Skaflestad committed 2012-05-21 21:03:43 +02:00
1 parent 36d21ec747
commit 664e0eadef
1 file changed
+5 -3
+5 -3
View File
@@ -576,9 +576,11 @@ namespace Opm
double* z = &state.surfacevol()[c*np];
const double* s = &state.saturation()[c*np];
const double* A = &allA[c*np*np];
for (int row = 0; row < np; ++row) {
z[row] = 0.0;
for (int col = 0; col < np; ++col) {
for (int row = 0; row < np; ++row) { z[row] = 0.0; }
for (int col = 0; col < np; ++col) {
for (int row = 0; row < np; ++row) {
// Recall: A has column-major ordering.
z[row] += A[row + np*col]*s[col];
}