From ec06eebc067d3fb1ad5e07ba44e937443084ffba Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Thu, 4 Aug 2016 10:22:49 +0800 Subject: [PATCH 1/2] set polymer rates to the right well. --- opm/polymer/PolymerInflow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/polymer/PolymerInflow.cpp b/opm/polymer/PolymerInflow.cpp index b280c4e55..403b6f98b 100644 --- a/opm/polymer/PolymerInflow.cpp +++ b/opm/polymer/PolymerInflow.cpp @@ -103,7 +103,7 @@ namespace Opm // names. int wix = 0; for (; wix < wells.number_of_wells; ++wix) { - if (wellPolymerRate_.count(wells.name[wix]) > 0) { + if (map_it->first == wells.name[wix]) { break; } } From 6256199176cefb4eab0ba50424d0c5788b95d8eb Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Thu, 4 Aug 2016 10:24:15 +0800 Subject: [PATCH 2/2] log the message to OpmLog. --- opm/polymer/PolymerInflow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opm/polymer/PolymerInflow.cpp b/opm/polymer/PolymerInflow.cpp index 403b6f98b..d804a20aa 100644 --- a/opm/polymer/PolymerInflow.cpp +++ b/opm/polymer/PolymerInflow.cpp @@ -19,6 +19,7 @@ #include +#include #include #include #include @@ -55,7 +56,7 @@ namespace Opm if (step_start + eps >= stime_ && step_end - eps <= etime_) { std::fill(poly_inflow_c.begin(), poly_inflow_c.end(), amount_); } else if (step_start + eps <= etime_ && step_end - eps >= stime_) { - OPM_MESSAGE("Warning: polymer injection set to change inside timestep. Using value at start of step."); + OpmLog::warning("polymer injection set to change inside timestep. Using value at start of step."); std::fill(poly_inflow_c.begin(), poly_inflow_c.end(), amount_); } else { std::fill(poly_inflow_c.begin(), poly_inflow_c.end(), 0.0);