www.mooseframework.org
CoefTimeDerivative.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 /****************************************************************/
7 
8 #include "CoefTimeDerivative.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<TimeDerivative>();
15  params.addParam<Real>("Coefficient", 1, "The coefficient for the time derivative kernel");
16  return params;
17 }
18 
19 CoefTimeDerivative::CoefTimeDerivative(const InputParameters & parameters)
20  : TimeDerivative(parameters), _coef(getParam<Real>("Coefficient"))
21 {
22 }
23 
24 Real
26 {
27  // We're reusing the TimeDerivative Kernel's residual
28  // so that we don't have to recode that.
29  return _coef * TimeDerivative::computeQpResidual();
30 }
31 
32 Real
34 {
35  return _coef * TimeDerivative::computeQpJacobian();
36 }
InputParameters validParams< CoefTimeDerivative >()
validParams returns the parameters that this Kernel accepts / needs The actual body of the function M...
virtual Real computeQpResidual()
Real _coef
This MooseArray will hold the reference we need to our material property from the Material class...
virtual Real computeQpJacobian()
CoefTimeDerivative(const InputParameters &parameters)