Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "SimpleSplitCHWRes.h" 11 : 12 : registerMooseObject("PhaseFieldApp", SimpleSplitCHWRes); 13 : 14 : InputParameters 15 15 : SimpleSplitCHWRes::validParams() 16 : { 17 15 : InputParameters params = Kernel::validParams(); 18 15 : params.addClassDescription("Gradient energy for split Cahn-Hilliard equation with constant " 19 : "Mobility for a coupled order parameter variable."); 20 30 : params.addParam<MaterialPropertyName>( 21 : "mob_name", "M", "The mobility used with the kernel, should be a constant value"); 22 15 : return params; 23 0 : } 24 : 25 8 : SimpleSplitCHWRes::SimpleSplitCHWRes(const InputParameters & parameters) 26 16 : : Kernel(parameters), _M(getMaterialProperty<Real>("mob_name")) 27 : { 28 8 : } 29 : 30 : Real 31 432000 : SimpleSplitCHWRes::computeQpResidual() 32 : { 33 432000 : return _M[_qp] * _grad_u[_qp] * _grad_test[_i][_qp]; 34 : } 35 : 36 : Real 37 1281600 : SimpleSplitCHWRes::computeQpJacobian() 38 : { 39 1281600 : return _M[_qp] * _grad_phi[_j][_qp] * _grad_test[_i][_qp]; 40 : }