Merge pull request #5549 from akva2/actionhandler_float

ActionHandler: instance for float
This commit is contained in:
Bård Skaflestad 2024-08-21 09:22:13 +02:00 committed by GitHub
commit 5fd5027ebd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View File

@ -277,4 +277,8 @@ evalUDQAssignments(const unsigned episodeIdx,
template class ActionHandler<double>;
#if FLOW_INSTANTIATE_FLOAT
template class ActionHandler<float>;
#endif
} // namespace Opm

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;
}
}
}
}
@ -1862,4 +1868,8 @@ updateInjFCMult(DeferredLogger& deferred_logger)
template class BlackoilWellModelGeneric<double>;
#if FLOW_INSTANTIATE_FLOAT
template class BlackoilWellModelGeneric<float>;
#endif
}

View File

@ -269,4 +269,8 @@ loadRestartData(const data::Wells& rst_wells,
template class BlackoilWellModelRestart<double>;
#if FLOW_INSTANTIATE_FLOAT
template class BlackoilWellModelRestart<float>;
#endif
} // namespace Opm