43 int const geometry_dimension,
45 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters)
49 "SaturationWeightedThermalConductivity");
54 DBUG(
"Create SaturationWeightedThermalConductivity medium property");
56 std::string
const& dry_thermal_conductivity_parameter_name =
60 dry_thermal_conductivity_parameter_name, parameters, 0,
nullptr);
62 std::string
const& wet_thermal_conductivity_parameter_name =
66 wet_thermal_conductivity_parameter_name, parameters, 0,
nullptr);
68 std::string
const& mean_type_str =
72 const std::map<std::string, MeanType> mean_type_map{
77 mean_type_map, mean_type_str,
78 "Specified mean type for the thermal conductivity could not be found.");
81 std::pair<MeanType, int>,
82 std::unique_ptr<Property> (*)(
87 map_dim_and_mean_to_creator;
92 using Dims = mp_list<mp_int<1>, mp_int<2>, mp_int<3>>;
93 using Means = mp_list<
94 std::integral_constant<MeanType, MeanType::ARITHMETIC_LINEAR>,
95 std::integral_constant<MeanType, MeanType::ARITHMETIC_SQUAREROOT>,
96 std::integral_constant<MeanType, MeanType::GEOMETRIC>>;
97 using DimsAndMeanTypes =
98 mp_product<mp_list, Dims,
101 mp_for_each<DimsAndMeanTypes>(
102 [&map_dim_and_mean_to_creator]<
typename Dim,
typename Mean>(
105 map_dim_and_mean_to_creator.emplace(
106 std::pair{Mean::value, Dim::value},
112 auto const it = map_dim_and_mean_to_creator.find(
113 std::pair{mean_type, geometry_dimension});
115 if (it == map_dim_and_mean_to_creator.end())
118 "Cannot create a SaturationWeightedThermalConductivity model for "
119 "dimension {} and mean type {}",
120 geometry_dimension, mean_type_str);
123 auto* creator = it->second;
124 return creator(std::move(property_name),
125 dry_thermal_conductivity,
126 wet_thermal_conductivity);
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase > > const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)