using OpmLog to give warning.

This commit is contained in:
Kai Bao 2016-06-29 11:43:11 +02:00
parent 41b9fca434
commit 109b55f61c
2 changed files with 10 additions and 8 deletions

View File

@ -22,6 +22,8 @@
#ifndef OPM_STANDARDWELLS_HEADER_INCLUDED #ifndef OPM_STANDARDWELLS_HEADER_INCLUDED
#define OPM_STANDARDWELLS_HEADER_INCLUDED #define OPM_STANDARDWELLS_HEADER_INCLUDED
#include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/common/utility/platform_dependent/disable_warnings.h> #include <opm/common/utility/platform_dependent/disable_warnings.h>
#include <Eigen/Eigen> #include <Eigen/Eigen>
#include <Eigen/Sparse> #include <Eigen/Sparse>

View File

@ -1292,13 +1292,13 @@ namespace Opm
if (rate_limit_violated) { if (rate_limit_violated) {
if (econ_production_limits.endRun()) { if (econ_production_limits.endRun()) {
std::cerr << "WARNING: ending run after well closed due to economic limits is not supported yet" const std::string warning_message = std::string("WARNING: ending run after well closed due to economic limits is not supported yet \n")
<< std::endl + std::string("the program will keep running after ") + well_name + std::string(" is closed");
<< "the program will keep running after " << well_name << " is closed " << std::endl; OpmLog::warning(warning_message);
} }
if (econ_production_limits.validFollowonWell()) { if (econ_production_limits.validFollowonWell()) {
std::cerr << "WARNING: opening following on well after well closed is not supported yet" << std::endl; OpmLog::warning("WARNING: opening following on well after well closed is not supported yet");
} }
list_econ_limited.addShuttedWell(well_name); list_econ_limited.addShuttedWell(well_name);
@ -1372,7 +1372,7 @@ namespace Opm
} }
if (econ_production_limits.onMinReservoirFluidRate()) { if (econ_production_limits.onMinReservoirFluidRate()) {
std::cerr << "WARNING: Minimum reservoir fluid production rate limit is not supported yet" << std::endl; OpmLog::warning("WARNING: Minimum reservoir fluid production rate limit is not supported yet");
} }
return false; return false;
@ -1422,15 +1422,15 @@ namespace Opm
} }
if (econ_production_limits.onMaxGasOilRatio()) { if (econ_production_limits.onMaxGasOilRatio()) {
OPM_MESSAGE("WARNING: the support for max Gas-Oil ratio is not implemented yet!"); OpmLog::warning("WARNING: the support for max Gas-Oil ratio is not implemented yet!");
} }
if (econ_production_limits.onMaxWaterGasRatio()) { if (econ_production_limits.onMaxWaterGasRatio()) {
OPM_MESSAGE("WARNING: the support for max Water-Gas ratio is not implemented yet!"); OpmLog::warning("WARNING: the support for max Water-Gas ratio is not implemented yet!");
} }
if (econ_production_limits.onMaxGasLiquidRatio()) { if (econ_production_limits.onMaxGasLiquidRatio()) {
OPM_MESSAGE("WARNING: the support for max Gas-Liquid ratio is not implemented yet!"); OpmLog::warning("WARNING: the support for max Gas-Liquid ratio is not implemented yet!");
} }
if (any_limit_violated) { if (any_limit_violated) {