https://mooseframework.inl.gov
MatNeumannBC.C
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 #include "MatNeumannBC.h"
11 
14 
15 template <bool is_ad>
18 {
20 
21  params.addClassDescription("Imposes the integrated boundary condition "
22  "$\\frac{C \\partial u}{\\partial n}=M*h$, "
23  "where $h$ is a constant, $M$ is a material property, and $C$ is a "
24  "coefficient defined by the kernel for $u$.");
25  params.addRequiredParam<MaterialPropertyName>(
26  "boundary_material",
27  "Material property multiplying the constant that will be enforced by the BC");
28  return params;
29 }
30 
31 template <bool is_ad>
33  : NeumannBCTempl<is_ad>(parameters),
34  _boundary_prop(this->template getGenericMaterialProperty<Real, is_ad>("boundary_material"))
35 {
36 }
37 
38 template <bool is_ad>
41 {
42  return -_test[_i][_qp] * _value * _boundary_prop[_qp];
43 }
Moose::GenericType< Real, is_ad > GenericReal
Definition: MooseTypes.h:648
virtual GenericReal< is_ad > computeQpResidual() override
Method for computing the residual at quadrature points.
Definition: MatNeumannBC.C:40
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Implements a simple constant Neumann BC where grad(u)=value on the boundary.
Definition: NeumannBC.h:19
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
static InputParameters validParams()
Definition: MatNeumannBC.C:17
static InputParameters validParams()
Definition: NeumannBC.C:17
registerMooseObject("MooseApp", MatNeumannBC)
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...
MatNeumannBCTempl(const InputParameters &parameters)
Definition: MatNeumannBC.C:32
Implements a Neumann BC where D grad(u) = value * M on the boundary, where value is a constant and M ...
Definition: MatNeumannBC.h:20