mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ebos: shortcut flux calculation if the mobilities of both DOFs is zero
this implies a small speedup of the linearization stage.
This commit is contained in:
parent
6fb838aad4
commit
988b0e7361
@ -245,6 +245,14 @@ protected:
|
|||||||
Scalar distZ = zIn - zEx;
|
Scalar distZ = zIn - zEx;
|
||||||
|
|
||||||
for (unsigned phaseIdx=0; phaseIdx < numPhases; phaseIdx++) {
|
for (unsigned phaseIdx=0; phaseIdx < numPhases; phaseIdx++) {
|
||||||
|
// check shortcut: if the mobility of the phase is zero in the interior as
|
||||||
|
// well as the exterior DOF, we can skip looking at the phase.
|
||||||
|
if (intQuantsIn.mobility(phaseIdx) < 1e-18 && intQuantsEx.mobility(phaseIdx) < 1e-18) {
|
||||||
|
pressureDifference_[phaseIdx] = 0.0;
|
||||||
|
volumeFlux_[phaseIdx] = 0.0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// do the gravity correction: compute the hydrostatic pressure for the
|
// do the gravity correction: compute the hydrostatic pressure for the
|
||||||
// external at the depth of the internal one
|
// external at the depth of the internal one
|
||||||
const Evaluation& rhoIn = intQuantsIn.fluidState().density(phaseIdx);
|
const Evaluation& rhoIn = intQuantsIn.fluidState().density(phaseIdx);
|
||||||
|
Loading…
Reference in New Issue
Block a user