LCOV - code coverage report
Current view: top level - src/kernels - ADPhaseFieldAdvectionSUPG.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 "ADPhaseFieldAdvectionSUPG.h"
      11             : 
      12             : registerMooseObject("PhaseFieldApp", ADPhaseFieldAdvectionSUPG);
      13             : 
      14             : InputParameters
      15         115 : ADPhaseFieldAdvectionSUPG::validParams()
      16             : {
      17         115 :   InputParameters params = ADKernelGrad::validParams();
      18         115 :   params.addClassDescription(
      19             :       "SUPG stablization term for the advection portion of the level set equation.");
      20         230 :   params.addRequiredCoupledVar("velocity", "Velocity vector variable.");
      21         115 :   return params;
      22           0 : }
      23             : 
      24          60 : ADPhaseFieldAdvectionSUPG::ADPhaseFieldAdvectionSUPG(const InputParameters & parameters)
      25          60 :   : ADKernelGrad(parameters), _velocity(adCoupledVectorValue("velocity"))
      26             : {
      27          60 : }
      28             : 
      29             : ADRealVectorValue
      30     6290048 : ADPhaseFieldAdvectionSUPG::precomputeQpResidual()
      31             : {
      32             :   ADReal tau =
      33    12580096 :       _current_elem->hmin() /
      34    12580096 :       (2 * (_velocity[_qp] + RealVectorValue(libMesh::TOLERANCE * libMesh::TOLERANCE)).norm());
      35    12580096 :   return (tau * _velocity[_qp]) * (_velocity[_qp] * _grad_u[_qp]);
      36             : }

Generated by: LCOV version 1.14