https://mooseframework.inl.gov
CoupledVarNeumannBC.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 "IntegratedBC.h"
13 #include "ADIntegratedBC.h"
14 
15 template <bool is_ad>
16 using IntegratedBCParent = typename std::conditional<is_ad, ADIntegratedBC, IntegratedBC>::type;
17 
22 template <bool is_ad>
24 {
25 public:
27 
28  CoupledVarNeumannBCTempl(const InputParameters & parameters);
29 
30 protected:
31  virtual GenericReal<is_ad> computeQpResidual() override;
32 
35 
37  const unsigned int _coupled_num;
38 
40  const Real _coef;
41 
44 
50 };
51 
53 {
54 public:
56 
57 protected:
58  virtual Real computeQpOffDiagJacobian(const unsigned int jvar_num) override;
59 };
60 
Moose::GenericType< Real, is_ad > GenericReal
Definition: MooseTypes.h:648
const GenericVariableValue< is_ad > & _coupled_var
Variable providing the value of grad(u) on the boundary.
Implements a Neumann BC where grad(u)=_coupled_var on the boundary.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
CoupledVarNeumannBCTempl< true > ADCoupledVarNeumannBC
static InputParameters validParams()
virtual GenericReal< is_ad > computeQpResidual() override
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Definition: MooseTypes.h:662
virtual Real computeQpOffDiagJacobian(const unsigned int jvar_num) override
const Real _coef
A coefficient that is multiplied with the residual contribution.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const GenericVariableValue< is_ad > & _scale_factor
Scale factor.
const unsigned int _coupled_num
The identifying number of the coupled variable.
CoupledVarNeumannBCTempl(const InputParameters &parameters)
typename std::conditional< is_ad, ADIntegratedBC, IntegratedBC >::type IntegratedBCParent