[bugfix] Make initialization work in parallel for flow_ebos.

This commit is contained in:
Robert Kloefkorn 2016-11-22 16:36:40 +01:00
parent 1c2a2c417c
commit c5ca9649d7
2 changed files with 15 additions and 4 deletions

View File

@ -152,7 +152,7 @@ namespace Opm
asImpl().setupOutputWriter();
asImpl().setupLinearSolver();
asImpl().createSimulator();
// Run.
auto ret = asImpl().runSimulator();
@ -388,12 +388,12 @@ namespace Opm
// Setup OpmLog backend with output_dir.
// Setup OpmLog backend with output_dir.
void setupLogging()
{
std::string deck_filename = param_.get<std::string>("deck_filename");
// create logFile
using boost::filesystem::path;
using boost::filesystem::path;
path fpath(deck_filename);
std::string baseName;
std::ostringstream debugFileStream;

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);