diff --git a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp index 0715d1741..542581541 100644 --- a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp +++ b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -470,36 +471,6 @@ namespace Opm return cell_to_func_.empty() ? satfuncset_[0] : satfuncset_[cell_to_func_[cell]]; } -namespace -{ - - template - const T* increment(T* cc, int i, int dim) - { - return cc+(i*dim); - } - - template - T increment(const T& t, int i, int) - { - return t+i; - } - - template - double getCoordinate(T* cc, int i) - { - return cc[i]; - } - - template - double getCoordinate(T t, int i) - { - return (*t)[i]; - } - - -} - // Initialize saturation scaling parameter template @@ -1002,7 +973,9 @@ namespace if (table[itab][jtab][0] != -1.0) { std::vector& depth = table[0][jtab]; std::vector& val = table[itab][jtab]; - double zc = getCoordinate(increment(begin_cell_centroid, cell, dimensions), + double zc = UgGridHelpers + ::getCoordinate(UgGridHelpers::increment(begin_cell_centroid, cell, + dimensions), dimensions-1); if (zc >= depth.front() && zc <= depth.back()) { //don't want extrap outside depth interval scaleparam[cell] = linearInterpolation(depth, val, zc);