LCOV - code coverage report
Current view: top level - src/kernels - ADMatCoupledForce.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 11 12 91.7 %
Date: 2025-07-17 01:28:37 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 "ADMatCoupledForce.h"
      11             : 
      12             : registerMooseObject("MooseApp", ADMatCoupledForce);
      13             : 
      14             : InputParameters
      15       14332 : ADMatCoupledForce::validParams()
      16             : {
      17       14332 :   InputParameters params = ADCoupledForce::validParams();
      18       14332 :   params.addClassDescription(
      19             :       "Kernel representing the contribution of the PDE term $mv$, where $m$ is a material property "
      20             :       "coefficient, $v$ is a coupled scalar field variable, and Jacobian derivatives are "
      21             :       "calculated "
      22             :       "using automatic differentiation.");
      23       42996 :   params.addParam<MaterialPropertyName>(
      24             :       "mat_prop_coef",
      25       28664 :       1.0,
      26             :       "User-supplied material property multiplier for the coupled force term.");
      27       14332 :   return params;
      28           0 : }
      29             : 
      30          35 : ADMatCoupledForce::ADMatCoupledForce(const InputParameters & parameters)
      31          35 :   : ADCoupledForce(parameters), _mat_prop(getADMaterialProperty<Real>("mat_prop_coef"))
      32             : {
      33          35 : }
      34             : 
      35             : ADReal
      36      161536 : ADMatCoupledForce::computeQpResidual()
      37             : {
      38      323072 :   return _mat_prop[_qp] * ADCoupledForce::computeQpResidual();
      39             : }

Generated by: LCOV version 1.14