LCOV - code coverage report
Current view: top level - src/bcs - NSEnergyInviscidSpecifiedBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 0 18 0.0 %
Date: 2025-08-14 10:14:56 Functions: 0 6 0.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 "NSEnergyInviscidSpecifiedBC.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", NSEnergyInviscidSpecifiedBC);
      13             : 
      14             : InputParameters
      15           0 : NSEnergyInviscidSpecifiedBC::validParams()
      16             : {
      17           0 :   InputParameters params = NSEnergyInviscidBC::validParams();
      18           0 :   params.addRequiredParam<Real>("un", "The specified value of u.n for this boundary");
      19           0 :   return params;
      20           0 : }
      21             : 
      22           0 : NSEnergyInviscidSpecifiedBC::NSEnergyInviscidSpecifiedBC(const InputParameters & parameters)
      23             :   : NSEnergyInviscidBC(parameters),
      24           0 :     _specified_pressure(getParam<Real>("specified_pressure")),
      25           0 :     _un(getParam<Real>("un"))
      26             : {
      27           0 : }
      28             : 
      29             : Real
      30           0 : NSEnergyInviscidSpecifiedBC::computeQpResidual()
      31             : {
      32           0 :   return qpResidualHelper(_specified_pressure, _un);
      33             : }
      34             : 
      35             : Real
      36           0 : NSEnergyInviscidSpecifiedBC::computeQpJacobian()
      37             : {
      38           0 :   return this->computeJacobianHelper(/*on-diagonal variable is energy=*/4);
      39             : }
      40             : 
      41             : Real
      42           0 : NSEnergyInviscidSpecifiedBC::computeQpOffDiagJacobian(unsigned jvar)
      43             : {
      44           0 :   if (isNSVariable(jvar))
      45           0 :     return computeJacobianHelper(mapVarNumber(jvar));
      46             :   else
      47             :     return 0.0;
      48             : }
      49             : 
      50             : Real
      51           0 : NSEnergyInviscidSpecifiedBC::computeJacobianHelper(unsigned var_number)
      52             : {
      53             :   // When both pressure and u.n are specified, only term B of the Jacobian is non-zero.
      54           0 :   return qpJacobianTermB(var_number, _un);
      55             : }

Generated by: LCOV version 1.14