Guard against input error.

If no valid threephase_model is input, throw instead of crashing.
This commit is contained in:
Atgeirr Flø Rasmussen 2012-09-24 17:09:50 +02:00
parent 56e81968e3
commit 9f69e9fa51

View File

@ -66,6 +66,8 @@ namespace Opm
= new SaturationPropsFromDeck<SatFuncGwsegUniform>();
satprops_.reset(ptr);
ptr->init(deck, grid, sat_samples);
} else {
THROW("Unknown threephase_model: " << threephase_model);
}
} else {
if (threephase_model == "stone2") {
@ -83,6 +85,8 @@ namespace Opm
= new SaturationPropsFromDeck<SatFuncGwsegNonuniform>();
satprops_.reset(ptr);
ptr->init(deck, grid, sat_samples);
} else {
THROW("Unknown threephase_model: " << threephase_model);
}
}