LCOV - code coverage report
Current view: top level - src/kernels - ADPhaseFieldTimeDerivativeSUPG.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31706 (f8ed4a) with base bb0a08 Lines: 12 13 92.3 %
Date: 2025-11-03 17:26:54 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://www.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 "ADPhaseFieldTimeDerivativeSUPG.h"
      11             : 
      12             : registerMooseObject("PhaseFieldApp", ADPhaseFieldTimeDerivativeSUPG);
      13             : 
      14             : InputParameters
      15         523 : ADPhaseFieldTimeDerivativeSUPG::validParams()
      16             : {
      17         523 :   InputParameters params = ADTimeKernelGrad::validParams();
      18         523 :   params.addClassDescription(
      19             :       "SUPG stablization terms for the time derivative of the level set equation.");
      20        1046 :   params.addRequiredCoupledVar("velocity", "Velocity vector variable.");
      21         523 :   return params;
      22           0 : }
      23             : 
      24         276 : ADPhaseFieldTimeDerivativeSUPG::ADPhaseFieldTimeDerivativeSUPG(const InputParameters & parameters)
      25         276 :   : ADTimeKernelGrad(parameters), _velocity(adCoupledVectorValue("velocity"))
      26             : {
      27         276 : }
      28             : 
      29             : ADRealVectorValue
      30    28779158 : ADPhaseFieldTimeDerivativeSUPG::precomputeQpResidual()
      31             : {
      32             :   ADReal tau =
      33    57558316 :       _current_elem->hmin() /
      34    57558316 :       (2 * (_velocity[_qp] + RealVectorValue(libMesh::TOLERANCE * libMesh::TOLERANCE)).norm());
      35    57558316 :   return tau * _velocity[_qp] * _u_dot[_qp];
      36             : }

Generated by: LCOV version 1.14