https://mooseframework.inl.gov
Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CoupledVarNeumannBC Class Reference

#include <CoupledVarNeumannBC.h>

Inheritance diagram for CoupledVarNeumannBC:
[legend]

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeQpOffDiagJacobian (const unsigned int jvar_num) override
 
virtual GenericReal< is_ad > computeQpResidual () override
 

Protected Attributes

const GenericVariableValue< is_ad > & _coupled_var
 Variable providing the value of grad(u) on the boundary. More...
 
const unsigned int _coupled_num
 The identifying number of the coupled variable. More...
 
const Real _coef
 A coefficient that is multiplied with the residual contribution. More...
 
const GenericVariableValue< is_ad > & _scale_factor
 Scale factor. More...
 

Detailed Description

Definition at line 52 of file CoupledVarNeumannBC.h.

Member Function Documentation

◆ computeQpOffDiagJacobian()

Real CoupledVarNeumannBC::computeQpOffDiagJacobian ( const unsigned int  jvar_num)
overrideprotectedvirtual

Definition at line 47 of file CoupledVarNeumannBC.C.

48 {
49  if (jvar == _coupled_num)
50  return -_scale_factor[_qp] * _coef * _test[_i][_qp] * _phi[_j][_qp];
51  else
52  return 0;
53 }
const Real _coef
A coefficient that is multiplied with the residual contribution.
const GenericVariableValue< is_ad > & _scale_factor
Scale factor.
const unsigned int _coupled_num
The identifying number of the coupled variable.

◆ computeQpResidual()

GenericReal< is_ad > CoupledVarNeumannBCTempl< is_ad >::computeQpResidual ( )
overrideprotectedvirtualinherited

Definition at line 41 of file CoupledVarNeumannBC.C.

42 {
43  return -_scale_factor[_qp] * _coef * _test[_i][_qp] * _coupled_var[_qp];
44 }
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.
const GenericVariableValue< is_ad > & _scale_factor
Scale factor.

◆ validParams()

InputParameters CoupledVarNeumannBCTempl< is_ad >::validParams ( )
staticinherited

Definition at line 17 of file CoupledVarNeumannBC.C.

18 {
20  params.addRequiredCoupledVar("v", "Coupled variable setting the gradient on the boundary.");
21  params.addCoupledVar("scale_factor", 1., "Scale factor to multiply the heat flux with");
22  params.addParam<Real>(
23  "coef", 1.0, "Coefficent ($\\sigma$) multiplier for the coupled force term.");
24  params.addClassDescription("Imposes the integrated boundary condition "
25  "$\\frac{\\partial u}{\\partial n}=v$, "
26  "where $v$ is a variable.");
27  return params;
28 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams()
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...

Member Data Documentation

◆ _coef

const Real CoupledVarNeumannBCTempl< is_ad >::_coef
protectedinherited

A coefficient that is multiplied with the residual contribution.

Definition at line 40 of file CoupledVarNeumannBC.h.

Referenced by computeQpOffDiagJacobian().

◆ _coupled_num

const unsigned int CoupledVarNeumannBCTempl< is_ad >::_coupled_num
protectedinherited

The identifying number of the coupled variable.

Definition at line 37 of file CoupledVarNeumannBC.h.

Referenced by computeQpOffDiagJacobian().

◆ _coupled_var

const GenericVariableValue<is_ad>& CoupledVarNeumannBCTempl< is_ad >::_coupled_var
protectedinherited

Variable providing the value of grad(u) on the boundary.

Definition at line 34 of file CoupledVarNeumannBC.h.

◆ _scale_factor

const GenericVariableValue<is_ad>& CoupledVarNeumannBCTempl< is_ad >::_scale_factor
protectedinherited

Scale factor.

Definition at line 43 of file CoupledVarNeumannBC.h.

Referenced by computeQpOffDiagJacobian().


The documentation for this class was generated from the following files: