mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-23 16:00:01 -06:00
Fixed computeWDP again.
This commit is contained in:
parent
981fd5e1f3
commit
b41dd9088c
@ -421,7 +421,7 @@ namespace Opm
|
|||||||
double saturation_sum = 0.0;
|
double saturation_sum = 0.0;
|
||||||
for (size_t p = 0; p < np; p++) {
|
for (size_t p = 0; p < np; p++) {
|
||||||
if (!per_grid_cell) {
|
if (!per_grid_cell) {
|
||||||
saturation_sum += saturations[i * nw * np + j * np + p];
|
saturation_sum += saturations[j * np + p];
|
||||||
} else {
|
} else {
|
||||||
saturation_sum += saturations[np * cell + p];
|
saturation_sum += saturations[np * cell + p];
|
||||||
}
|
}
|
||||||
@ -432,7 +432,7 @@ namespace Opm
|
|||||||
double density = 0.0;
|
double density = 0.0;
|
||||||
for (size_t p = 0; p < np; p++) {
|
for (size_t p = 0; p < np; p++) {
|
||||||
if (!per_grid_cell) {
|
if (!per_grid_cell) {
|
||||||
density += saturations[i * nw * np + j * np + p] * densities[p] / saturation_sum;
|
density += saturations[j * np + p] * densities[p] / saturation_sum;
|
||||||
} else {
|
} else {
|
||||||
// Is this a smart way of doing it?
|
// Is this a smart way of doing it?
|
||||||
density += saturations[np * cell + p] * densities[p] / saturation_sum;
|
density += saturations[np * cell + p] * densities[p] / saturation_sum;
|
||||||
|
Loading…
Reference in New Issue
Block a user