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