[bugfix] Make initialization work in parallel for flow_ebos.

This commit is contained in:
Robert Kloefkorn
2016-12-01 16:50:31 +01:00
parent 1c2a2c417c
commit c5ca9649d7
2 changed files with 15 additions and 4 deletions
+12 -1
View File
@@ -128,7 +128,18 @@ namespace Opm
void setupGridAndProps()
{
Dune::CpGrid& grid = ebosSimulator_->gridManager().grid();
Base::material_law_manager_ = ebosSimulator_->problem().materialLawManager();
//Base::material_law_manager_ = ebosSimulator_->problem().materialLawManager();
grid.switchToGlobalView();
// Create material law manager.
std::vector<int> compressedToCartesianIdx;
Opm::createGlobalCellArray(grid, compressedToCartesianIdx);
material_law_manager_.reset(new MaterialLawManager());
material_law_manager_->initFromDeck(*deck_, *eclipse_state_, compressedToCartesianIdx);
grid_init_.reset(new GridInit<Grid>());
grid_init_->setGrid(grid);