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 "WeakGradientBC.h" 11 : 12 : registerMooseObject("MooseApp", WeakGradientBC); 13 : 14 : InputParameters 15 14315 : WeakGradientBC::validParams() 16 : { 17 14315 : InputParameters params = IntegratedBC::validParams(); 18 14315 : params.addClassDescription( 19 : "Computes a boundary residual contribution consistent with the Diffusion Kernel. " 20 : "Does not impose a boundary condition; instead computes the boundary " 21 : "contribution corresponding to the current value of grad(u) and accumulates " 22 : "it in the residual vector."); 23 14315 : return params; 24 0 : } 25 : 26 26 : WeakGradientBC::WeakGradientBC(const InputParameters & parameters) : IntegratedBC(parameters) {} 27 : 28 : Real 29 321600 : WeakGradientBC::computeQpResidual() 30 : { 31 321600 : return (_grad_u[_qp] * _normals[_qp]) * _test[_i][_qp]; 32 : } 33 : 34 : Real 35 102400 : WeakGradientBC::computeQpJacobian() 36 : { 37 102400 : return (_grad_phi[_j][_qp] * _normals[_qp]) * _test[_i][_qp]; 38 : }