https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Reaction.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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#pragma once
11
12#include "GenericKernel.h"
13
17template <bool is_ad>
18class ReactionTempl : public GenericKernel<is_ad>
19{
20public:
22
24
25protected:
26 virtual GenericReal<is_ad> computeQpResidual() override;
27 virtual Real computeQpJacobian() override;
28
30 const Real & _rate;
31
33};
34
Moose::GenericType< Real, is_ad > GenericReal
Definition MooseTypes.h:698
ReactionTempl< true > ADReaction
Definition Reaction.h:36
ReactionTempl< false > Reaction
Definition Reaction.h:35
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Implements a simple consuming reaction term with weak form $(\psi_i, \lambda u_h)$.
Definition Reaction.h:19
const Real & _rate
Scalar coefficient representing the relative amount consumed per unit time.
Definition Reaction.h:30
virtual GenericReal< is_ad > computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
Definition Reaction.C:36
static InputParameters validParams()
Definition Reaction.C:17
virtual Real computeQpJacobian() override
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
Definition Reaction.C:43
usingGenericKernelMembers
Definition Reaction.h:32