55 _mob_name(getParam<MaterialPropertyName>(
"mob_name")),
56 _mob(getMaterialProperty<T>(
"mob_name")),
57 _is_coupled(isCoupled(
"w")),
58 _w_var(_is_coupled ? coupled(
"w") : _var.number()),
59 _grad_w(_is_coupled ? coupledGradient(
"w") : _grad_u),
63 for (
unsigned int i = 0; i <
_n_args; ++i)
71 return _mob[_qp] * _grad_w[_qp] * _grad_test[_i][_qp];
78 return (_is_coupled && _w_var != _var.number()) ? 0.0 : computeQpWJacobian();
85 return _mob[_qp] * _grad_phi[_j][_qp] * _grad_test[_i][_qp];
94 return computeQpWJacobian();
97 const unsigned int cvar = mapJvarToCvar(jvar);
99 return (*_dmobdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_w[_qp] * _grad_test[_i][_qp];
102 template <
typename T>
108 "Split formulation Cahn-Hilliard Kernel for the chemical potential variable");
109 params.
addParam<MaterialPropertyName>(
"mob_name",
"mobtemp",
"The mobility used with the kernel");
110 params.
addCoupledVar(
"args",
"Vector of variable arguments of the mobility");
113 "w",
"Coupled chemical potential (if not specified kernel variable will be used)");
OutputTools< Real >::VariableGradient VariableGradient
static InputParameters validParams()
SplitCHWResBase(const InputParameters ¶meters)
virtual Real computeQpResidual()
SplitCHWresBase implements the residual for the chemical potential in the split form of the Cahn-Hill...
const MaterialProperty< T > & _mob
virtual Real computeQpWJacobian()
static InputParameters validParams()
virtual Real computeQpJacobian()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const bool _is_coupled
is the kernel used in a coupled form?
const InputParameters & parameters() const
unsigned int _w_var
int label for the chemical potential
const unsigned int _n_args
const MaterialPropertyName _mob_name
const VariableGradient & _grad_w
Variable value for the chemical potential.
std::vector< const MaterialProperty< T > * > _dmobdarg
derivatives of the mobility