www.mooseframework.org
CoefCoupledTimeDerivative.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<CoupledTimeDerivative>();
19  params.addClassDescription("Scaled time derivative Kernel that acts on a coupled variable");
20  params.addRequiredParam<Real>("coef", "Coefficient");
21  return params;
22 }
23 
24 CoefCoupledTimeDerivative::CoefCoupledTimeDerivative(const InputParameters & parameters)
25  : CoupledTimeDerivative(parameters), _coef(getParam<Real>("coef"))
26 {
27 }
28 
29 Real
31 {
32  return CoupledTimeDerivative::computeQpResidual() * _coef;
33 }
34 
35 Real
37 {
38  return CoupledTimeDerivative::computeQpOffDiagJacobian(jvar) * _coef;
39 }
CoefCoupledTimeDerivative.h
CoefCoupledTimeDerivative::CoefCoupledTimeDerivative
CoefCoupledTimeDerivative(const InputParameters &parameters)
Definition: CoefCoupledTimeDerivative.C:24
CoefCoupledTimeDerivative::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: CoefCoupledTimeDerivative.C:36
CoefCoupledTimeDerivative::_coef
const Real _coef
Definition: CoefCoupledTimeDerivative.h:33
registerMooseObject
registerMooseObject("PhaseFieldApp", CoefCoupledTimeDerivative)
CoefCoupledTimeDerivative
This calculates the time derivative for a coupled variable multiplied by a scalar coefficient.
Definition: CoefCoupledTimeDerivative.h:24
validParams< CoefCoupledTimeDerivative >
InputParameters validParams< CoefCoupledTimeDerivative >()
Definition: CoefCoupledTimeDerivative.C:16
CoefCoupledTimeDerivative::computeQpResidual
virtual Real computeQpResidual()
Definition: CoefCoupledTimeDerivative.C:30