39 const unsigned int qp) = 0;
55 params.
addRequiredParam<MaterialPropertyName>(
"property",
"The material property name");
56 params.
addParam<MaterialPropertyName>(
"property_neighbor",
"The neighbor material property name");
58 "Computes the interface material property value or rate across an interface. The value or " 59 "rate is computed according to the provided interface_value_type parameter.");
67 _prop(getMaterialProperty<T>(
"property")),
68 _prop_neighbor(parameters.isParamSetByUser(
"property_neighbor")
69 ? getNeighborMaterialProperty<T>(
"property_neighbor")
70 : getNeighborMaterialProperty<T>(
"property")),
71 _prop_old(_value_type > 0 ? &getMaterialPropertyOld<T>(
"property") : nullptr),
72 _prop_neighbor_old(_value_type > 0
73 ? ((parameters.isParamSetByUser(
"property_neighbor")
74 ? &getNeighborMaterialPropertyOld<T>(
"property_neighbor")
75 : &getNeighborMaterialPropertyOld<T>(
"property")))
84 Real value_primary = 0;
85 Real value_secondary = 0;
89 value_primary = computeScalarMaterialProperty(&_prop, qp);
90 value_secondary = computeScalarMaterialProperty(&_prop_neighbor, qp);
92 else if (_value_type == 1)
96 value_primary = (computeScalarMaterialProperty(&_prop, qp) -
97 computeScalarMaterialProperty(_prop_old, qp)) /
99 value_secondary = (computeScalarMaterialProperty(&_prop_neighbor, qp) -
100 computeScalarMaterialProperty(_prop_neighbor_old, qp)) /
104 else if (_value_type == 2)
107 (computeScalarMaterialProperty(&_prop, qp) - computeScalarMaterialProperty(_prop_old, qp));
108 value_secondary = (computeScalarMaterialProperty(&_prop_neighbor, qp) -
109 computeScalarMaterialProperty(_prop_neighbor_old, qp));
112 mooseError(
"InterfaceQpMaterialPropertyBaseUserObject::computeRealValue the supplied " 113 "value type has not been implemented");
115 return computeInterfaceValueType(value_primary, value_secondary);
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
const MaterialProperty< T > & _prop
the material property and neighbor material property current and old value
InterfaceQpMaterialPropertyBaseUserObject(const InputParameters ¶meters)
Class constructor.
This is a base class for userobjects collecting values of variables or material properites across an ...
virtual ~InterfaceQpMaterialPropertyBaseUserObject()
virtual Real computeRealValue(const unsigned int qp) override final
method defining the scalar value computation given a scalar material property value ...
static InputParameters validParams()
virtual Real computeScalarMaterialProperty(const MaterialProperty< T > *, const unsigned int qp)=0
method returning a scalar material property value given a generic T type
Specialization of InterfaceQpUserObjectBase for material properties.
const MaterialProperty< T > *const _prop_neighbor_old
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
const MaterialProperty< T > & _prop_neighbor
const MaterialProperty< T > *const _prop_old