Fix error: When the injector is not the first of wells, opm should work well.

This commit is contained in:
Liu Ming
2015-05-20 12:35:04 +08:00
parent 825d4a1609
commit f8baad5d91

View File

@@ -165,12 +165,13 @@ namespace Opm
int wix = 0;
for (; wix < wells.number_of_wells; ++wix) {
map_it = wellPolymerRate_.find(wells.name[wix]);
if (map_it == wellPolymerRate_.end()) {
OPM_THROW(std::runtime_error, "Could not find a match for well from WPOLYMER.");
} else {
if (map_it != wellPolymerRate_.end()) {
break;
}
}
if (wix == wells.number_of_wells) {
OPM_THROW(std::runtime_error, "Could not find a match for well from WPOLYMER.");
}
for (int j = wells.well_connpos[wix]; j < wells.well_connpos[wix+1]; ++j) {
const int perf_cell = wells.well_cells[j];
perfcell_conc[perf_cell] = map_it->second;