BlackoilWellModelGeneric: convert input data to appropriate Scalar type

This commit is contained in:
Arne Morten Kvarving 2024-04-12 17:06:27 +02:00
parent 62daa16304
commit dcbd1c7baf

View File

@ -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<Scalar,double>) {
this->node_pressures_ = node_pressures.value();
} else {
for (const auto& it : node_pressures.value()) {
this->node_pressures_[it.first] = it.second;
}
}
}
}