20 "List of aux variables that the material property depends upon");
22 "slopes",
"Slopes of the material property with respect to each aux variable");
23 params.
addParam<Real>(
"shift", 0,
"Shift constant: 'b' in 'y = m * x + b'");
24 params.
addRequiredParam<MaterialPropertyName>(
"name",
"Name of the new material property");
31 _n_vars(coupledComponents(
"vars")),
32 _slopes(getParam<
std::vector<Real>>(
"slopes")),
33 _shift(getParam<Real>(
"shift")),
34 _y_name(getParam<MaterialPropertyName>(
"name")),
35 _y(declareProperty<Real>(_y_name))
40 "LinearTestMaterial:",
name(),
": Parameters 'vars' and 'slopes' must have same size.");
45 for (
unsigned int i = 0; i <
_n_vars; ++i)
47 _vars[i] = &coupledValue(
"vars", i);
48 if (!isCoupledConstant(
"vars"))
57 for (
unsigned int i = 0; i <
_n_vars; ++i)
registerMooseObject("ThermalHydraulicsTestApp", LinearTestMaterial)
void mooseError(Args &&... args)
Computes a material property that is linear with respect to a list of aux variables.
const Real _shift
Shift constant: 'b' in 'y = m * x + b'.
std::vector< MaterialProperty< Real > * > _y_derivatives
Derivatives of material property with respect to each aux variable.
std::vector< const VariableValue * > _vars
List of aux variables the material property depends upon.
static InputParameters validParams()
const std::vector< Real > _slopes
Slopes with respect to the nonlinear variables.
virtual void computeQpProperties()
MaterialProperty< Real > & _y
Linear material property.
LinearTestMaterial(const InputParameters ¶meters)
const MaterialPropertyName _y_name
Name of the new material property.
const unsigned int _n_vars
Number of aux variables the material property depends upon.
static InputParameters validParams()