mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-23 01:36:25 -06:00
Merge pull request #1356 from dr-robertk/PR/fix-minor-issue-gridview
[bugfix] make code compile when GridView is not Grid::LeafGridView.
This commit is contained in:
commit
65034250d1
@ -481,7 +481,7 @@ namespace Opm
|
|||||||
|
|
||||||
const SummaryConfig& summaryConfig() const
|
const SummaryConfig& summaryConfig() const
|
||||||
{ return ebosSimulator_->gridManager().summaryConfig(); }
|
{ return ebosSimulator_->gridManager().summaryConfig(); }
|
||||||
|
|
||||||
// Initialise the reservoir state. Updated fluid props for SWATINIT.
|
// Initialise the reservoir state. Updated fluid props for SWATINIT.
|
||||||
// Writes to:
|
// Writes to:
|
||||||
// state_
|
// state_
|
||||||
@ -827,11 +827,14 @@ namespace Opm
|
|||||||
|
|
||||||
if( output && output_ecl && grid().comm().size() > 1 )
|
if( output && output_ecl && grid().comm().size() > 1 )
|
||||||
{
|
{
|
||||||
|
typedef typename Grid::LeafGridView GridView;
|
||||||
|
using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>;
|
||||||
// Get the owner rank number for each cell
|
// Get the owner rank number for each cell
|
||||||
using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>;
|
|
||||||
using Handle = CellOwnerDataHandle<ElementMapper>;
|
using Handle = CellOwnerDataHandle<ElementMapper>;
|
||||||
ElementMapper globalMapper(this->globalGrid().leafGridView());
|
const Grid& globalGrid = this->globalGrid();
|
||||||
const auto globalSize = this->globalGrid().size(0);
|
const auto& globalGridView = globalGrid.leafGridView();
|
||||||
|
ElementMapper globalMapper(globalGridView);
|
||||||
|
const auto globalSize = globalGrid.size(0);
|
||||||
std::vector<int> ranks(globalSize, -1);
|
std::vector<int> ranks(globalSize, -1);
|
||||||
Handle handle(globalMapper, ranks);
|
Handle handle(globalMapper, ranks);
|
||||||
this->grid().gatherData(handle);
|
this->grid().gatherData(handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user