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 "CoefTimeDerivative.h" 11 : 12 : registerMooseObject("MooseApp", CoefTimeDerivative); 13 : 14 : InputParameters 15 15057 : CoefTimeDerivative::validParams() 16 : { 17 15057 : InputParameters params = TimeDerivative::validParams(); 18 15057 : params.addParam<Real>("Coefficient", 1, "The coefficient for the time derivative kernel"); 19 15057 : return params; 20 0 : } 21 : 22 411 : CoefTimeDerivative::CoefTimeDerivative(const InputParameters & parameters) 23 411 : : TimeDerivative(parameters), _coef(getParam<Real>("Coefficient")) 24 : { 25 411 : } 26 : 27 : Real 28 205473280 : CoefTimeDerivative::computeQpResidual() 29 : { 30 205473280 : return _coef * TimeDerivative::computeQpResidual(); 31 : } 32 : 33 : Real 34 121648640 : CoefTimeDerivative::computeQpJacobian() 35 : { 36 121648640 : return _coef * TimeDerivative::computeQpJacobian(); 37 : }