From 84173e1cac5f42530e65bc61f11cb726a2d83cfb Mon Sep 17 00:00:00 2001 From: osae Date: Fri, 22 Aug 2014 15:36:07 +0200 Subject: [PATCH] Provide eclipse state to saturation property init. --- opm/core/props/IncompPropertiesFromDeck.cpp | 2 +- opm/core/props/satfunc/SaturationPropsFromDeck.hpp | 3 +++ opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/opm/core/props/IncompPropertiesFromDeck.cpp b/opm/core/props/IncompPropertiesFromDeck.cpp index b304a065e..98e6a8e1a 100644 --- a/opm/core/props/IncompPropertiesFromDeck.cpp +++ b/opm/core/props/IncompPropertiesFromDeck.cpp @@ -32,7 +32,7 @@ namespace Opm { rock_.init(eclState, grid.number_of_cells, grid.global_cell, grid.cartdims); pvt_.init(deck); - satprops_.init(deck, grid, 200); + satprops_.init(deck, eclState, grid, 200); if (pvt_.numPhases() != satprops_.numPhases()) { OPM_THROW(std::runtime_error, "IncompPropertiesFromDeck::IncompPropertiesFromDeck() - Inconsistent number of phases in pvt data (" << pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ")."); diff --git a/opm/core/props/satfunc/SaturationPropsFromDeck.hpp b/opm/core/props/satfunc/SaturationPropsFromDeck.hpp index 8db30ac3b..5282a8dd5 100644 --- a/opm/core/props/satfunc/SaturationPropsFromDeck.hpp +++ b/opm/core/props/satfunc/SaturationPropsFromDeck.hpp @@ -28,6 +28,7 @@ #include #include +#include #include @@ -59,6 +60,7 @@ namespace Opm /// \param[in] samples Number of uniform sample points for saturation tables. /// NOTE: samples will only be used with the SatFuncSetUniform template argument. void init(Opm::DeckConstPtr deck, + Opm::EclipseStateConstPtr eclState, const UnstructuredGrid& grid, const int samples); @@ -77,6 +79,7 @@ namespace Opm /// NOTE: samples will only be used with the SatFuncSetUniform template argument. template void init(Opm::DeckConstPtr deck, + Opm::EclipseStateConstPtr eclState, int number_of_cells, const int* global_cell, const T& begin_cell_centroids, diff --git a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp index 64cb7eaa0..684ef70ca 100644 --- a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp +++ b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp @@ -50,10 +50,11 @@ namespace Opm /// Initialize from deck. template void SaturationPropsFromDeck::init(Opm::DeckConstPtr deck, + Opm::EclipseStateConstPtr eclState, const UnstructuredGrid& grid, const int samples) { - this->init(deck, grid.number_of_cells, + this->init(deck, eclState, grid.number_of_cells, grid.global_cell, grid.cell_centroids, grid.dimensions, samples); } @@ -62,6 +63,7 @@ namespace Opm template template void SaturationPropsFromDeck::init(Opm::DeckConstPtr deck, + Opm::EclipseStateConstPtr eclState, int number_of_cells, const int* global_cell, const T& begin_cell_centroids,