mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-26 07:30:08 -05:00
initBlackoilSurfvol(): Use loop order consistent with column-major ordering.
This commit is contained in:
1 parent
36d21ec747
commit
664e0eadef
1 file changed
+5
-3
@@ -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];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user