www.mooseframework.org
MatchedValueBC.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "GenericNodalBC.h"
13 
17 template <bool is_ad>
18 class MatchedValueBCTempl : public GenericNodalBC<is_ad>
19 {
20 public:
22 
24 
25 protected:
26  virtual GenericReal<is_ad> computeQpResidual() override;
27  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
28 
30 
32  unsigned int _v_num;
33 
36 
37 private:
39  const Real _u_coeff;
41  const Real _v_coeff;
42 };
43 
static InputParameters validParams()
typename Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Definition: MooseTypes.h:573
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _v_num
The id of the coupled variable.
virtual GenericReal< is_ad > computeQpResidual() override
MatchedValueBCTempl(const InputParameters &parameters)
usingGenericNodalBCMembers
General members.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Implements a simple coupled boundary condition where u=v on the boundary.
const GenericVariableValue< is_ad > & _v
const Real _v_coeff
Coefficient for coupled variable.
const InputParameters & parameters() const
Get the parameters of the object.
const Real _u_coeff
Coefficient for primary variable.
typename Moose::GenericType< Real, is_ad > GenericReal
Definition: MooseTypes.h:559
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
This is the virtual that derived classes should override for computing an off-diagonal jacobian compo...