only output connection saturation for existing phases

This commit is contained in:
Tor Harald Sandve 2020-09-09 16:13:22 +02:00
parent 4b72b476b5
commit bcc0a1be69

View File

@ -289,9 +289,14 @@ public:
const size_t k = size_t(connection.getK());
const size_t index = simulator_.vanguard().eclState().gridDims().getGlobalIndex(i, j, k);
oilConnectionPressures_.emplace(std::make_pair(index, 0.0));
waterConnectionSaturations_.emplace(std::make_pair(index, 0.0));
gasConnectionSaturations_.emplace(std::make_pair(index, 0.0));
if (FluidSystem::phaseIsActive(oilPhaseIdx))
oilConnectionPressures_.emplace(std::make_pair(index, 0.0));
if (FluidSystem::phaseIsActive(waterPhaseIdx))
waterConnectionSaturations_.emplace(std::make_pair(index, 0.0));
if (FluidSystem::phaseIsActive(gasPhaseIdx))
gasConnectionSaturations_.emplace(std::make_pair(index, 0.0));
}
}
}