mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-03 23:30:28 -06:00
Fixed a bug in non-linear Gauss-Seidel column segregation solver.
With columns containing an odd number of cells, middle cell would get solved twice, and the second time with incorrect s0. We still solve twice, but with correct s0.
This commit is contained in:
parent
5abf755e2d
commit
fb5113836c
@ -584,8 +584,8 @@ namespace Opm
|
||||
double old_s[2] = { saturation_[cells[ci]],
|
||||
saturation_[cells[ci2]] };
|
||||
saturation_[cells[ci]] = s0_[ci];
|
||||
saturation_[cells[ci2]] = s0_[ci2];
|
||||
solveSingleCellGravity(cells, ci, &col_gravflux[0]);
|
||||
saturation_[cells[ci2]] = s0_[ci2];
|
||||
solveSingleCellGravity(cells, ci2, &col_gravflux[0]);
|
||||
max_s_change = std::max(max_s_change, std::max(std::fabs(saturation_[cells[ci]] - old_s[0]),
|
||||
std::fabs(saturation_[cells[ci2]] - old_s[1])));
|
||||
|
Loading…
Reference in New Issue
Block a user