www.mooseframework.org
Reaction.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "Reaction.h"
16 
17 template <>
20 {
22  params.addClassDescription(
23  "Implements a simple consuming reaction term with weak form $(\\psi_i, u_h)$.");
24  return params;
25 }
26 
27 Reaction::Reaction(const InputParameters & parameters) : Kernel(parameters) {}
28 
29 Real
31 {
32  return _test[_i][_qp] * _u[_qp];
33 }
34 
35 Real
37 {
38  return _test[_i][_qp] * _phi[_j][_qp];
39 }
const VariableTestValue & _test
the current test function
Definition: KernelBase.h:152
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Reaction(const InputParameters &parameters)
Definition: Reaction.C:27
InputParameters validParams< Reaction >()
Definition: Reaction.C:19
unsigned int _i
current index for the test function
Definition: KernelBase.h:146
const VariablePhiValue & _phi
the current shape functions
Definition: KernelBase.h:158
unsigned int _j
current index for the shape function
Definition: KernelBase.h:149
InputParameters validParams< Kernel >()
Definition: Kernel.C:30
Definition: Kernel.h:25
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
virtual Real computeQpResidual() override
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: Reaction.C:30
virtual Real computeQpJacobian() override
Compute this Kernel&#39;s contribution to the Jacobian at the current quadrature point.
Definition: Reaction.C:36
const VariableValue & _u
Holds the solution at current quadrature points.
Definition: Kernel.h:51
unsigned int _qp
The current quadrature point index.
Definition: KernelBase.h:131