From 6753e9ca31a442e3de91543dd152225d8d1e782b Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 25 Feb 2019 12:14:38 +0100 Subject: [PATCH] aquifers: add missing serialize() and deserialize() methods the original purpose of those is to provide a checkpoint/restart mechanism using an ad-hoc file format. They might also be useful for implementing the adjoint functionality, though. --- opm/autodiff/BlackoilAquiferModel.hpp | 6 ++++++ opm/autodiff/BlackoilAquiferModel_impl.hpp | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/opm/autodiff/BlackoilAquiferModel.hpp b/opm/autodiff/BlackoilAquiferModel.hpp index 35037f6f9..b077bd4f9 100644 --- a/opm/autodiff/BlackoilAquiferModel.hpp +++ b/opm/autodiff/BlackoilAquiferModel.hpp @@ -60,6 +60,12 @@ namespace Opm { void endTimeStep(); void endEpisode(); + template + void serialize(Restarter& res); + + template + void deserialize(Restarter& res); + protected: // --------- Types --------- typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; diff --git a/opm/autodiff/BlackoilAquiferModel_impl.hpp b/opm/autodiff/BlackoilAquiferModel_impl.hpp index 9045fd6ae..4d74bfccd 100644 --- a/opm/autodiff/BlackoilAquiferModel_impl.hpp +++ b/opm/autodiff/BlackoilAquiferModel_impl.hpp @@ -106,6 +106,24 @@ namespace Opm { BlackoilAquiferModel::endEpisode() { } + template + template + void + BlackoilAquiferModel::serialize(Restarter& res) + { + // TODO (?) + throw std::logic_error("BlackoilAquiferModel::serialize() is not yet implemented"); + } + + template + template + void + BlackoilAquiferModel::deserialize(Restarter& res) + { + // TODO (?) + throw std::logic_error("BlackoilAquiferModel::deserialize() is not yet implemented"); + } + // Initialize the aquifers in the deck template void