35 int const geometry_dimension,
37 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>& parameters)
41 "SaturationWeightedThermalConductivity");
46 DBUG(
"Create SaturationWeightedThermalConductivity medium property");
48 auto& dry_thermal_conductivity =
51 config, parameters, property_name,
"dry_thermal_conductivity",
54 auto& wet_thermal_conductivity =
57 config, parameters, property_name,
"wet_thermal_conductivity",
60 std::string
const& mean_type_str =
64 const std::map<std::string, MeanType> mean_type_map{
69 mean_type_map, mean_type_str,
70 "Specified mean type for the thermal conductivity could not be found.");
73 std::pair<MeanType, int>,
74 std::unique_ptr<Property> (*)(
79 map_dim_and_mean_to_creator;
84 using Dims = mp_list<mp_int<1>, mp_int<2>, mp_int<3>>;
85 using Means = mp_list<
86 std::integral_constant<MeanType, MeanType::ARITHMETIC_LINEAR>,
87 std::integral_constant<MeanType, MeanType::ARITHMETIC_SQUAREROOT>,
88 std::integral_constant<MeanType, MeanType::GEOMETRIC>>;
89 using DimsAndMeanTypes =
90 mp_product<mp_list, Dims,
93 mp_for_each<DimsAndMeanTypes>(
94 [&map_dim_and_mean_to_creator]<
typename Dim,
typename Mean>(
97 map_dim_and_mean_to_creator.emplace(
98 std::pair{Mean::value, Dim::value},
104 auto const it = map_dim_and_mean_to_creator.find(
105 std::pair{mean_type, geometry_dimension});
107 if (it == map_dim_and_mean_to_creator.end())
110 "Cannot create a SaturationWeightedThermalConductivity model for "
111 "dimension {} and mean type {}",
112 geometry_dimension, mean_type_str);
115 auto* creator = it->second;
116 return creator(std::move(property_name),
117 dry_thermal_conductivity,
118 wet_thermal_conductivity);
Parameter< double > & getNamedOrCreateInlineParameter(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterBase > > ¶meters, std::string const &property_name, std::string const &tag_name, std::string const &inline_suffix)