Only use connections in the interior for distributed wells.

This commit is contained in:
Markus Blatt 2020-11-10 11:54:19 +01:00
parent 91e951420f
commit 6eb835c98e
2 changed files with 10 additions and 1 deletions

View File

@ -281,6 +281,8 @@ namespace Opm {
std::vector<WellInterfacePtr > well_container_;
// map from logically cartesian cell indices to compressed ones
// cells not in the interior are not mapped. This deactivates
// these for distributed wells and make the distribution non-overlapping.
std::vector<int> cartesian_to_compressed_;
std::vector<bool> is_cell_perforated_;

View File

@ -1606,8 +1606,15 @@ namespace Opm {
{
cartesian_to_compressed_.resize(number_of_cartesian_cells, -1);
if (global_cell) {
auto elemIt = ebosSimulator_.gridView().template begin</*codim=*/ 0>();
for (unsigned i = 0; i < local_num_cells_; ++i) {
cartesian_to_compressed_[global_cell[i]] = i;
// Skip perforations in the overlap/ghost for distributed wells.
if (elemIt->partitionType() == Dune::InteriorEntity)
{
assert(ebosSimulator_.gridView().indexSet().index(*elemIt) == static_cast<int>(i));
cartesian_to_compressed_[global_cell[i]] = i;
}
++elemIt;
}
}
else {