LCOV - code coverage report
Current view: top level - src/bcs - ADHSHeatFluxBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 12 13 92.3 %
Date: 2025-07-30 13:02:48 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 "ADHSHeatFluxBC.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", ADHSHeatFluxBC);
      14             : 
      15             : InputParameters
      16         136 : ADHSHeatFluxBC::validParams()
      17             : {
      18         136 :   InputParameters params = ADFunctionNeumannBC::validParams();
      19             : 
      20         408 :   params.addDeprecatedParam<PostprocessorName>(
      21             :       "scale_pp",
      22             :       "1.0",
      23             :       "Post-processor by which to scale boundary condition",
      24             :       "The 'scale' parameter is replacing the 'scale_pp' parameter. 'scale' is a function "
      25             :       "parameter instead of a post-processor parameter. If you need to scale from a post-processor "
      26             :       "value, use a PostprocessorFunction.");
      27         272 :   params.addParam<FunctionName>("scale", 1.0, "Function by which to scale the boundary condition");
      28             : 
      29         136 :   params.addClassDescription("Applies a specified heat flux to the side of a plate heat structure");
      30             : 
      31         136 :   return params;
      32           0 : }
      33             : 
      34          74 : ADHSHeatFluxBC::ADHSHeatFluxBC(const InputParameters & parameters)
      35             :   : ADFunctionNeumannBC(parameters),
      36             : 
      37          74 :     _scale_pp(getPostprocessorValue("scale_pp")),
      38         148 :     _scale_fn(getFunction("scale"))
      39             : {
      40          74 : }
      41             : 
      42             : ADReal
      43        6768 : ADHSHeatFluxBC::computeQpResidual()
      44             : {
      45        6768 :   return _scale_pp * _scale_fn.value(_t, _q_point[_qp]) * ADFunctionNeumannBC::computeQpResidual();
      46             : }

Generated by: LCOV version 1.14