17 FVPropValPerSubdomainMaterial,
21 FVADPropValPerSubdomainMaterial,
30 params.addClassDescription(
"Computes a property value on a per-subdomain basis");
32 params.template addRequiredParam<MooseFunctorName>(
"prop_name",
33 "The name of the property to declare");
34 params.template addRequiredParam<std::map<std::string, std::string>>(
35 "subdomain_to_prop_value",
36 "Map from subdomain to property value. The value may be a constant" 37 " or any kind of functor (functions, variables, functor material properties)");
48 for (
const auto & map_pr :
49 getParam<std::map<std::string, std::string>>(
"subdomain_to_prop_value"))
51 const auto &
name = map_pr.second;
52 const auto & functor = getFunctor<T>(
name);
53 addFunctorPropertyByBlocks<T>(
55 [&functor](
const auto & r,
const auto & t) -> T {
return functor(r, t); },
static InputParameters validParams()
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the set values in the enum.
static InputParameters validParams()
MooseEnumIterator end() const
PiecewiseByBlockFunctorMaterialTempl(const InputParameters ¶meters)
registerMooseObjectRenamed("MooseApp", FVPropValPerSubdomainMaterial, "06/30/2022 24:00", PiecewiseByBlockFunctorMaterial)
virtual const std::string & name() const
Get the name of the class.
Defines a functor material property by another functor (possibly constant) on each block...
FunctorMaterials compute functor material properties.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
const ExecFlagEnum & _execute_enum
Execute settings for this object.
registerMooseObject("MooseApp", PiecewiseByBlockFunctorMaterial)
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.