21 typedef RealVectorValue
type;
50 std::vector<const MaterialProperty<typename GradientType<T>::type> *>
_dDdgradeta;
66 "Name of the order parameter for solid-pore surface. For use when diffusivity "
67 "depends on these OP gradients, leave this parameter un-set otherwise. ");
69 "grain_op_vars",
"var_name_base",
"op_num",
"Array of grain order parameter variables");
71 "add_grain_op_gradients",
73 "Whether grain order parameter gradient contributions are added to Jacobian.");
80 _op_num(this->coupledComponents(
"grain_op_vars")),
81 _dDdgradc(this->template getMaterialPropertyDerivative<typename
GradientType<
T>::type>(
82 this->isParamValid(
"D_name") ?
"D_name" :
"diffusivity",
"gradc")),
84 _surface_op_var(this->isCoupled(
"surface_op_var") ? this->coupled(
"surface_op_var")
86 _add_grain_op_gradients(this->template getParam<bool>(
"add_grain_op_gradients"))
89 for (
unsigned int j = 0; j <
_op_num; ++j)
92 this->isParamValid(
"D_name") ?
"D_name" :
"diffusivity",
101 if (jvar == _surface_op_var)
102 sum += _dDdgradc[this->_qp] * this->_grad_phi[this->_j][this->_qp] * this->_grad_v[this->_qp] *
103 this->_grad_test[this->_i][this->_qp];
105 if (_add_grain_op_gradients)
107 for (
unsigned int k = 0; k < _op_num; ++k)
108 if (jvar == this->coupled(
"grain_op_vars", k))
109 sum += (*_dDdgradeta[k])[this->_qp] * this->_grad_phi[this->_j][this->_qp] *
110 this->_grad_v[this->_qp] * this->_grad_test[this->_i][this->_qp];
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative(const std::string &base, const std::vector< VariableName > &c)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
static InputParameters validParams()
static InputParameters validParams()
const bool _add_grain_op_gradients
Variable to allow user to control whether grain OP gradient contributions are added to Jacobian.
std::vector< const MaterialProperty< typename GradientType< T >::type > * > _dDdgradeta
unsigned int _surface_op_var
For solid-pore systems, mame of the order parameter identifies the solid-pore surface.
const MaterialProperty< typename GradientType< T >::type > & _dDdgradc
diffusion coefficient derivatives w.r.t. variables that have explicit dependence on gradients
const unsigned int _op_num
Number of grain order parameters for cases where there is dependence on grain OP gradients.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
PolycrystalMatDiffusionBase(const InputParameters ¶meters)
std::string stringify(const T &t)
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...