From ce1e0691a8f1b54f19fb7457e3ab0c4c1bd3647a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 5 Dec 2019 13:41:05 +0100 Subject: [PATCH] Aquifer Restart: Address Review Comments Mostly 'throw'ing in the case of unsupported operations. While here, also remove an unused header. --- ebos/eclbaseaquifermodel.hh | 9 ++++++++- opm/simulators/aquifers/AquiferCarterTracy.hpp | 10 +++++++++- opm/simulators/aquifers/BlackoilAquiferModel.hpp | 1 - 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ebos/eclbaseaquifermodel.hh b/ebos/eclbaseaquifermodel.hh index 421a2cfb0..d204fbf21 100644 --- a/ebos/eclbaseaquifermodel.hh +++ b/ebos/eclbaseaquifermodel.hh @@ -31,6 +31,8 @@ #include +#include +#include #include BEGIN_PROPERTIES @@ -78,7 +80,12 @@ public: * volume from the model's aquifers. */ void initFromRestart(const std::vector& aquiferSoln OPM_UNUSED) - { } + { + throw std::logic_error { + "Initialization from restart data not supported " + "for base aquifer model" + }; + } /*! * \brief This method is called when a new episode (report step) starts. diff --git a/opm/simulators/aquifers/AquiferCarterTracy.hpp b/opm/simulators/aquifers/AquiferCarterTracy.hpp index 47d56da06..7aeb8bc78 100644 --- a/opm/simulators/aquifers/AquiferCarterTracy.hpp +++ b/opm/simulators/aquifers/AquiferCarterTracy.hpp @@ -25,6 +25,9 @@ #include +#include +#include + namespace Opm { @@ -148,7 +151,12 @@ namespace Opm } void assignRestartData(const data::AquiferData& /* xaq */) override - {} + { + throw std::runtime_error { + "Restart-based initialization not currently supported " + "for Carter-Tracey analytic aquifers" + }; + } inline void getInfluenceTableValues(Scalar& pitd, Scalar& pitd_prime, const Scalar& td) { diff --git a/opm/simulators/aquifers/BlackoilAquiferModel.hpp b/opm/simulators/aquifers/BlackoilAquiferModel.hpp index 97671f7af..19158f9c8 100644 --- a/opm/simulators/aquifers/BlackoilAquiferModel.hpp +++ b/opm/simulators/aquifers/BlackoilAquiferModel.hpp @@ -34,7 +34,6 @@ #include #include -#include #include