convert users of MESSAGE to OPM_MESSAGE
This commit is contained in:
parent
c25ec5999e
commit
23f215bec4
@ -569,7 +569,7 @@ void EclipseGridParser::convertToSI()
|
||||
} else if (key == "RS") {
|
||||
unit = units_.gasvol_s / units_.liqvol_s;
|
||||
} else if (key == "MAPAXES") {
|
||||
MESSAGE("Not applying units to MAPAXES yet!");
|
||||
OPM_MESSAGE("Not applying units to MAPAXES yet!");
|
||||
unit = 1.0;
|
||||
} else {
|
||||
OPM_THROW(std::runtime_error, "Units for field " << key << " not specified. Cannon convert to SI.");
|
||||
|
@ -66,7 +66,7 @@ namespace Opm
|
||||
if (deck.hasField("PVTW")) {
|
||||
const std::vector<double>& pvtw = deck.getPVTW().pvtw_[region_number];
|
||||
if (pvtw[2] != 0.0 || pvtw[4] != 0.0) {
|
||||
MESSAGE("Compressibility effects in PVTW are ignored.");
|
||||
OPM_MESSAGE("Compressibility effects in PVTW are ignored.");
|
||||
}
|
||||
reservoir_density_[phase_usage.phase_pos[PhaseUsage::Aqua]] /= pvtw[1];
|
||||
viscosity_[phase_usage.phase_pos[PhaseUsage::Aqua]] = pvtw[3];
|
||||
@ -80,7 +80,7 @@ namespace Opm
|
||||
if (deck.hasField("PVCDO")) {
|
||||
const std::vector<double>& pvcdo = deck.getPVCDO().pvcdo_[region_number];
|
||||
if (pvcdo[2] != 0.0 || pvcdo[4] != 0.0) {
|
||||
MESSAGE("Compressibility effects in PVCDO are ignored.");
|
||||
OPM_MESSAGE("Compressibility effects in PVCDO are ignored.");
|
||||
}
|
||||
reservoir_density_[phase_usage.phase_pos[PhaseUsage::Liquid]] /= pvcdo[1];
|
||||
viscosity_[phase_usage.phase_pos[PhaseUsage::Liquid]] = pvcdo[3];
|
||||
|
@ -113,7 +113,7 @@ namespace Opm
|
||||
const double cum_src = std::accumulate(source, source + grid_.number_of_cells, 0.0);
|
||||
if (std::fabs(cum_src) > *std::max_element(source, source + grid_.number_of_cells)*1e-2) {
|
||||
// OPM_THROW(std::runtime_error, "Sources do not sum to zero: " << cum_src);
|
||||
MESSAGE("Warning: sources do not sum to zero: " << cum_src);
|
||||
OPM_MESSAGE("Warning: sources do not sum to zero: " << cum_src);
|
||||
}
|
||||
#endif
|
||||
const int num_basis = basis_func_->numBasisFunc();
|
||||
@ -191,7 +191,7 @@ namespace Opm
|
||||
const double cum_src = std::accumulate(source, source + grid_.number_of_cells, 0.0);
|
||||
if (std::fabs(cum_src) > *std::max_element(source, source + grid_.number_of_cells)*1e-2) {
|
||||
// OPM_THROW(std::runtime_error, "Sources do not sum to zero: " << cum_src);
|
||||
MESSAGE("Warning: sources do not sum to zero: " << cum_src);
|
||||
OPM_MESSAGE("Warning: sources do not sum to zero: " << cum_src);
|
||||
}
|
||||
#endif
|
||||
const int num_basis = basis_func_->numBasisFunc();
|
||||
|
@ -68,14 +68,14 @@ namespace Opm
|
||||
{
|
||||
static double handleBracketingFailure(const double x0, const double x1, const double f0, const double f1)
|
||||
{
|
||||
MESSAGE("Error in parameters, zero not bracketed: [a, b] = ["
|
||||
OPM_MESSAGE("Error in parameters, zero not bracketed: [a, b] = ["
|
||||
<< x0 << ", " << x1 << "] f(a) = " << f0 << " f(b) = " << f1
|
||||
<< "");
|
||||
return std::fabs(f0) < std::fabs(f1) ? x0 : x1;
|
||||
}
|
||||
static double handleTooManyIterations(const double x0, const double x1, const int maxiter)
|
||||
{
|
||||
MESSAGE("Maximum number of iterations exceeded: " << maxiter
|
||||
OPM_MESSAGE("Maximum number of iterations exceeded: " << maxiter
|
||||
<< ", current interval is [" << std::min(x0, x1) << ", "
|
||||
<< std::max(x0, x1) << "]");
|
||||
return 0.5*(x0 + x1);
|
||||
|
@ -459,7 +459,7 @@ namespace Opm
|
||||
for (int w = 0; w < wells.number_of_wells; ++w) {
|
||||
const int cur = wells.ctrls[w]->current;
|
||||
if (wells.ctrls[w]->num != 1) {
|
||||
MESSAGE("In wellsToSrc(): well has more than one control, all but current control will be ignored.");
|
||||
OPM_MESSAGE("In wellsToSrc(): well has more than one control, all but current control will be ignored.");
|
||||
}
|
||||
if (wells.ctrls[w]->type[cur] != RESERVOIR_RATE) {
|
||||
OPM_THROW(std::runtime_error, "In wellsToSrc(): well is something other than RESERVOIR_RATE.");
|
||||
|
@ -249,7 +249,7 @@ namespace Opm
|
||||
keywords.push_back("COMPDAT");
|
||||
// keywords.push_back("WELTARG");
|
||||
if (!deck.hasFields(keywords)) {
|
||||
MESSAGE("Missing well keywords in deck, initializing no wells.");
|
||||
OPM_MESSAGE("Missing well keywords in deck, initializing no wells.");
|
||||
return;
|
||||
}
|
||||
if (!(deck.hasField("WCONINJE") || deck.hasField("WCONPROD")) ) {
|
||||
@ -385,7 +385,7 @@ namespace Opm
|
||||
double radius = 0.5*compdat.compdat[kw].diameter_;
|
||||
if (radius <= 0.0) {
|
||||
radius = 0.5*unit::feet;
|
||||
MESSAGE("**** Warning: Well bore internal radius set to " << radius);
|
||||
OPM_MESSAGE("**** Warning: Well bore internal radius set to " << radius);
|
||||
}
|
||||
std::array<double, 3> cubical = getCubeDim(grid, cell);
|
||||
const double* cell_perm = &permeability[grid.dimensions*grid.dimensions*cell];
|
||||
|
Loading…
Reference in New Issue
Block a user