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 "VectorFunctionAux.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("MooseApp", VectorFunctionAux); 14 : 15 : InputParameters 16 14346 : VectorFunctionAux::validParams() 17 : { 18 14346 : InputParameters params = VectorAuxKernel::validParams(); 19 14346 : params.addClassDescription( 20 : "Auxiliary Kernel that creates and updates a vector field variable by " 21 : "sampling a Function object, via the vectorValue method, through space and time."); 22 14346 : params.addRequiredParam<FunctionName>("function", "The function to use as the value."); 23 14346 : return params; 24 0 : } 25 : 26 42 : VectorFunctionAux::VectorFunctionAux(const InputParameters & parameters) 27 42 : : VectorAuxKernel(parameters), _function(getFunction("function")) 28 : { 29 42 : } 30 : 31 : RealVectorValue 32 12231 : VectorFunctionAux::computeValue() 33 : { 34 12231 : if (isNodal()) 35 5031 : return _function.vectorValue(_t, *_current_node); 36 : else 37 7200 : return _function.vectorValue(_t, _q_point[_qp]); 38 : }