Quinoa all test code coverage report
Current view: top level - PDE/CompFlow - RiemannChoice.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 7 8 87.5 %
Date: 2024-04-22 13:39:53 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 5 14 35.7 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/MultiMat/RiemannChoice.hpp
       4                 :            :   \copyright 2012-2015 J. Bakosi,
       5                 :            :              2016-2018 Los Alamos National Security, LLC.,
       6                 :            :              2019-2021 Triad National Security, LLC.
       7                 :            :              All rights reserved. See the LICENSE file for details.
       8                 :            :   \brief     Register available Riemann solvers for multimaterial compressible
       9                 :            :              hydrodynamics.
      10                 :            :   \details   Register available Riemann solvers for multimaterial compressible
      11                 :            :              hydrodynamics.
      12                 :            : */
      13                 :            : // *****************************************************************************
      14                 :            : #include "FunctionPrototypes.hpp"
      15                 :            : #include "Inciter/Options/Flux.hpp"
      16                 :            : #include "Riemann/HLLC.hpp"
      17                 :            : #include "Riemann/LaxFriedrichs.hpp"
      18                 :            : 
      19                 :            : namespace inciter {
      20                 :            : 
      21                 :            :   //! Get the Riemann solver function according to control file setup
      22                 :            :   //! \param[in] flux Riemann solver from input deck
      23                 :            :   //! \return Function pointer to the Riemann solver, must be of type
      24                 :            :   //!   tk::RiemannFluxFn
      25                 :        108 :   const static tk::RiemannFluxFn compflowRiemannSolver(ctr::FluxType flux)
      26                 :            :   {
      27                 :        108 :     tk::RiemannFluxFn fluxfn;
      28                 :            : 
      29         [ +  + ]:        108 :     if (flux == ctr::FluxType::HLLC) {
      30         [ +  - ]:        104 :       fluxfn = HLLC::flux;
      31                 :            :     }
      32         [ +  - ]:          4 :     else if (flux == ctr::FluxType::LaxFriedrichs) {
      33         [ +  - ]:          4 :       fluxfn = LaxFriedrichs::flux;
      34                 :            :     }
      35                 :            :     else {
      36 [ -  - ][ -  - ]:          0 :       Throw("Riemann solver not set up for compressible flow PDEs.");
                 [ -  - ]
      37                 :            :     }
      38                 :            : 
      39                 :        108 :     return fluxfn;
      40                 :            :   }
      41                 :            : 
      42                 :            : } // inciter::

Generated by: LCOV version 1.14