mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove some always true/false conditionals
quell static analyzer issues
This commit is contained in:
@@ -194,14 +194,17 @@ public:
|
||||
}
|
||||
|
||||
// Adding dispersion in the gas phase leads to
|
||||
// convergence issues and unphysical results.
|
||||
// convergence issues and unphysical results.
|
||||
// We disable dispersion in the gas phase for now
|
||||
// See comment below
|
||||
if (FluidSystem::gasPhaseIdx == phaseIdx) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// no dispersion in gas for blackoil models unless gas can contain evaporated water or oil
|
||||
if ((!FluidSystem::enableVaporizedWater() && !FluidSystem::enableVaporizedOil()) && FluidSystem::gasPhaseIdx == phaseIdx) {
|
||||
// phase check disabled due to if above, reenable when removing unconditional gas phase disablement
|
||||
if ((!FluidSystem::enableVaporizedWater() && !FluidSystem::enableVaporizedOil())
|
||||
/*&& FluidSystem::gasPhaseIdx == phaseIdx*/) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -581,13 +581,13 @@ public:
|
||||
using FsToolbox = Opm::MathToolbox<typename FluidState::Scalar>;
|
||||
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
bool oldPhasePresent = (oldPhasePresence& (1 << phaseIdx)) > 0;
|
||||
bool oldPhasePresent = (oldPhasePresence & (1 << phaseIdx)) > 0;
|
||||
bool newPhasePresent = newPv.phaseIsPresent(phaseIdx);
|
||||
if (oldPhasePresent == newPhasePresent)
|
||||
continue;
|
||||
|
||||
const auto& pos = elemCtx.pos(dofIdx, /*timeIdx=*/0);
|
||||
if (oldPhasePresent && !newPhasePresent) {
|
||||
if (oldPhasePresent) {
|
||||
std::cout << "'" << FluidSystem::phaseName(phaseIdx)
|
||||
<< "' phase disappears at position " << pos
|
||||
<< ". saturation=" << fs.saturation(phaseIdx)
|
||||
|
||||
Reference in New Issue
Block a user