Merge pull request #1105 from andlaus/fix_valgrind_errors

fix some valgrind errors in the init code
This commit is contained in:
Bård Skaflestad 2016-11-16 19:08:48 +01:00 committed by GitHub
commit ef3f7f78fa

View File

@ -896,12 +896,15 @@ namespace Opm
for (int col = 0; col < np; ++col) {
z[0] += A_a[0 + np*col]*s[col];
z[1] += A_l[1 + np*col]*s[col];
if (np > 2)
z[2] += A_v[2 + np*col]*s[col];
}
if (np > 2) {
double ztmp = z[2];
z[2] += z[1]*rs[c];
z[1] += ztmp*rv[c];
}
}
}