https://mooseframework.inl.gov
Loading...
Searching...
No Matches
RobinBC.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 "RobinBC.h"
11
14
15template <bool is_ad>
18{
20 params.addClassDescription("Imposes the Robin integrated boundary condition "
21 "$\\frac{\\partial u}{\\partial n}=u$.");
22 params.addParam<Real>(
23 "value",
24 0.0,
25 "Inhomogeneous value subtracted from the variable for Robin boundary condition.");
26 params.declareControllable("value");
27 params.addParam<Real>(
28 "coefficient", 1.0, "Coefficient multiplier for the Robin boundary condition term.");
29 return params;
30}
31
32template <bool is_ad>
34 : GenericIntegratedBC<is_ad>(parameters),
35 _value(this->template getParam<Real>("value")),
36 _coef(this->template getParam<Real>("coefficient"))
37{
38}
39
40template <bool is_ad>
43{
44 return _coef * _test[_i][_qp] * (_u[_qp] - _value);
45}
46
47template <bool is_ad>
48Real
50{
51 return _coef * _test[_i][_qp] * _phi[_j][_qp];
52}
53
54template class RobinBCTempl<false>;
55template class RobinBCTempl<true>;
Moose::GenericType< Real, is_ad > GenericReal
Definition MooseTypes.h:702
registerMooseObject("MooseApp", RobinBC)
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
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.
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.
virtual GenericReal< is_ad > computeQpResidual() override
Method for computing the residual at quadrature points.
Definition RobinBC.C:42
RobinBCTempl(const InputParameters &parameters)
Definition RobinBC.C:33
virtual Real computeQpJacobian() override
Method for computing the diagonal Jacobian at quadrature points.
Definition RobinBC.C:49
static InputParameters validParams()
Definition RobinBC.C:17