make has_polymermw constexpr and use if constexpr to eliminate code

This commit is contained in:
Arne Morten Kvarving
2021-05-14 21:49:47 +02:00
parent dd04eb128a
commit 268201eeb1
2 changed files with 141 additions and 121 deletions

View File

@@ -111,7 +111,7 @@ namespace Opm
static const bool has_energy = getPropValue<TypeTag, Properties::EnableEnergy>();
static const bool has_temperature = getPropValue<TypeTag, Properties::EnableTemperature>();
// flag for polymer molecular weight related
static const bool has_polymermw = getPropValue<TypeTag, Properties::EnablePolymerMW>();
static constexpr bool has_polymermw = getPropValue<TypeTag, Properties::EnablePolymerMW>();
static constexpr bool has_foam = getPropValue<TypeTag, Properties::EnableFoam>();
static constexpr bool has_brine = getPropValue<TypeTag, Properties::EnableBrine>();
static const int contiSolventEqIdx = Indices::contiSolventEqIdx;