Guard against erroneous use of initBlackoilSurfvol().

This commit is contained in:
Atgeirr Flø Rasmussen 2013-10-07 12:46:35 +02:00
parent 5140d99e60
commit d4bb9c0611

View File

@ -616,6 +616,10 @@ namespace Opm
const BlackoilPropertiesInterface& props,
State& state)
{
if (props.numPhases() != 3) {
OPM_THROW(std::runtime_error, "initBlackoilSurfvol() can for now only be used with 3 phases.");
}
const std::vector<double>& rs = state.gasoilratio();
//make input for computation of the A matrix