www.mooseframework.org
SimpleSplitCHWRes.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "SimpleSplitCHWRes.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<Kernel>();
14  params.addClassDescription(
15  "Gradient energy for split Cahn-Hilliard equation with constant Mobility");
16  params.addParam<MaterialPropertyName>(
17  "mob_name", "M", "The mobility used with the kernel, should be a constant value");
18  return params;
19 }
20 
21 SimpleSplitCHWRes::SimpleSplitCHWRes(const InputParameters & parameters)
22  : Kernel(parameters), _M(getMaterialProperty<Real>("mob_name"))
23 {
24 }
25 
26 Real
28 {
29  return _M[_qp] * _grad_u[_qp] * _grad_test[_i][_qp];
30 }
31 
32 Real
34 {
35  return _M[_qp] * _grad_phi[_j][_qp] * _grad_test[_i][_qp];
36 }
SimpleSplitCHWRes(const InputParameters &parameters)
virtual Real computeQpResidual()
InputParameters validParams< SimpleSplitCHWRes >()
virtual Real computeQpJacobian()
const MaterialProperty< Real > & _M
Mobility.