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