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

Generated by: LCOV version 1.14