Merge pull request #4342 from bska/accurate-error-for-missing-pvt-interp

PVT Interpolants: Give More Meaningful Diagnostic if PVT Interpolant Missing
This commit is contained in:
Magne Sjaastad 2019-04-20 13:13:15 +02:00 committed by GitHub
commit 7097d16b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

View File

@ -496,6 +496,13 @@ void
Opm::ECLPVT::Gas::Impl::validateRegIdx(const RegIdx region) const
{
if (region >= this->eval_.size()) {
if (this->eval_.empty()) {
throw std::invalid_argument{
"No Gas PVT Interpolant Available in Region "
+ std::to_string(region + 1)
};
}
throw std::invalid_argument {
"Region Index " +
std::to_string(region) +

View File

@ -691,6 +691,13 @@ void
Opm::ECLPVT::Oil::Impl::validateRegIdx(const RegIdx region) const
{
if (region >= this->eval_.size()) {
if (this->eval_.empty()) {
throw std::invalid_argument {
"No Oil PVT Interpolant Available in Region "
+ std::to_string(region + 1)
};
}
throw std::invalid_argument {
"Region Index " +
std::to_string(region) +

View File

@ -252,6 +252,13 @@ void
Opm::ECLPVT::Water::Impl::validateRegIdx(const RegIdx region) const
{
if (region >= this->eval_.size()) {
if (this->eval_.empty()) {
throw std::invalid_argument {
"No Water PVT Interpolant Available in Region "
+ std::to_string(region + 1)
};
}
throw std::invalid_argument {
"Region Index " +
std::to_string(region) +