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 "CoefCoupledTimeDerivative.h" 11 : 12 : registerMooseObject("PhaseFieldApp", CoefCoupledTimeDerivative); 13 : 14 : InputParameters 15 40 : CoefCoupledTimeDerivative::validParams() 16 : { 17 40 : InputParameters params = CoupledTimeDerivative::validParams(); 18 40 : params.addClassDescription("Scaled time derivative Kernel that acts on a coupled variable"); 19 80 : params.addRequiredParam<Real>("coef", "Coefficient"); 20 40 : return params; 21 0 : } 22 : 23 21 : CoefCoupledTimeDerivative::CoefCoupledTimeDerivative(const InputParameters & parameters) 24 42 : : CoupledTimeDerivative(parameters), _coef(getParam<Real>("coef")) 25 : { 26 21 : } 27 : 28 : Real 29 9797632 : CoefCoupledTimeDerivative::computeQpResidual() 30 : { 31 9797632 : return CoupledTimeDerivative::computeQpResidual() * _coef; 32 : } 33 : 34 : Real 35 12124160 : CoefCoupledTimeDerivative::computeQpOffDiagJacobian(unsigned int jvar) 36 : { 37 12124160 : return CoupledTimeDerivative::computeQpOffDiagJacobian(jvar) * _coef; 38 : }