LCOV - code coverage report
Current view: top level - src/kernels - ADMatHeatSource.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #32971 (54bef8) with base c6cf66 Lines: 13 14 92.9 %
Date: 2026-05-29 20:37:03 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 "ADMatHeatSource.h"
      11             : 
      12             : registerMooseObject("HeatTransferApp", ADMatHeatSource);
      13             : 
      14             : InputParameters
      15         106 : ADMatHeatSource::validParams()
      16             : {
      17         106 :   InputParameters params = ADKernel::validParams();
      18         212 :   params.addParam<Real>("scalar", 1.0, "Scalar multiplied by the body force term");
      19         212 :   params.addParam<MaterialPropertyName>(
      20         212 :       "material_property", 1.0, "Material property describing the body force");
      21         106 :   params.addClassDescription("Force term in thermal transport to represent a heat source");
      22         106 :   return params;
      23           0 : }
      24             : 
      25          56 : ADMatHeatSource::ADMatHeatSource(const InputParameters & parameters)
      26             :   : ADKernel(parameters),
      27          56 :     _scalar(getParam<Real>("scalar")),
      28         168 :     _material_property(getADMaterialProperty<Real>("material_property"))
      29             : {
      30          56 : }
      31             : 
      32             : ADReal
      33     6006016 : ADMatHeatSource::computeQpResidual()
      34             : {
      35     6006016 :   return -_scalar * _material_property[_qp] * _test[_i][_qp];
      36             : }

Generated by: LCOV version 1.14