Merge pull request #919 from blattms/fixes-wells-with-perforations-in-overlap

Fixes well manager for wells crossing into cells that overlap.
This commit is contained in:
Atgeirr Flø Rasmussen 2015-10-28 13:23:35 +01:00
commit 8d327e9c67

View File

@ -128,7 +128,11 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
wellperf_data.resize(wells.size()); wellperf_data.resize(wells.size());
wells_on_proc.resize(wells.size(), 1); wells_on_proc.resize(wells.size(), 1);
int well_index = 0; // The well index on the current process.
// Note that some wells are deactivated as they live on the interior
// domain of another proccess. Therefore this might different from
// the index of the well according to the eclipse state
int well_index_on_proc = 0;
for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) { for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) {
WellConstPtr well = (*wellIter); WellConstPtr well = (*wellIter);
@ -198,7 +202,7 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
} }
pd.well_index *= wellPi; pd.well_index *= wellPi;
} }
wellperf_data[well_index].push_back(pd); wellperf_data[well_index_on_proc].push_back(pd);
} }
} else { } else {
++shut_completions_number; ++shut_completions_number;
@ -226,18 +230,19 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
// Check that the complete well is on this process // Check that the complete well is on this process
if ( sum_completions_on_proc < completionSet->size() ) if ( sum_completions_on_proc < completionSet->size() )
{ {
std::cout<< "Well "<< well->name() << " semms not be in " std::cout<< "Well "<< well->name() << " does not seem to be"
<< "completely in the disjoint partition of " << "completely in the disjoint partition of "
<< "process deactivating here." << std::endl; << "process. Therefore we deactivate it here." << std::endl;
// Mark well as not existent on this process // Mark well as not existent on this process
wells_on_proc[wellIter-wells.begin()] = 0; wells_on_proc[wellIter-wells.begin()] = 0;
wellperf_data[well_index_on_proc].clear();
continue; continue;
} }
} }
} }
} }
{ // WELSPECS handling { // WELSPECS handling
well_names_to_index[well->name()] = well_index; well_names_to_index[well->name()] = well_index_on_proc;
well_names.push_back(well->name()); well_names.push_back(well->name());
{ {
WellData wd; WellData wd;
@ -253,7 +258,7 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
} }
} }
well_index++; well_index_on_proc++;
} }
// Set up reference depths that were defaulted. Count perfs. // Set up reference depths that were defaulted. Count perfs.