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