mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Bugfix: take minimum of allowed slopes, not maximum.
This commit is contained in:
parent
76868ebc1c
commit
583c905a43
@ -404,7 +404,7 @@ namespace Opm
|
||||
const int dim = grid_.dimensions;
|
||||
const int num_basis = DGBasis::numBasisFunc(dim, degree_);
|
||||
|
||||
double max_slope_mult = 0.0;
|
||||
double max_slope_mult = 1e100;
|
||||
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 +453,7 @@ namespace Opm
|
||||
break;
|
||||
}
|
||||
const double face_mult = (tof_c - min_upstream)/(tof_c - min_here);
|
||||
max_slope_mult = std::max(max_slope_mult, face_mult);
|
||||
max_slope_mult = std::min(max_slope_mult, face_mult);
|
||||
}
|
||||
ASSERT(max_slope_mult >= 0.0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user