LCOV - code coverage report
Current view: top level - src/kernels - ADPhaseFieldAdvectionSUPG.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #32971 (54bef8) with base c6cf66 Lines: 12 13 92.3 %
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://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          75 : ADPhaseFieldAdvectionSUPG::validParams()
      16             : {
      17          75 :   InputParameters params = ADKernelGrad::validParams();
      18          75 :   params.addClassDescription(
      19             :       "SUPG stablization term for the advection portion of the level set equation.");
      20         150 :   params.addRequiredCoupledVar("velocity", "Velocity vector variable.");
      21          75 :   return params;
      22           0 : }
      23             : 
      24          40 : ADPhaseFieldAdvectionSUPG::ADPhaseFieldAdvectionSUPG(const InputParameters & parameters)
      25          40 :   : ADKernelGrad(parameters), _velocity(adCoupledVectorValue("velocity"))
      26             : {
      27          40 : }
      28             : 
      29             : ADRealVectorValue
      30     4939904 : ADPhaseFieldAdvectionSUPG::precomputeQpResidual()
      31             : {
      32             :   ADReal tau =
      33     9879808 :       _current_elem->hmin() /
      34     9879808 :       (2 * (_velocity[_qp] + RealVectorValue(libMesh::TOLERANCE * libMesh::TOLERANCE)).norm());
      35     9879808 :   return (tau * _velocity[_qp]) * (_velocity[_qp] * _grad_u[_qp]);
      36             : }

Generated by: LCOV version 1.14