LCOV - code coverage report
Current view: top level - src/userobjects - ElementIntegralFunctorUserObject.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 4 12 33.3 %
Date: 2025-07-17 01:28:37 Functions: 1 3 33.3 %
Legend: Lines: hit not hit

          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 "ElementIntegralFunctorUserObject.h"
      11             : 
      12             : InputParameters
      13       28530 : ElementIntegralFunctorUserObject::validParams()
      14             : {
      15       28530 :   InputParameters params = ElementIntegralUserObject::validParams();
      16       28530 :   params.addRequiredParam<MooseFunctorName>("functor", "The functor to be integrated");
      17       28530 :   return params;
      18           0 : }
      19             : 
      20           0 : ElementIntegralFunctorUserObject::ElementIntegralFunctorUserObject(
      21           0 :     const InputParameters & parameters)
      22             :   : ElementIntegralUserObject(parameters),
      23             :     NonADFunctorInterface(this),
      24           0 :     _functor(getFunctor<Real>("functor"))
      25             : {
      26           0 : }
      27             : 
      28             : Real
      29           0 : ElementIntegralFunctorUserObject::computeQpIntegral()
      30             : {
      31           0 :   const Moose::ElemQpArg elem_qp = {_current_elem, _qp, _qrule, _q_point[_qp]};
      32           0 :   return _functor(elem_qp, determineState());
      33             : }

Generated by: LCOV version 1.14