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 "SimpleACInterface.h" 11 : 12 : registerMooseObject("PhaseFieldApp", SimpleACInterface); 13 : 14 : InputParameters 15 23 : SimpleACInterface::validParams() 16 : { 17 23 : InputParameters params = Kernel::validParams(); 18 23 : params.addClassDescription( 19 : "Gradient energy for Allen-Cahn Kernel with constant Mobility and Interfacial parameter"); 20 46 : params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel"); 21 46 : params.addParam<MaterialPropertyName>("kappa_name", "kappa_op", "The kappa used with the kernel"); 22 23 : return params; 23 0 : } 24 : 25 12 : SimpleACInterface::SimpleACInterface(const InputParameters & parameters) 26 : : Kernel(parameters), 27 12 : _L(getMaterialProperty<Real>("mob_name")), 28 36 : _kappa(getMaterialProperty<Real>("kappa_name")) 29 : { 30 12 : } 31 : 32 : Real 33 7782400 : SimpleACInterface::computeQpResidual() 34 : { 35 7782400 : return _grad_u[_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp]; 36 : } 37 : 38 : Real 39 6246400 : SimpleACInterface::computeQpJacobian() 40 : { 41 6246400 : return _grad_phi[_j][_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp]; 42 : }