LCOV - code coverage report
Current view: top level - src/fvkernels - INSFVMassAdvection.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: ba1ead Lines: 14 15 93.3 %
Date: 2025-08-13 06:50:25 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 "INSFVMassAdvection.h"
      11             : #include "NS.h"
      12             : 
      13             : registerMooseObject("NavierStokesApp", INSFVMassAdvection);
      14             : 
      15             : InputParameters
      16       14789 : INSFVMassAdvection::validParams()
      17             : {
      18       14789 :   auto params = INSFVAdvectionKernel::validParams();
      19       14789 :   params.addClassDescription("Object for advecting mass, e.g. rho");
      20       14789 :   params.addRequiredParam<MooseFunctorName>(NS::density, "Density functor");
      21       14789 :   return params;
      22           0 : }
      23             : 
      24        7755 : INSFVMassAdvection::INSFVMassAdvection(const InputParameters & params)
      25        7755 :   : INSFVAdvectionKernel(params), _rho(getFunctor<ADReal>(NS::density))
      26             : {
      27        7755 : }
      28             : 
      29             : ADReal
      30    44878166 : INSFVMassAdvection::computeQpResidual()
      31             : {
      32    44878166 :   const auto v = velocity();
      33    44878166 :   const auto rho_face = _rho(makeFace(*_face_info,
      34             :                                       limiterType(_advected_interp_method),
      35    44878166 :                                       MetaPhysicL::raw_value(v) * _normal > 0),
      36    89756332 :                              determineState());
      37             : 
      38    89756332 :   return _normal * v * rho_face;
      39             : }

Generated by: LCOV version 1.14