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 "ForcingFunctionAux.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("MooseApp", ForcingFunctionAux); 14 : 15 : InputParameters 16 14290 : ForcingFunctionAux::validParams() 17 : { 18 14290 : InputParameters params = FunctionAux::validParams(); 19 14290 : params.addClassDescription("Auxiliary Kernel that adds a forcing function to the value of an " 20 : "AuxVariable from the previous time step."); 21 14290 : return params; 22 0 : } 23 : 24 13 : ForcingFunctionAux::ForcingFunctionAux(const InputParameters & parameters) 25 13 : : FunctionAux(parameters), _u_old(uOld()) 26 : { 27 13 : if (isNodal()) 28 0 : paramError("variable", "The variable must be elemental"); 29 13 : } 30 : 31 : Real 32 12800 : ForcingFunctionAux::computeValue() 33 : { 34 12800 : return _u_old[_qp] + _dt * _func.value(_t, _q_point[_qp]); 35 : }