Have rerwritten the code in a more compact and logical form

This commit is contained in:
Jostein Alvestad 2019-04-24 11:09:00 +02:00
parent 9d5e55180a
commit 38265ead52

View File

@ -611,33 +611,21 @@ public:
val.second = 1. - Opm::getValue(fs.saturation(gasPhaseIdx)) - Opm::getValue(fs.saturation(waterPhaseIdx)); val.second = 1. - Opm::getValue(fs.saturation(gasPhaseIdx)) - Opm::getValue(fs.saturation(waterPhaseIdx));
else if (key.first == "BPR") else if (key.first == "BPR")
val.second = Opm::getValue(fs.pressure(oilPhaseIdx)); val.second = Opm::getValue(fs.pressure(oilPhaseIdx));
else if (key.first == "BWKR") else if (key.first == "BWKR" || key.first == "BKRW")
val.second = Opm::getValue(intQuants.relativePermeability(waterPhaseIdx)); val.second = Opm::getValue(intQuants.relativePermeability(waterPhaseIdx));
else if (key.first == "BKRW") else if (key.first == "BGKR" || key.first == "BKRG")
val.second = Opm::getValue(intQuants.relativePermeability(waterPhaseIdx));
else if (key.first == "BGKR")
val.second = Opm::getValue(intQuants.relativePermeability(gasPhaseIdx)); val.second = Opm::getValue(intQuants.relativePermeability(gasPhaseIdx));
else if (key.first == "BKRG") else if (key.first == "BOKR" || key.first == "BKRO")
val.second = Opm::getValue(intQuants.relativePermeability(gasPhaseIdx));
else if (key.first == "BOKR")
val.second = Opm::getValue(intQuants.relativePermeability(oilPhaseIdx));
else if (key.first == "BKRO")
val.second = Opm::getValue(intQuants.relativePermeability(oilPhaseIdx)); val.second = Opm::getValue(intQuants.relativePermeability(oilPhaseIdx));
else if (key.first == "BWPC") else if (key.first == "BWPC")
val.second = Opm::getValue(fs.pressure(oilPhaseIdx)) - Opm::getValue(fs.pressure(waterPhaseIdx)); val.second = Opm::getValue(fs.pressure(oilPhaseIdx)) - Opm::getValue(fs.pressure(waterPhaseIdx));
else if (key.first == "BGPC") else if (key.first == "BGPC")
val.second = Opm::getValue(fs.pressure(gasPhaseIdx)) - Opm::getValue(fs.pressure(oilPhaseIdx)); val.second = Opm::getValue(fs.pressure(gasPhaseIdx)) - Opm::getValue(fs.pressure(oilPhaseIdx));
else if (key.first == "BVWAT") else if (key.first == "BVWAT" || key.first == "BWVIS")
val.second = Opm::getValue(fs.viscosity(waterPhaseIdx)); val.second = Opm::getValue(fs.viscosity(waterPhaseIdx));
else if (key.first == "BWVIS") else if (key.first == "BVGAS" || key.first == "BGVIS")
val.second = Opm::getValue(fs.viscosity(waterPhaseIdx));
else if (key.first == "BVGAS")
val.second = Opm::getValue(fs.viscosity(gasPhaseIdx)); val.second = Opm::getValue(fs.viscosity(gasPhaseIdx));
else if (key.first == "BGVIS") else if (key.first == "BVOIL" || key.first == "BOVIS")
val.second = Opm::getValue(fs.viscosity(gasPhaseIdx));
else if (key.first == "BVOIL")
val.second = Opm::getValue(fs.viscosity(oilPhaseIdx));
else if (key.first == "BOVIS")
val.second = Opm::getValue(fs.viscosity(oilPhaseIdx)); val.second = Opm::getValue(fs.viscosity(oilPhaseIdx));
else { else {
std::string logstring = "Keyword '"; std::string logstring = "Keyword '";