LCOV - code coverage report
Current view: top level - src/kernels - ADHeatConductionTimeDerivative.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 "ADHeatConductionTimeDerivative.h"
      11             : 
      12             : registerMooseObject("HeatTransferApp", ADHeatConductionTimeDerivative);
      13             : 
      14             : InputParameters
      15         385 : ADHeatConductionTimeDerivative::validParams()
      16             : {
      17         385 :   InputParameters params = ADTimeDerivative::validParams();
      18         385 :   params.addClassDescription(
      19             :       "AD Time derivative term $\\rho c_p \\frac{\\partial T}{\\partial t}$ of "
      20             :       "the heat equation for quasi-constant specific heat $c_p$ and the density $\\rho$.");
      21         385 :   params.set<bool>("use_displaced_mesh") = true;
      22         770 :   params.addParam<MaterialPropertyName>(
      23             :       "specific_heat", "specific_heat", "Property name of the specific heat material property");
      24         770 :   params.addParam<MaterialPropertyName>(
      25             :       "density_name", "density", "Property name of the density material property");
      26         385 :   return params;
      27           0 : }
      28             : 
      29         209 : ADHeatConductionTimeDerivative::ADHeatConductionTimeDerivative(const InputParameters & parameters)
      30             :   : ADTimeDerivative(parameters),
      31         209 :     _specific_heat(getADMaterialProperty<Real>("specific_heat")),
      32         627 :     _density(getADMaterialProperty<Real>("density_name"))
      33             : {
      34         209 : }
      35             : 
      36             : ADReal
      37     8186920 : ADHeatConductionTimeDerivative::precomputeQpResidual()
      38             : {
      39     8186920 :   return _specific_heat[_qp] * _density[_qp] * ADTimeDerivative::precomputeQpResidual();
      40             : }

Generated by: LCOV version 1.14