mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Guard against input error.
If no valid threephase_model is input, throw instead of crashing.
This commit is contained in:
parent
56e81968e3
commit
9f69e9fa51
@ -66,6 +66,8 @@ namespace Opm
|
|||||||
= new SaturationPropsFromDeck<SatFuncGwsegUniform>();
|
= new SaturationPropsFromDeck<SatFuncGwsegUniform>();
|
||||||
satprops_.reset(ptr);
|
satprops_.reset(ptr);
|
||||||
ptr->init(deck, grid, sat_samples);
|
ptr->init(deck, grid, sat_samples);
|
||||||
|
} else {
|
||||||
|
THROW("Unknown threephase_model: " << threephase_model);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (threephase_model == "stone2") {
|
if (threephase_model == "stone2") {
|
||||||
@ -83,6 +85,8 @@ namespace Opm
|
|||||||
= new SaturationPropsFromDeck<SatFuncGwsegNonuniform>();
|
= new SaturationPropsFromDeck<SatFuncGwsegNonuniform>();
|
||||||
satprops_.reset(ptr);
|
satprops_.reset(ptr);
|
||||||
ptr->init(deck, grid, sat_samples);
|
ptr->init(deck, grid, sat_samples);
|
||||||
|
} else {
|
||||||
|
THROW("Unknown threephase_model: " << threephase_model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user