Commit fd2985e8 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
parents 0952a1cb 31bdfba0
......@@ -25,6 +25,8 @@
#define DUMUX_IO_GRID_CPGRIDMANAGER_HH
#if HAVE_OPM_GRID
#include <dune/common/parallel/mpihelper.hh>
#include <opm/grid/CpGrid.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
......@@ -54,6 +56,7 @@ public:
Opm::EclipseGrid eclGrid(*deck_);
grid_ = std::make_shared<Grid>();
grid_->processEclipseFormat(eclGrid, false, false);
loadBalance();
}
/*!
......@@ -79,7 +82,7 @@ public:
*/
void loadBalance()
{
if (grid_->comm().size() > 1)
if (Dune::MPIHelper::getCollectiveCommunication().size() > 1)
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