LCOV - code coverage report
Current view: top level - src/fvkernels - CNSFVHLLC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: ba1ead Lines: 17 19 89.5 %
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 "CNSFVHLLC.h"
      11             : 
      12             : InputParameters
      13        1531 : CNSFVHLLC::validParams()
      14             : {
      15        1531 :   return CNSFVHLLCBase::validParams();
      16             : }
      17             : 
      18         818 : CNSFVHLLC::CNSFVHLLC(const InputParameters & params) : CNSFVHLLCBase(params) {}
      19             : 
      20             : ADReal
      21     2320372 : CNSFVHLLC::computeQpResidual()
      22             : {
      23     2320372 :   _normal_speed_elem = _normal * _vel_elem[_qp];
      24     2320372 :   _normal_speed_neighbor = _normal * _vel_neighbor[_qp];
      25     2320372 :   auto wave_speeds = waveSpeed(hllcData(), _normal);
      26     2320372 :   _SL = std::move(wave_speeds[0]);
      27     2320372 :   _SM = std::move(wave_speeds[1]);
      28     2320372 :   _SR = std::move(wave_speeds[2]);
      29     2320372 :   if (_SL >= 0)
      30           0 :     return fluxElem();
      31     2320372 :   else if (_SR <= 0)
      32           0 :     return fluxNeighbor();
      33             :   else
      34             :   {
      35     2320372 :     if (_SM >= 0)
      36             :     {
      37     1917564 :       ADReal f = _rho_elem[_qp] * (_SL - _normal_speed_elem) / (_SL - _SM);
      38     5752692 :       return fluxElem() + _SL * (f * hllcElem() - conservedVariableElem());
      39             :     }
      40             :     else
      41             :     {
      42      402808 :       ADReal f = _rho_neighbor[_qp] * (_SR - _normal_speed_neighbor) / (_SR - _SM);
      43     1208424 :       return fluxNeighbor() + _SR * (f * hllcNeighbor() - conservedVariableNeighbor());
      44             :     }
      45             :   }
      46             :   mooseError("Should never get here");
      47             : }

Generated by: LCOV version 1.14