mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
WellsManager(): Support grids that do not define "global_cell"
Assume that the "global_cell" in that case corresponds to the identity mapping.
This commit is contained in:
parent
c0d43a69bd
commit
43bb6eac78
@ -250,9 +250,17 @@ namespace Opm
|
||||
const int* global_cell = grid.global_cell;
|
||||
const int* cpgdim = grid.cartdims;
|
||||
std::map<int,int> cartesian_to_compressed;
|
||||
|
||||
if (global_cell) {
|
||||
for (int i = 0; i < grid.number_of_cells; ++i) {
|
||||
cartesian_to_compressed.insert(std::make_pair(global_cell[i], i));
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < grid.number_of_cells; ++i) {
|
||||
cartesian_to_compressed.insert(std::make_pair(i, i));
|
||||
}
|
||||
}
|
||||
|
||||
// Get COMPDAT data
|
||||
const COMPDAT& compdat = deck.getCOMPDAT();
|
||||
|
Loading…
Reference in New Issue
Block a user