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:
Andreas Lauser 2016-10-25 17:49:39 +02:00
parent 6fb838aad4
commit 988b0e7361

View File

@ -245,6 +245,14 @@ protected:
Scalar distZ = zIn - zEx;
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
// external at the depth of the internal one
const Evaluation& rhoIn = intQuantsIn.fluidState().density(phaseIdx);