Use copy instead of processing eclipse data for duplicating grid.

Due to the nature of CpGrid (manages one shared pointer to the equil grid
and one the distributed grid) this should be faster as it only adjusts one
shared pointer.
This commit is contained in:
Markus Blatt 2017-01-17 12:19:40 +01:00
parent 0c8355d2ad
commit feb1687e45

View File

@ -226,12 +226,9 @@ protected:
// via EQUIL and one for the actual simulation. The reason is that the EQUIL code
// is allergic to distributed grids and the simulation grid is distributed before
// the initial condition is calculated.
equilGrid_ = new Dune::CpGrid();
equilGrid_->processEclipseFormat(this->eclState().getInputGrid(),
/*isPeriodic=*/false,
/*flipNormals=*/false,
/*clipZ=*/false,
porv);
// After loadbalance grid_ will contain a global and distribute view.
// equilGrid_being a shallow copy only the global view.
equilGrid_ = new Dune::CpGrid(*grid_);
equilCartesianIndexMapper_ = new CartesianIndexMapper(*equilGrid_);
}