Commit 16155a27 authored by Timo Koch's avatar Timo Koch

Merge branch 'fix/load-balacing-cpgrids' into 'master'

[cpgrid] Fix loadBalance for cpgrids

See merge request !1488

(cherry picked from commit fd2985e8)

31bdfba0 [cpgrid] Fix loadBalance for cpgrids
parent 80d36646
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#define DUMUX_IO_GRID_CPGRIDMANAGER_HH #define DUMUX_IO_GRID_CPGRIDMANAGER_HH
#if HAVE_OPM_GRID #if HAVE_OPM_GRID
#include <dune/common/parallel/mpihelper.hh>
#include <opm/grid/CpGrid.hpp> #include <opm/grid/CpGrid.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp> #include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp> #include <opm/parser/eclipse/Parser/ParseContext.hpp>
...@@ -54,6 +56,7 @@ public: ...@@ -54,6 +56,7 @@ public:
Opm::EclipseGrid eclGrid(*deck_); Opm::EclipseGrid eclGrid(*deck_);
grid_ = std::make_shared<Grid>(); grid_ = std::make_shared<Grid>();
grid_->processEclipseFormat(eclGrid, false, false); grid_->processEclipseFormat(eclGrid, false, false);
loadBalance();
} }
/*! /*!
...@@ -79,7 +82,7 @@ public: ...@@ -79,7 +82,7 @@ public:
*/ */
void loadBalance() void loadBalance()
{ {
if (grid_->comm().size() > 1) if (Dune::MPIHelper::getCollectiveCommunication().size() > 1)
grid_->loadBalance(); grid_->loadBalance();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment