www.mooseframework.org
CoefReaction.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 #include "CoefReaction.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<Reaction>();
14  params.addClassDescription("Implements the residual term (p*u, test)");
15  params.addRequiredParam<Real>("coefficient", "Coefficient of the term");
16  return params;
17 }
18 
19 CoefReaction::CoefReaction(const InputParameters & parameters)
20  : Reaction(parameters), _coef(getParam<Real>("coefficient"))
21 {
22 }
23 
24 Real
26 {
27  return _coef * Reaction::computeQpResidual();
28 }
29 
30 Real
32 {
33  return _coef * Reaction::computeQpJacobian();
34 }
virtual Real computeQpResidual() override
Definition: CoefReaction.C:25
CoefReaction(const InputParameters &parameters)
Definition: CoefReaction.C:19
virtual Real computeQpJacobian() override
Definition: CoefReaction.C:31
const Real _coef
input parameter multiplied by the reaction kernel
Definition: CoefReaction.h:28
InputParameters validParams< CoefReaction >()
Definition: CoefReaction.C:11