mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-23 09:46:24 -06:00
ebos: make the code which handles threshold pressure slightly faster
I don't really understand this, but I suppose the profiler does not lie...
This commit is contained in:
parent
171ccb0926
commit
6fb838aad4
@ -301,9 +301,12 @@ protected:
|
||||
// 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_[phaseIdx])) > thpres_)
|
||||
pressureDifference_[phaseIdx] -=
|
||||
Ewoms::signum(pressureDifference_[phaseIdx])*thpres_;
|
||||
if (std::abs(Toolbox::value(pressureDifference_[phaseIdx])) > thpres_) {
|
||||
if (pressureDifference_[phaseIdx] < 0.0)
|
||||
pressureDifference_[phaseIdx] += thpres_;
|
||||
else
|
||||
pressureDifference_[phaseIdx] -= thpres_;
|
||||
}
|
||||
else {
|
||||
pressureDifference_[phaseIdx] = 0.0;
|
||||
volumeFlux_[phaseIdx] = 0.0;
|
||||
|
Loading…
Reference in New Issue
Block a user