Merge pull request #1146 from andlaus/fix_bubble_dew_point_pressure_output

only output the bubble and dew point pressures if they are available
This commit is contained in:
Andreas Lauser
2017-04-18 12:39:34 +02:00
committed by GitHub

View File

@@ -765,14 +765,26 @@ namespace Opm
*/
if (vapour_active && liquid_active && rstKeywords["PBPD"] > 0) {
rstKeywords["PBPD"] = 0;
output.insert("PBUB",
Opm::UnitSystem::measure::pressure,
std::move( sd.getCellData("PBUB") ),
data::TargetType::RESTART_AUXILIARY);
output.insert("PDEW",
Opm::UnitSystem::measure::pressure,
std::move( sd.getCellData("PDEW") ),
data::TargetType::RESTART_AUXILIARY);
if (sd.hasCellData("PBUB")) {
output.insert("PBUB",
Opm::UnitSystem::measure::pressure,
std::move( sd.getCellData("PBUB") ),
data::TargetType::RESTART_AUXILIARY);
}
else if (log) {
Opm::OpmLog::warning("Output of bubble point pressure requested but not available in this simulator. Ignoring.");
}
if (sd.hasCellData("PDEW")) {
output.insert("PDEW",
Opm::UnitSystem::measure::pressure,
std::move( sd.getCellData("PDEW") ),
data::TargetType::RESTART_AUXILIARY);
}
else if (log) {
Opm::OpmLog::warning("Output of dew point pressure requested but not available in this simulator. Ignoring.");
}
}
if (sd.hasCellData("SOMAX")) {