From 5bcca58d3129f4d92790cafb9c3d179ca9a650f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Tue, 4 Mar 2014 13:09:23 +0100 Subject: [PATCH] Make BlackoilPropsAdInterface pure virtual again. Done by adding (throwing) implementation to BlackoilPropsAd class. --- opm/autodiff/BlackoilPropsAd.cpp | 11 +++++++++++ opm/autodiff/BlackoilPropsAd.hpp | 4 ++++ opm/autodiff/BlackoilPropsAdInterface.hpp | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/opm/autodiff/BlackoilPropsAd.cpp b/opm/autodiff/BlackoilPropsAd.cpp index e88e52b2d..3371c5ae0 100644 --- a/opm/autodiff/BlackoilPropsAd.cpp +++ b/opm/autodiff/BlackoilPropsAd.cpp @@ -817,5 +817,16 @@ namespace Opm return adbCapPressures; } + + + /// Saturation update for hysteresis behavior. + /// \param[in] cells Array of n cell indices to be associated with the saturation values. + void BlackoilPropsAd::updateSatHyst(const std::vector& /* saturation */, + const std::vector& /* cells */) + { + OPM_THROW(std::logic_error, "BlackoilPropsAd class does not support hysteresis."); + } + + } // namespace Opm diff --git a/opm/autodiff/BlackoilPropsAd.hpp b/opm/autodiff/BlackoilPropsAd.hpp index 00fc6d523..5a8f35e98 100644 --- a/opm/autodiff/BlackoilPropsAd.hpp +++ b/opm/autodiff/BlackoilPropsAd.hpp @@ -316,6 +316,10 @@ namespace Opm const ADB& sg, const Cells& cells) const; + /// Saturation update for hysteresis behavior. + /// \param[in] cells Array of n cell indices to be associated with the saturation values. + void updateSatHyst(const std::vector& saturation, + const std::vector& cells); private: const BlackoilPropertiesInterface& props_; PhaseUsage pu_; diff --git a/opm/autodiff/BlackoilPropsAdInterface.hpp b/opm/autodiff/BlackoilPropsAdInterface.hpp index 74845ba47..d86560543 100644 --- a/opm/autodiff/BlackoilPropsAdInterface.hpp +++ b/opm/autodiff/BlackoilPropsAdInterface.hpp @@ -320,7 +320,7 @@ namespace Opm /// \param[in] cells Array of n cell indices to be associated with the saturation values. virtual void updateSatHyst(const std::vector& saturation, - const std::vector& cells) {assert(false); } // Please implement me ... + const std::vector& cells) = 0; }; } // namespace Opm