mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-07-29 18:47:55 -05:00
VFPHelpers: use appropriate Scalar type
This commit is contained in:
@@ -557,7 +557,7 @@ intersectWithIPR(const VFPProdTable& table,
|
|||||||
if (y0 < 0 && y1 >= 0){
|
if (y0 < 0 && y1 >= 0){
|
||||||
// crossing with positive slope
|
// crossing with positive slope
|
||||||
Scalar w = -y0/(y1-y0);
|
Scalar w = -y0/(y1-y0);
|
||||||
w = std::clamp(w, 0.0, 1.0); // just to be safe (if y0~y1~0)
|
w = std::clamp(w, Scalar{0.0}, Scalar{1.0}); // just to be safe (if y0~y1~0)
|
||||||
flo_x = flo0 + w*(flo1 - flo0);
|
flo_x = flo0 + w*(flo1 - flo0);
|
||||||
}
|
}
|
||||||
flo0 = flo1;
|
flo0 = flo1;
|
||||||
|
|||||||
Reference in New Issue
Block a user