From dcbd1c7baf1a475bf1238be98d991c5fa39fd449 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 12 Apr 2024 17:06:27 +0200 Subject: [PATCH] BlackoilWellModelGeneric: convert input data to appropriate Scalar type --- opm/simulators/wells/BlackoilWellModelGeneric.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/opm/simulators/wells/BlackoilWellModelGeneric.cpp b/opm/simulators/wells/BlackoilWellModelGeneric.cpp index f78f634a0..a26e0a053 100644 --- a/opm/simulators/wells/BlackoilWellModelGeneric.cpp +++ b/opm/simulators/wells/BlackoilWellModelGeneric.cpp @@ -117,7 +117,13 @@ BlackoilWellModelGeneric(Schedule& schedule, const auto& node_pressures = eclState.getRestartNetworkPressures(); if (node_pressures.has_value()) { - this->node_pressures_ = node_pressures.value(); + if constexpr (std::is_same_v) { + this->node_pressures_ = node_pressures.value(); + } else { + for (const auto& it : node_pressures.value()) { + this->node_pressures_[it.first] = it.second; + } + } } }