mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Replace THROW by OPM_THROW
This commit is contained in:
@@ -69,7 +69,7 @@ namespace Opm
|
||||
densities_[phase_usage_.phase_pos[Liquid]] = d[ECL_oil];
|
||||
}
|
||||
} else {
|
||||
THROW("Input is missing DENSITY\n");
|
||||
OPM_THROW(std::runtime_error, "Input is missing DENSITY\n");
|
||||
}
|
||||
|
||||
// Set the properties.
|
||||
@@ -97,7 +97,7 @@ namespace Opm
|
||||
} else if (deck.hasField("PVCDO")) {
|
||||
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtConstCompr(deck.getPVCDO().pvcdo_));
|
||||
} else {
|
||||
THROW("Input is missing PVDO or PVTO\n");
|
||||
OPM_THROW(std::runtime_error, "Input is missing PVDO or PVTO\n");
|
||||
}
|
||||
}
|
||||
// Gas PVT
|
||||
@@ -111,7 +111,7 @@ namespace Opm
|
||||
// } else if (deck.hasField("PVTG")) {
|
||||
// props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtLiveGas(deck.getPVTG().pvtg_));
|
||||
} else {
|
||||
THROW("Input is missing PVDG or PVTG\n");
|
||||
OPM_THROW(std::runtime_error, "Input is missing PVDG or PVTG\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Opm
|
||||
ptr->init(deck, grid, -1);
|
||||
|
||||
if (phase_usage_.num_phases != satprops_->numPhases()) {
|
||||
THROW("BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck() - "
|
||||
OPM_THROW(std::runtime_error, "BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck() - "
|
||||
"Inconsistent number of phases in pvt data (" << phase_usage_.num_phases
|
||||
<< ") and saturation-dependent function data (" << satprops_->numPhases() << ").");
|
||||
}
|
||||
@@ -195,7 +195,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Water]) {
|
||||
THROW("Cannot call muWat(): water phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muWat(): water phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(pw.size() == n);
|
||||
@@ -219,7 +219,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Oil]) {
|
||||
THROW("Cannot call muOil(): oil phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muOil(): oil phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(po.size() == n);
|
||||
@@ -240,7 +240,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Gas]) {
|
||||
THROW("Cannot call muGas(): gas phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muGas(): gas phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(pg.size() == n);
|
||||
@@ -262,7 +262,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Water]) {
|
||||
THROW("Cannot call muWat(): water phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muWat(): water phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(pw.size() == n);
|
||||
@@ -292,7 +292,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Oil]) {
|
||||
THROW("Cannot call muOil(): oil phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muOil(): oil phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(po.size() == n);
|
||||
@@ -321,7 +321,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Gas]) {
|
||||
THROW("Cannot call muGas(): gas phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muGas(): gas phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(pg.value().size() == n);
|
||||
@@ -368,7 +368,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Water]) {
|
||||
THROW("Cannot call bWat(): water phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call bWat(): water phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(pw.size() == n);
|
||||
@@ -394,7 +394,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Oil]) {
|
||||
THROW("Cannot call bOil(): oil phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call bOil(): oil phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(po.size() == n);
|
||||
@@ -417,7 +417,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Gas]) {
|
||||
THROW("Cannot call bGas(): gas phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call bGas(): gas phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(pg.size() == n);
|
||||
@@ -441,7 +441,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Water]) {
|
||||
THROW("Cannot call muWat(): water phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muWat(): water phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(pw.size() == n);
|
||||
@@ -473,7 +473,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Oil]) {
|
||||
THROW("Cannot call muOil(): oil phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muOil(): oil phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(po.size() == n);
|
||||
@@ -503,7 +503,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Gas]) {
|
||||
THROW("Cannot call muGas(): gas phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call muGas(): gas phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(pg.size() == n);
|
||||
@@ -537,7 +537,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Oil]) {
|
||||
THROW("Cannot call rsMax(): oil phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call rsMax(): oil phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(po.size() == n);
|
||||
@@ -555,7 +555,7 @@ namespace Opm
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Oil]) {
|
||||
THROW("Cannot call rsMax(): oil phase not present.");
|
||||
OPM_THROW(std::runtime_error, "Cannot call rsMax(): oil phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
assert(po.size() == n);
|
||||
@@ -637,7 +637,7 @@ namespace Opm
|
||||
assert(so.value().size() == n);
|
||||
s_all.col(phase_usage_.phase_pos[Oil]) = so.value();
|
||||
} else {
|
||||
THROW("BlackoilPropsAdFromDeck::relperm() assumes oil phase is active.");
|
||||
OPM_THROW(std::runtime_error, "BlackoilPropsAdFromDeck::relperm() assumes oil phase is active.");
|
||||
}
|
||||
if (phase_usage_.phase_used[Gas]) {
|
||||
assert(sg.value().size() == n);
|
||||
|
||||
Reference in New Issue
Block a user