BlackoilMICPModules: fix field prop copy if Scalar is float

This commit is contained in:
Arne Morten Kvarving 2024-04-11 08:52:56 +02:00
parent fa610b49a3
commit 43fafc1ada

View File

@ -127,7 +127,13 @@ public:
MICPpara.getMaximumUreaConcentration(),
MICPpara.getToleranceBeforeClogging());
// obtain the porosity for the clamp in the blackoilnewtonmethod
params_.phi_ = eclState.fieldProps().get_double("PORO");
if constexpr (std::is_same_v<Scalar, float>) {
const auto phi = eclState.fieldProps().get_double("PORO");
params_.phi_.resize(phi.size());
std::copy(phi.begin(), phi.end(), params_.phi_.begin());
} else {
params_.phi_ = eclState.fieldProps().get_double("PORO");
}
}
#endif