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 "FunctionDirichletBC.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("MooseApp", FunctionDirichletBC); 14 : 15 : InputParameters 16 23259 : FunctionDirichletBC::validParams() 17 : { 18 23259 : InputParameters params = DirichletBCBase::validParams(); 19 23259 : params.addRequiredParam<FunctionName>("function", "The forcing function."); 20 23259 : params.addClassDescription( 21 : "Imposes the essential boundary condition $u=g(t,\\vec{x})$, where $g$ " 22 : "is a (possibly) time and space-dependent MOOSE Function."); 23 23259 : return params; 24 0 : } 25 : 26 4461 : FunctionDirichletBC::FunctionDirichletBC(const InputParameters & parameters) 27 4461 : : DirichletBCBase(parameters), _func(getFunction("function")) 28 : { 29 4461 : } 30 : 31 : Real 32 15512280 : FunctionDirichletBC::computeQpValue() 33 : { 34 15512280 : return _func.value(_t, *_current_node); 35 : }