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 "MassEigenKernel.h" 11 : 12 : registerMooseObject("MooseApp", MassEigenKernel); 13 : 14 : InputParameters 15 14627 : MassEigenKernel::validParams() 16 : { 17 14627 : InputParameters params = EigenKernel::validParams(); 18 14627 : params.addClassDescription( 19 : "An eigenkernel with weak form $\\lambda(\\psi_i, -u_h \\times coeff)$ where " 20 : "$\\lambda$ is the eigenvalue."); 21 14627 : params.addParam<Real>("coefficient", 1.0, "Coefficient multiplying the term"); 22 14627 : return params; 23 0 : } 24 : 25 237 : MassEigenKernel::MassEigenKernel(const InputParameters & parameters) 26 237 : : EigenKernel(parameters), _coef(this->template getParam<Real>("coefficient")) 27 : { 28 237 : } 29 : 30 : Real 31 9290784 : MassEigenKernel::computeQpResidual() 32 : { 33 9290784 : return -_coef * _u[_qp] * _test[_i][_qp]; 34 : } 35 : 36 : Real 37 779136 : MassEigenKernel::computeQpJacobian() 38 : { 39 779136 : return -_coef * _phi[_j][_qp] * _test[_i][_qp]; 40 : }