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 "FunctionElementIntegral.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("MooseApp", FunctionElementIntegral); 14 : 15 : InputParameters 16 29142 : FunctionElementIntegral::validParams() 17 : { 18 29142 : InputParameters params = ElementIntegralPostprocessor::validParams(); 19 : 20 29142 : params.addRequiredParam<FunctionName>("function", "Name of function to integrate"); 21 : 22 29142 : params.addClassDescription("Integrates a function over elements"); 23 : 24 29142 : return params; 25 0 : } 26 : 27 319 : FunctionElementIntegral::FunctionElementIntegral(const InputParameters & parameters) 28 319 : : ElementIntegralPostprocessor(parameters), _function(getFunction("function")) 29 : { 30 319 : } 31 : 32 : Real 33 25058 : FunctionElementIntegral::computeQpIntegral() 34 : { 35 25058 : return _function.value(_t, _q_point[_qp]); 36 : }