LCOV - code coverage report
Current view: top level - src/kernels - ADCHSoretMobility.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #32971 (54bef8) with base c6cf66 Lines: 13 14 92.9 %
Date: 2026-05-29 20:38:39 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 "ADCHSoretMobility.h"
      11             : 
      12             : registerMooseObject("PhaseFieldApp", ADCHSoretMobility);
      13             : 
      14             : InputParameters
      15          24 : ADCHSoretMobility::validParams()
      16             : {
      17          24 :   InputParameters params = ADKernel::validParams();
      18          24 :   params.addClassDescription("Adds contribution due to thermo-migration to the Cahn-Hilliard "
      19             :                              "equation using a concentration 'u', temperature 'T', and thermal "
      20             :                              "mobility 'mobility' (in units of length squared per time).");
      21          48 :   params.addRequiredCoupledVar("T", "The temperature variable");
      22          48 :   params.addRequiredParam<MaterialPropertyName>("mobility", "The mobility property name");
      23          24 :   return params;
      24           0 : }
      25             : 
      26          13 : ADCHSoretMobility::ADCHSoretMobility(const InputParameters & parameters)
      27             :   : ADKernel(parameters),
      28          13 :     _T(adCoupledValue("T")),
      29          13 :     _grad_T(adCoupledGradient("T")),
      30          39 :     _mobility(getADMaterialProperty<Real>("mobility"))
      31             : {
      32          13 : }
      33             : 
      34             : ADReal
      35       78040 : ADCHSoretMobility::computeQpResidual()
      36             : {
      37       78040 :   return _mobility[_qp] * _grad_T[_qp] / _T[_qp] * _grad_test[_i][_qp];
      38             : }

Generated by: LCOV version 1.14