Merge pull request #404 from atgeirr/fix-initblackoilsurfvol

Guard against erroneous use of initBlackoilSurfvol().
This commit is contained in:
Bård Skaflestad committed 2013-10-07 04:45:07 -07:00
commit e243306340
1 file changed
+4
+4
View File
@@ -616,6 +616,10 @@ namespace Opm
const BlackoilPropertiesInterface& props,
State& state)
{
if (props.numPhases() != 3) {
OPM_THROW(std::runtime_error, "initBlackoilSurfvol() is only supported in three-phase simulations.");
}
const std::vector<double>& rs = state.gasoilratio();
//make input for computation of the A matrix