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 "Diffusion.h" 11 : 12 : registerMooseObject("MooseApp", Diffusion); 13 : 14 : InputParameters 15 126088 : Diffusion::validParams() 16 : { 17 126088 : InputParameters params = Kernel::validParams(); 18 126088 : params.addClassDescription("The Laplacian operator ($-\\nabla \\cdot \\nabla u$), with the weak " 19 : "form of $(\\nabla \\phi_i, \\nabla u_h)$."); 20 126088 : return params; 21 0 : } 22 : 23 35651 : Diffusion::Diffusion(const InputParameters & parameters) : Kernel(parameters) {} 24 : 25 : Real 26 5422840570 : Diffusion::computeQpResidual() 27 : { 28 5422840570 : return _grad_u[_qp] * _grad_test[_i][_qp]; 29 : } 30 : 31 : Real 32 5310093499 : Diffusion::computeQpJacobian() 33 : { 34 5310093499 : return _grad_phi[_j][_qp] * _grad_test[_i][_qp]; 35 : }