LCOV - code coverage report
Current view: top level - src/materials - GapConductanceConstant.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #31405 (292dce) with base fef103 Lines: 23 26 88.5 %
Date: 2025-09-04 07:53:51 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 "GapConductanceConstant.h"
      11             : 
      12             : registerMooseObject("HeatTransferApp", GapConductanceConstant);
      13             : 
      14             : InputParameters
      15         186 : GapConductanceConstant::validParams()
      16             : {
      17         186 :   InputParameters params = Material::validParams();
      18         186 :   params += GapConductanceConstant::actionParameters();
      19             :   // We can't just make it required in the first place because then it would always
      20             :   // be required in the Action, even if this model isn't used.
      21         186 :   params.makeParamRequired<Real>("gap_conductance");
      22         186 :   params.addClassDescription("Material to compute a constant, prescribed gap conductance");
      23             : 
      24         186 :   return params;
      25           0 : }
      26             : 
      27             : InputParameters
      28        6694 : GapConductanceConstant::actionParameters()
      29             : {
      30        6694 :   InputParameters params = emptyInputParameters();
      31       13388 :   params.addParam<std::string>(
      32             :       "appended_property_name", "", "Name appended to material properties to make them unique");
      33       13388 :   params.addParam<Real>("gap_conductance", 0.0, "Gap conductance");
      34       13388 :   params.addParamNamesToGroup("gap_conductance", "Gap conductivity");
      35        6694 :   return params;
      36           0 : }
      37             : 
      38         110 : GapConductanceConstant::GapConductanceConstant(const InputParameters & params)
      39             :   : Material(params),
      40         110 :     _prescribed_gap_conductance(getParam<Real>("gap_conductance")),
      41         220 :     _appended_property_name(getParam<std::string>("appended_property_name")),
      42         110 :     _gap_conductance(declareProperty<Real>("gap_conductance" + _appended_property_name)),
      43         330 :     _gap_conductance_dT(declareProperty<Real>("gap_conductance" + _appended_property_name + "_dT"))
      44             : {
      45         220 :   if (!params.isParamSetByUser("gap_conductance"))
      46           0 :     mooseError("gap_conductance must be specified");
      47         110 : }
      48             : 
      49             : void
      50       36480 : GapConductanceConstant::computeQpProperties()
      51             : {
      52       36480 :   _gap_conductance[_qp] = _prescribed_gap_conductance;
      53       36480 :   _gap_conductance_dT[_qp] = 0.0;
      54       36480 : }

Generated by: LCOV version 1.14