Use generic function instead of UnstructuredGrid interface.

This commit is contained in:
Atgeirr Flø Rasmussen 2015-04-13 10:37:23 +02:00
parent e2a920b1fe
commit f82df94d2e

View File

@ -216,11 +216,12 @@ namespace Opm
int numCells = Opm::AutoDiffGrid::numCells(grid); int numCells = Opm::AutoDiffGrid::numCells(grid);
const int* global_cell = Opm::UgGridHelpers::globalCell(grid); const int* global_cell = Opm::UgGridHelpers::globalCell(grid);
const int* cartdims = Opm::UgGridHelpers::cartDims(grid);
EclipseGridConstPtr eclgrid = eclState->getEclipseGrid(); EclipseGridConstPtr eclgrid = eclState->getEclipseGrid();
std::vector<double> porv = eclState->getDoubleGridProperty("PORV")->getData(); std::vector<double> porv = eclState->getDoubleGridProperty("PORV")->getData();
for (int cellIdx = 0; cellIdx < numCells; ++cellIdx) { for (int cellIdx = 0; cellIdx < numCells; ++cellIdx) {
const int nx = grid.cartdims[0]; const int nx = cartdims[0];
const int ny = grid.cartdims[1]; const int ny = cartdims[1];
const int cartesianCellIdx = global_cell[cellIdx]; const int cartesianCellIdx = global_cell[cellIdx];
const double cellVolume = eclgrid->getCellVolume(cartesianCellIdx); const double cellVolume = eclgrid->getCellVolume(cartesianCellIdx);