LCOV - code coverage report
Current view: top level - src/fvkernels - INSFVMomentumMeshAdvection.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: ba1ead Lines: 17 18 94.4 %
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 "INSFVMomentumMeshAdvection.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", INSFVMomentumMeshAdvection);
      13             : 
      14             : InputParameters
      15         362 : INSFVMomentumMeshAdvection::validParams()
      16             : {
      17         362 :   InputParameters params = INSFVMeshAdvection::validParams();
      18         362 :   params += INSFVMomentumResidualObject::validParams();
      19         362 :   params.addClassDescription(
      20             :       "Implements a momentum source/sink term proportional to the divergence of the mesh velocity");
      21         362 :   params.suppressParameter<MooseFunctorName>("advected_quantity");
      22         724 :   params.addParam<bool>(
      23         724 :       "add_to_a", true, "Whether to add this object's contribution to the Rhie-Chow coefficients");
      24         362 :   return params;
      25           0 : }
      26             : 
      27         184 : INSFVMomentumMeshAdvection::INSFVMomentumMeshAdvection(const InputParameters & parameters)
      28             :   : INSFVMeshAdvection(parameters),
      29             :     INSFVMomentumResidualObject(*this),
      30         368 :     _add_to_a(getParam<bool>("add_to_a"))
      31             : {
      32         184 : }
      33             : 
      34             : void
      35       37390 : INSFVMomentumMeshAdvection::gatherRCData(const Elem & elem)
      36             : {
      37       37390 :   if (_add_to_a)
      38             :   {
      39       13870 :     const auto elem_arg = makeElemArg(&elem);
      40       13870 :     const auto state = determineState();
      41       13870 :     _rc_uo.addToA(&elem, _index, advQuantCoeff(elem_arg, state));
      42             :   }
      43       37390 : }

Generated by: LCOV version 1.14