From a6fb099fbb81077f6ba24203719de62657a93bb3 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 13 Mar 2014 15:41:59 +0100 Subject: [PATCH] Fixed SaturationPropsFromDeck::initEPSKey for new parser and non-UG There the cell_centroids where still treated like double*. This patch uses the UgGridHelpers instead. --- opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp index 54d716da..47108ef2 100644 --- a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp +++ b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp @@ -1180,14 +1180,15 @@ namespace Opm else newParserDeck.getENKRVD().write(std::cout); */ - const double* cc = begin_cell_centroid; const int dim = dimensions; for (int cell = 0; cell < number_of_cells; ++cell) { int jtab = cell_to_func_.empty() ? 0 : cell_to_func_[cell]; if (table[itab][jtab][0] != -1.0) { std::vector& depth = table[0][jtab]; std::vector& val = table[itab][jtab]; - double zc = cc[dim*cell+dim-1]; + double zc = UgGridHelpers + ::getCoordinate(UgGridHelpers::increment(begin_cell_centroid, cell, dim), + dim-1); if (zc >= depth.front() && zc <= depth.back()) { //don't want extrap outside depth interval scaleparam[cell] = linearInterpolation(depth, val, zc); }