Line data Source code
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 "ADFunctionNeumannBC.h" 11 : 12 : #include "Function.h" 13 : 14 : registerMooseObject("MooseApp", ADFunctionNeumannBC); 15 : 16 : InputParameters 17 14892 : ADFunctionNeumannBC::validParams() 18 : { 19 14892 : InputParameters params = ADIntegratedBC::validParams(); 20 14892 : params.addRequiredParam<FunctionName>("function", "The function."); 21 14892 : params.addClassDescription("Imposes the integrated boundary condition " 22 : "$\\frac{\\partial u}{\\partial n}=h(t,\\vec{x})$, " 23 : "where $h$ is a (possibly) time and space-dependent MOOSE Function."); 24 14892 : return params; 25 0 : } 26 : 27 327 : ADFunctionNeumannBC::ADFunctionNeumannBC(const InputParameters & parameters) 28 327 : : ADIntegratedBC(parameters), _func(getFunction("function")) 29 : { 30 327 : } 31 : 32 : ADReal 33 356952 : ADFunctionNeumannBC::computeQpResidual() 34 : { 35 713904 : return -_test[_i][_qp] * _func.value(_t, _q_point[_qp]); 36 : }