LCOV - code coverage report
Current view: top level - src/postprocessors - ViewFactorPP.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #31405 (292dce) with base fef103 Lines: 14 15 93.3 %
Date: 2025-09-04 07:53:51 Functions: 3 3 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 "ViewFactorPP.h"
      11             : #include "ViewFactorBase.h"
      12             : 
      13             : registerMooseObject("HeatTransferApp", ViewFactorPP);
      14             : 
      15             : InputParameters
      16         760 : ViewFactorPP::validParams()
      17             : {
      18         760 :   InputParameters params = GeneralPostprocessor::validParams();
      19        1520 :   params.addRequiredParam<UserObjectName>("view_factor_object_name",
      20             :                                           "Name of the ViewFactor userobjects.");
      21        1520 :   params.addRequiredParam<BoundaryName>("from_boundary",
      22             :                                         "The boundary from which to compute the view factor.");
      23        1520 :   params.addRequiredParam<BoundaryName>("to_boundary",
      24             :                                         "The boundary from which to compute the view factor.");
      25         760 :   params.addClassDescription(
      26             :       "This postprocessor allows to extract view factors from ViewFactor userobjects.");
      27         760 :   return params;
      28           0 : }
      29             : 
      30         380 : ViewFactorPP::ViewFactorPP(const InputParameters & parameters)
      31             :   : GeneralPostprocessor(parameters),
      32         380 :     _vf_uo(getUserObject<ViewFactorBase>("view_factor_object_name")),
      33         760 :     _from_bnd_id(_fe_problem.mesh().getBoundaryID(getParam<BoundaryName>("from_boundary"))),
      34        1140 :     _to_bnd_id(_fe_problem.mesh().getBoundaryID(getParam<BoundaryName>("to_boundary")))
      35             : {
      36         380 : }
      37             : 
      38             : PostprocessorValue
      39         284 : ViewFactorPP::getValue() const
      40             : {
      41         284 :   return _vf_uo.getViewFactor(_from_bnd_id, _to_bnd_id);
      42             : }

Generated by: LCOV version 1.14