LCOV - code coverage report
Current view: top level - src/physics - NavierStokesPhysicsBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: #32971 (54bef8) with base c6cf66 Lines: 19 21 90.5 %
Date: 2026-05-29 20:37:52 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 "NavierStokesPhysicsBase.h"
      11             : #include "INSFVRhieChowInterpolator.h"
      12             : #include "RelationshipManager.h"
      13             : #include "WCNSFVFlowPhysics.h"
      14             : 
      15             : InputParameters
      16        3223 : NavierStokesPhysicsBase::validParams()
      17             : {
      18        3223 :   InputParameters params = PhysicsBase::validParams();
      19        3223 :   params.addClassDescription(
      20             :       "Base class to define the Navier Stokes incompressible and weakly-compressible equation");
      21             : 
      22        6446 :   params.addParam<bool>(
      23             :       "define_variables",
      24        6446 :       true,
      25             :       "Whether to define variables if the variables with the specified names do not exist. Note "
      26             :       "that if the variables are defined externally from the Physics, the initial conditions will "
      27             :       "not be created in the Physics either.");
      28             : 
      29        6446 :   params.addParam<unsigned short>(
      30        6446 :       "ghost_layers", 2, "Number of layers of elements to ghost near process domain boundaries");
      31        6446 :   params.addParamNamesToGroup("define_variables ghost_layers", "Advanced");
      32             : 
      33        3223 :   return params;
      34           0 : }
      35             : 
      36        3223 : NavierStokesPhysicsBase::NavierStokesPhysicsBase(const InputParameters & parameters)
      37        6446 :   : PhysicsBase(parameters), _define_variables(getParam<bool>("define_variables"))
      38             : {
      39        3223 : }
      40             : 
      41             : InputParameters
      42        9135 : NavierStokesPhysicsBase::getAdditionalRMParams() const
      43             : {
      44       18270 :   unsigned short necessary_layers = getParam<unsigned short>("ghost_layers");
      45        9135 :   necessary_layers = std::max(necessary_layers, getNumberAlgebraicGhostingLayersNeeded());
      46             : 
      47             :   // Just an object that has a ghost_layers parameter
      48        9135 :   const std::string kernel_type = "INSFVMixingLengthReynoldsStress";
      49        9135 :   InputParameters params = getFactory().getValidParams(kernel_type);
      50        9135 :   params.template set<unsigned short>("ghost_layers") = necessary_layers;
      51             : 
      52        9135 :   return params;
      53           0 : }

Generated by: LCOV version 1.14