mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4701 from atgeirr/threshold-pressure-zero
Do not set pressure diff to zero when not necessary.
This commit is contained in:
commit
6afda71480
@ -389,14 +389,16 @@ public:
|
||||
// of threshold pressure is a quite big hack that only makes sense for ECL
|
||||
// datasets. (and even there, its physical justification is quite
|
||||
// questionable IMO.)
|
||||
if (std::abs(Toolbox::value(pressureDifference)) > thpres) {
|
||||
if (pressureDifference < 0.0)
|
||||
pressureDifference += thpres;
|
||||
else
|
||||
pressureDifference -= thpres;
|
||||
}
|
||||
else {
|
||||
pressureDifference = 0.0;
|
||||
if (thpres > 0.0) {
|
||||
if (std::abs(Toolbox::value(pressureDifference)) > thpres) {
|
||||
if (pressureDifference < 0.0)
|
||||
pressureDifference += thpres;
|
||||
else
|
||||
pressureDifference -= thpres;
|
||||
}
|
||||
else {
|
||||
pressureDifference = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user