LCOV - code coverage report
Current view: top level - src/kernels - LevelSetAdvectionSUPG.C (source / functions) Hit Total Coverage
Test: idaholab/moose level_set: #31405 (292dce) with base fef103 Lines: 12 13 92.3 %
Date: 2025-09-04 07:53:58 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 "LevelSetAdvectionSUPG.h"
      11             : 
      12             : registerMooseObject("LevelSetApp", LevelSetAdvectionSUPG);
      13             : 
      14             : InputParameters
      15         168 : LevelSetAdvectionSUPG::validParams()
      16             : {
      17         168 :   InputParameters params = ADKernelGrad::validParams();
      18         168 :   params.addClassDescription(
      19             :       "SUPG stablization term for the advection portion of the level set equation.");
      20         336 :   params.addRequiredCoupledVar("velocity", "Velocity vector variable.");
      21         168 :   return params;
      22           0 : }
      23             : 
      24          96 : LevelSetAdvectionSUPG::LevelSetAdvectionSUPG(const InputParameters & parameters)
      25          96 :   : ADKernelGrad(parameters), _velocity(adCoupledVectorValue("velocity"))
      26             : {
      27          96 : }
      28             : 
      29             : ADRealVectorValue
      30    21762432 : LevelSetAdvectionSUPG::precomputeQpResidual()
      31             : {
      32             :   ADReal tau =
      33    43524864 :       _current_elem->hmin() /
      34    43524864 :       (2 * (_velocity[_qp] + RealVectorValue(libMesh::TOLERANCE * libMesh::TOLERANCE)).norm());
      35    43524864 :   return (tau * _velocity[_qp]) * (_velocity[_qp] * _grad_u[_qp]);
      36             : }

Generated by: LCOV version 1.14