LCOV - code coverage report
Current view: top level - src/postprocessors - EnergyFluxIntegral.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 15 16 93.8 %
Date: 2026-05-29 20:41:18 Functions: 4 4 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             : #include "EnergyFluxIntegral.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", EnergyFluxIntegral);
      13             : 
      14             : InputParameters
      15         270 : EnergyFluxIntegral::validParams()
      16             : {
      17         270 :   InputParameters params = SideIntegralPostprocessor::validParams();
      18         270 :   params.addClassDescription("Computes the integral of the energy flux over a boundary");
      19         540 :   params.addRequiredCoupledVar("arhouA", "alpha*rho*u*A");
      20         540 :   params.addRequiredCoupledVar("H", "Specific total enthalpy");
      21         270 :   return params;
      22           0 : }
      23             : 
      24          96 : EnergyFluxIntegral::EnergyFluxIntegral(const InputParameters & parameters)
      25             :   : SideIntegralPostprocessor(parameters),
      26          96 :     _arhouA(coupledValue("arhouA")),
      27         192 :     _enthalpy(coupledValue("H"))
      28             : {
      29          96 : }
      30             : 
      31             : void
      32           6 : EnergyFluxIntegral::threadJoin(const UserObject & y)
      33             : {
      34             :   const auto & pps = static_cast<const EnergyFluxIntegral &>(y);
      35           6 :   _integral_value += pps._integral_value;
      36           6 : }
      37             : 
      38             : Real
      39          30 : EnergyFluxIntegral::computeQpIntegral()
      40             : {
      41          30 :   return _arhouA[_qp] * _enthalpy[_qp];
      42             : }

Generated by: LCOV version 1.14