LCOV - code coverage report
Current view: top level - include/postprocessors - ElementIntegralFunctorPostprocessor.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #33416 (b10b36) with base 9fbd27 Lines: 1 1 100.0 %
Date: 2026-07-23 16:15:30 Functions: 2 2 100.0 %
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             : #pragma once
      11             : 
      12             : #include "ElementIntegralPostprocessor.h"
      13             : #include "MooseEnum.h"
      14             : 
      15             : /**
      16             :  * This postprocessor computes an element integral of the specified functor
      17             :  *
      18             :  * Note that specializations of this integral are possible by deriving from this
      19             :  * class and overriding computeQpIntegral().
      20             :  */
      21             : template <bool is_ad>
      22             : class ElementIntegralFunctorPostprocessorTempl : public ElementIntegralPostprocessor
      23             : {
      24             : public:
      25             :   static InputParameters validParams();
      26             : 
      27             :   ElementIntegralFunctorPostprocessorTempl(const InputParameters & parameters);
      28             : 
      29             : protected:
      30       95280 :   CreateMooseEnumClass(FunctorEvaluationType, CELL_AVERAGE, QUADRATURE_POINT);
      31             : 
      32             :   virtual Real computeIntegral() override;
      33             :   virtual Real computeQpIntegral() override;
      34             :   virtual Real cellAverage();
      35             : 
      36             :   /// Functor being integrated
      37             :   const Moose::Functor<GenericReal<is_ad>> & _functor;
      38             : 
      39             :   /// Factor multiplying the functor being integrated
      40             :   const Moose::Functor<GenericReal<is_ad>> & _prefactor;
      41             : 
      42             :   /// How to evaluate the functor
      43             :   const FunctorEvaluationType _evaluation_type;
      44             : };
      45             : 
      46             : typedef ElementIntegralFunctorPostprocessorTempl<false> ElementIntegralFunctorPostprocessor;
      47             : typedef ElementIntegralFunctorPostprocessorTempl<true> ADElementIntegralFunctorPostprocessor;

Generated by: LCOV version 1.14