mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-07 23:13:01 -06:00
Bugfix, again: it was correct to take the maximum, reinstating.
There is a different problem that needs fixing, however: Flux inaccuracies (for example on boundaries) may tag some face as inflow face for a cell, even if it should have been no-flow. This may let the cell avoid limiting, even though it should have been limited according to the proper inflow faces.
This commit is contained in:
parent
583c905a43
commit
bfa52cc5f2
@ -404,7 +404,8 @@ namespace Opm
|
||||
const int dim = grid_.dimensions;
|
||||
const int num_basis = DGBasis::numBasisFunc(dim, degree_);
|
||||
|
||||
double max_slope_mult = 1e100;
|
||||
// double max_slope_mult = 1e100;
|
||||
double max_slope_mult = 0.0;
|
||||
int num_upstream_faces = 0;
|
||||
// For inflow faces, ensure that cell tof does not dip below
|
||||
// the minimum value from upstream (for all faces).
|
||||
@ -453,7 +454,8 @@ namespace Opm
|
||||
break;
|
||||
}
|
||||
const double face_mult = (tof_c - min_upstream)/(tof_c - min_here);
|
||||
max_slope_mult = std::min(max_slope_mult, face_mult);
|
||||
// max_slope_mult = std::min(max_slope_mult, face_mult);
|
||||
max_slope_mult = std::max(max_slope_mult, face_mult);
|
||||
}
|
||||
ASSERT(max_slope_mult >= 0.0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user