48 std::vector<const MaterialProperty<T> *>
_dDdarg;
67 "The name of the diffusivity",
68 "This parameter has been renamed to 'diffusivity', which is more mnemonic and more conducive " 69 "to passing a number literal");
70 params.
addParam<MaterialPropertyName>(
71 "diffusivity",
"D",
"The diffusivity value or material property");
73 "Optional vector of arguments for the diffusivity. If provided and " 74 "diffusivity is a derivative parsed material, Jacobian contributions from " 75 "the diffusivity will be automatically computed");
78 "Coupled concentration variable for kernel to operate on; if this " 79 "is not specified, the kernel's nonlinear variable will be used as " 87 _D(isParamValid(
"D_name") ? getMaterialProperty<T>(
"D_name")
88 : getMaterialProperty<T>(
"diffusivity")),
89 _dDdc(getMaterialPropertyDerivative<T>(isParamValid(
"D_name") ?
"D_name" :
"diffusivity",
91 _dDdarg(_coupled_moose_vars.size()),
92 _is_coupled(isCoupled(
"v")),
93 _v_var(_is_coupled ? coupled(
"v") : (isCoupled(
"conc") ? coupled(
"conc") : _var.number())),
94 _grad_v(_is_coupled ? coupledGradient(
"v")
95 : (isCoupled(
"conc") ? coupledGradient(
"conc") : _grad_u))
99 mooseDeprecated(
"In '",
name(),
"' the parameter 'conc' is deprecated, please use 'v' instead");
102 for (
unsigned int i = 0; i <
_dDdarg.size(); ++i)
103 _dDdarg[i] = &getMaterialPropertyDerivative<T>(
107 template <
typename T>
111 validateNonlinearCoupling<Real>(parameters().isParamSetByUser(
"D_name") ?
"D_name" 115 template <
typename T>
119 return _D[_qp] * _grad_v[_qp] * _grad_test[_i][_qp];
122 template <
typename T>
126 Real sum = _phi[_j][_qp] * _dDdc[_qp] * _grad_v[_qp] * _grad_test[_i][_qp];
128 sum += computeQpCJacobian();
133 template <
typename T>
138 const unsigned int cvar = mapJvarToCvar(jvar);
140 Real sum = (*_dDdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_v[_qp] * _grad_test[_i][_qp];
142 sum += computeQpCJacobian();
147 template <
typename T>
151 return _D[_qp] * _grad_phi[_j][_qp] * _grad_test[_i][_qp];
std::string name(const ElemQuality q)
OutputTools< Real >::VariableGradient VariableGradient
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled as name.
const MaterialProperty< T > & _D
diffusion coefficient
const MaterialProperty< T > & _dDdc
diffusion coefficient derivative w.r.t. the kernel variable
static InputParameters validParams()
void mooseDeprecated(Args &&... args) const
virtual Real computeQpJacobian() override
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
virtual Real computeQpCJacobian()
std::vector< const MaterialProperty< T > * > _dDdarg
diffusion coefficient derivatives w.r.t. coupled variables
Interface class ("Veneer") for Kernel to provide a mapping from 'jvar' in computeQpOffDiagJacobian in...
virtual const std::string & name() const
Get the name of the class.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
const VariableGradient & _grad_v
Gradient of the concentration.
virtual Real computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
MatDiffusionBase(const InputParameters ¶meters)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
For coupling standard variables.
static InputParameters validParams()
This class template implements a diffusion kernel with a mobility that can vary spatially and can dep...
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Interface class ("Veneer") to provide generator methods for derivative material property names...
const InputParameters & parameters() const
Get the parameters of the object.
const bool _is_coupled
is the kernel used in a coupled form?
unsigned int _v_var
int label for the Concentration