mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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
|
// of threshold pressure is a quite big hack that only makes sense for ECL
|
||||||
// datasets. (and even there its physical justification is quite
|
// datasets. (and even there its physical justification is quite
|
||||||
// questionable IMO.)
|
// questionable IMO.)
|
||||||
if (std::abs(Toolbox::value(pressureDifference_[phaseIdx])) > thpres_)
|
if (std::abs(Toolbox::value(pressureDifference_[phaseIdx])) > thpres_) {
|
||||||
pressureDifference_[phaseIdx] -=
|
if (pressureDifference_[phaseIdx] < 0.0)
|
||||||
Ewoms::signum(pressureDifference_[phaseIdx])*thpres_;
|
pressureDifference_[phaseIdx] += thpres_;
|
||||||
|
else
|
||||||
|
pressureDifference_[phaseIdx] -= thpres_;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
pressureDifference_[phaseIdx] = 0.0;
|
pressureDifference_[phaseIdx] = 0.0;
|
||||||
volumeFlux_[phaseIdx] = 0.0;
|
volumeFlux_[phaseIdx] = 0.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user