Solve(rock_comp): Refactor rock-compressibility diagonal term calculation.
This commit is contained in:
parent
f91ec88df6
commit
a8d067af18
@ -187,8 +187,9 @@ namespace Opm
|
|||||||
for (int c = 0; c < gg->number_of_cells; ++c) {
|
for (int c = 0; c < gg->number_of_cells; ++c) {
|
||||||
// Find diagonal
|
// Find diagonal
|
||||||
size_t j = csrmatrix_elm_index(c, c, h_->A);
|
size_t j = csrmatrix_elm_index(c, c, h_->A);
|
||||||
h_->A->sa[j] += porevol[c]*rock_comp[c]/dt;
|
double d = porevol[c] * rock_comp[c] / dt;
|
||||||
h_->b[c] += porevol[c]*rock_comp[c]*pressure[c]/dt;
|
h_->A->sa[j] += d;
|
||||||
|
h_->b[c] += d * pressure[c];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user