mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Disregard non-active cells when writing MPI_RANK in writeInitial.
This saves space and it is allowed and recommended (spacewise) to use integer arrays with only values for active cells in writeInitial.
This commit is contained in:
@@ -818,11 +818,9 @@ namespace Opm
|
||||
using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>;
|
||||
using Handle = CellOwnerDataHandle<ElementMapper>;
|
||||
ElementMapper globalMapper(this->globalGrid().leafGridView());
|
||||
const auto* dims = UgGridHelpers::cartDims(grid());
|
||||
const auto globalSize = dims[0]*dims[1]*dims[2];
|
||||
const auto globalSize = this->globalGrid().size(0);
|
||||
std::vector<int> ranks(globalSize, -1);
|
||||
Handle handle(globalMapper, ranks,
|
||||
this->globalGrid().globalCell());
|
||||
Handle handle(globalMapper, ranks);
|
||||
this->grid().gatherData(handle);
|
||||
integerVectors.emplace("MPI_RANK", ranks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user