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 "ODECoefTimeDerivative.h" 11 : 12 : registerMooseObject("ThermalHydraulicsApp", ODECoefTimeDerivative); 13 : 14 : InputParameters 15 36 : ODECoefTimeDerivative::validParams() 16 : { 17 36 : InputParameters params = ODETimeDerivative::validParams(); 18 72 : params.addRequiredParam<Real>("coef", "The coefficient multiplying the time derivative term"); 19 72 : params.addClassDescription("Time derivative term multiplied by a coefficient - used by ODEs."); 20 72 : params.declareControllable("coef"); 21 36 : return params; 22 0 : } 23 : 24 18 : ODECoefTimeDerivative::ODECoefTimeDerivative(const InputParameters & parameters) 25 36 : : ODETimeDerivative(parameters), _coef(getParam<Real>("coef")) 26 : { 27 18 : } 28 : 29 : Real 30 320 : ODECoefTimeDerivative::computeQpResidual() 31 : { 32 320 : return _coef * ODETimeDerivative::computeQpResidual(); 33 : } 34 : 35 : Real 36 80 : ODECoefTimeDerivative::computeQpJacobian() 37 : { 38 80 : return _coef * ODETimeDerivative::computeQpJacobian(); 39 : }