https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CoefReaction.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 "Reaction.h"
13
14template <bool is_ad>
15class CoefReactionTempl : public ReactionTempl<is_ad>
16{
17public:
19
21
22protected:
23 virtual GenericReal<is_ad> computeQpResidual() override;
24 virtual Real computeQpJacobian() override;
25
27 const Real _coef;
28
29 using ReactionTempl<is_ad>::_test;
30 using ReactionTempl<is_ad>::_i;
31 using ReactionTempl<is_ad>::_qp;
32 using ReactionTempl<is_ad>::_rate;
33 using ReactionTempl<is_ad>::_phi;
34 using ReactionTempl<is_ad>::_j;
35};
36
CoefReactionTempl< true > ADCoefReaction
CoefReactionTempl< false > CoefReaction
Moose::GenericType< Real, is_ad > GenericReal
Definition MooseTypes.h:698
const Real _coef
input parameter multiplied by the reaction kernel
static InputParameters validParams()
virtual GenericReal< is_ad > computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
virtual Real computeQpJacobian() override
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
unsigned int _qp
The current quadrature point index.
Definition KernelBase.h:43
unsigned int _j
current index for the shape function
Definition KernelBase.h:61
unsigned int _i
current index for the test function
Definition KernelBase.h:58
const VariablePhiValue & _phi
the current shape functions
Definition Kernel.h:81
const VariableTestValue & _test
the current test function
Definition Kernel.h:75
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