19 params.addCoupledVar(
"temperature", 20.0,
"Fluid temperature variable");
20 params.addPrivateParam<std::string>(
"pf_material_type",
"temperature");
21 params.addClassDescription(
"Material to provide temperature at the quadpoints or nodes and "
22 "derivatives of it with respect to the PorousFlow variables");
29 _num_pf_vars(_dictator.numVariables()),
30 _temperature_var(_nodal_material ? coupledDofValues(
"temperature")
31 : coupledValue(
"temperature")),
32 _grad_temperature_var(_nodal_material ? nullptr : &coupledGradient(
"temperature")),
33 _temperature_is_PF(_dictator.isPorousFlowVariable(coupled(
"temperature"))),
34 _t_var_num(_temperature_is_PF ? _dictator.porousFlowVariableNum(coupled(
"temperature")) : 0),
36 _temperature(_nodal_material ? declareProperty<Real>(
"PorousFlow_temperature_nodal")
37 : declareProperty<Real>(
"PorousFlow_temperature_qp")),
39 _nodal_material ? declareProperty<std::vector<Real>>(
"dPorousFlow_temperature_nodal_dvar")
40 : declareProperty<std::vector<Real>>(
"dPorousFlow_temperature_qp_dvar")),
41 _grad_temperature(_nodal_material
43 : &declareProperty<
RealGradient>(
"PorousFlow_grad_temperature_qp")),
44 _dgrad_temperature_dgradv(_nodal_material ? nullptr
45 : &declareProperty<std::vector<Real>>(
46 "dPorousFlow_grad_temperature_qp_dgradvar")),
47 _dgrad_temperature_dv(_nodal_material ? nullptr
49 "dPorousFlow_grad_temperature_qp_dvar"))
70 (*_grad_temperature)[_qp] = (*_grad_temperature_var)[_qp];
71 (*_dgrad_temperature_dgradv)[_qp].assign(
_num_pf_vars, 0.0);
74 (*_dgrad_temperature_dgradv)[_qp][
_t_var_num] = 1.0;