avoid dereferencing eclGrid and FieldProps on non-root processes setting up grids

these only used on root process in any case
This commit is contained in:
Arne Morten Kvarving 2020-01-22 15:39:19 +01:00
parent e2862a3a4d
commit d91155738f

View File

@ -258,13 +258,14 @@ public:
protected: protected:
void createGrids_() void createGrids_()
{ {
const auto& porv = this->eclState().fieldProps().porv(true);
grid_.reset(new Dune::CpGrid()); grid_.reset(new Dune::CpGrid());
grid_->processEclipseFormat(&(this->eclState().getInputGrid()), grid_->processEclipseFormat(mpiRank == 0 ? &this->eclState().getInputGrid()
: nullptr,
/*isPeriodic=*/false, /*isPeriodic=*/false,
/*flipNormals=*/false, /*flipNormals=*/false,
/*clipZ=*/false, /*clipZ=*/false,
porv, mpiRank == 0 ? this->eclState().fieldProps().porv(true)
: std::vector<double>(),
this->eclState().getInputNNC()); this->eclState().getInputNNC());
// we use separate grid objects: one for the calculation of the initial condition // we use separate grid objects: one for the calculation of the initial condition