21 #ifndef _aspect_material_model_compositing_h 22 #define _aspect_material_model_compositing_h 34 namespace MaterialModel
103 bool is_compressible ()
const override;
122 copy_required_properties(
const unsigned int model_index,
137 std::vector<std::unique_ptr<Interface<dim>>>
models;
144 template <
typename TestType,
int dim>
151 if (Plugins::plugin_type_matches<TestType>(plugin))
155 if (
const auto *compositing =
158 const auto &submodel = compositing->get_model_for_property(property);
159 if (Plugins::plugin_type_matches<TestType>(submodel))
166 if (
const auto *reactive_fluid =
169 if (Plugins::plugin_type_matches<TestType>(reactive_fluid->get_base_model()))
180 template <
typename TestType,
int dim>
187 if (Plugins::plugin_type_matches<TestType>(plugin))
188 return Plugins::get_plugin_as_type<TestType>(plugin);
191 if (
const auto *compositing =
194 const auto &submodel = compositing->get_model_for_property(property);
195 return Plugins::get_plugin_as_type<TestType>(submodel);
199 if (
const auto *reactive_fluid =
201 return Plugins::get_plugin_as_type<TestType>(reactive_fluid->get_base_model());
204 ExcMessage(
"Could not find requested plugin type."));
206 return *
static_cast<const TestType *
>(
nullptr);
const TestType & get_material_model_matches_or_uses(const MaterialModel::Interface< dim > &plugin, const Property::MaterialProperty property)
bool material_model_matches_or_uses(const MaterialModel::Interface< dim > &plugin, const Property::MaterialProperty property)
std::vector< std::string > model_names
#define AssertThrow(cond, exc)
std::map< Property::MaterialProperty, unsigned int > model_property_map
void declare_parameters(ParameterHandler &prm)
std::vector< std::unique_ptr< Interface< dim > > > models
static ::ExceptionBase & ExcMessage(std::string arg1)