only calculate ACTNUM on root-process

This commit is contained in:
Arne Morten Kvarving
2020-01-22 15:47:42 +01:00
parent d91155738f
commit 39492fdaf4

View File

@@ -278,23 +278,11 @@ protected:
{
equilGrid_.reset(new Dune::CpGrid(*grid_));
equilCartesianIndexMapper_.reset(new CartesianIndexMapper(*equilGrid_));
std::vector<int> actnum = Opm::UgGridHelpers::createACTNUM(*grid_);
auto &field_props = this->eclState().fieldProps();
const_cast<FieldPropsManager&>(field_props).reset_actnum(actnum);
}
std::vector<int> actnum;
unsigned long actnum_size;
if (mpiRank == 0) {
actnum = Opm::UgGridHelpers::createACTNUM(*grid_);
actnum_size = actnum.size();
}
grid_->comm().broadcast(&actnum_size, 1, 0);
if (mpiRank != 0)
actnum.resize( actnum_size );
grid_->comm().broadcast(actnum.data(), actnum_size, 0);
auto & field_props = this->eclState().fieldProps();
const_cast<FieldPropsManager&>(field_props).reset_actnum(actnum);
}
// removing some connection located in inactive grid cells