diff --git a/opm/core/grid/GridHelpers.cpp b/opm/core/grid/GridHelpers.cpp index 85006cc3..03528a18 100644 --- a/opm/core/grid/GridHelpers.cpp +++ b/opm/core/grid/GridHelpers.cpp @@ -57,6 +57,17 @@ const double* beginCellCentroids(const UnstructuredGrid& grid) return grid.cell_centroids; } +double cellCenterDepth(const UnstructuredGrid& grid, int cell_index) +{ + double zz = 0.0; + for (int i=grid.cell_facepos[cell_index+1]-2; i CellCentroidTraits::IteratorType beginCellCentroids(const UnstructuredGrid& grid); + +/// \brief Get vertical position of cell center ("zcorn" average.) +/// \brief grid The grid. +/// \brief cell_index The index of the specific cell. +double cellCenterDepth(const UnstructuredGrid& grid, int cell_index); + + /// \brief Get a coordinate of a specific cell centroid. /// \brief grid The grid. /// \brief cell_index The index of the specific cell.