matrix(): Reduce likelihood of reintroducing error fixed in cset 91ad967a15a0.

Specifically, rename loop variables i1->row and i2->col to better
reflect purpose.
This commit is contained in:
Bård Skaflestad 2012-05-11 16:31:05 +02:00
parent 86ab541f66
commit cd4026f6c4

View File

@ -165,9 +165,9 @@ namespace Opm
// (2): dA/dp <- -dA/dp*(dB/dp) == -A*(dB/dp)
const double* dB = & dB_[i * np];
for (int i2 = 0; i2 < np; ++i2) {
for (int i1 = 0; i1 < np; ++i1) {
m[i2*np + i1] *= - dB[ i2 ]; // Note sign.
for (int col = 0; col < np; ++col) {
for (int row = 0; row < np; ++row) {
m[col*np + row] *= - dB[ col ]; // Note sign.
}
}
@ -181,9 +181,9 @@ namespace Opm
// (3): dA/dp *= inv(B) (== final result)
const double* B = & B_[i * np];
for (int i2 = 0; i2 < np; ++i2) {
for (int i1 = 0; i1 < np; ++i1) {
m[i2*np + i1] /= B[ i2 ];
for (int col = 0; col < np; ++col) {
for (int row = 0; row < np; ++row) {
m[col*np + row] /= B[ col ];
}
}
}