LCOV - code coverage report
Current view: top level - src/bcs - GapPerfectConductance.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #31405 (292dce) with base fef103 Lines: 16 17 94.1 %
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 "GapPerfectConductance.h"
      11             : 
      12             : registerMooseObject("HeatTransferApp", GapPerfectConductance);
      13             : 
      14             : InputParameters
      15          41 : GapPerfectConductance::validParams()
      16             : {
      17          41 :   InputParameters params = IntegratedBC::validParams();
      18          41 :   params.addClassDescription("Enforces equal temperatures across the gap.");
      19          82 :   params.addRequiredCoupledVar("gap_distance", "Distance across the gap.");
      20          82 :   params.addRequiredCoupledVar("gap_temp", "Temperature on the other side of the gap.");
      21          82 :   params.addParam<Real>("penalty", 1e3, "Penalty value to be applied to the constraint.");
      22          41 :   return params;
      23           0 : }
      24             : 
      25          22 : GapPerfectConductance::GapPerfectConductance(const InputParameters & parameters)
      26             :   : IntegratedBC(parameters),
      27          22 :     _gap_distance(coupledValue("gap_distance")),
      28          22 :     _gap_temp(coupledValue("gap_temp")),
      29          66 :     _penalty(getParam<Real>("penalty"))
      30             : {
      31          22 : }
      32             : 
      33             : Real
      34        2342 : GapPerfectConductance::computeQpResidual()
      35             : {
      36        2342 :   return _penalty * (_u[_qp] - _gap_temp[_qp]);
      37             : }
      38             : 
      39             : Real
      40        1080 : GapPerfectConductance::computeQpJacobian()
      41             : {
      42        1080 :   return _penalty;
      43             : }

Generated by: LCOV version 1.14