www.mooseframework.org
CoefCoupledTimeDerivative.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<CoupledTimeDerivative>();
14  params.addClassDescription("Scaled time derivative Kernel that acts on a coupled variable");
15  params.addRequiredParam<Real>("coef", "Coefficient");
16  return params;
17 }
18 
19 CoefCoupledTimeDerivative::CoefCoupledTimeDerivative(const InputParameters & parameters)
20  : CoupledTimeDerivative(parameters), _coef(getParam<Real>("coef"))
21 {
22 }
23 
24 Real
26 {
27  return CoupledTimeDerivative::computeQpResidual() * _coef;
28 }
29 
30 Real
32 {
33  return CoupledTimeDerivative::computeQpOffDiagJacobian(jvar) * _coef;
34 }
InputParameters validParams< CoefCoupledTimeDerivative >()
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
CoefCoupledTimeDerivative(const InputParameters &parameters)