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

           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                 :            : #ifndef RiemannChoice_h
      15                 :            : #define RiemannChoice_h
      16                 :            : 
      17                 :            : #include "FunctionPrototypes.hpp"
      18                 :            : #include "Inciter/Options/Flux.hpp"
      19                 :            : #include "Riemann/HLL.hpp"
      20                 :            : #include "Riemann/AUSM.hpp"
      21                 :            : #include "Riemann/LaxFriedrichsSolids.hpp"
      22                 :            : 
      23                 :            : namespace inciter {
      24                 :            : 
      25                 :            :   //! Get the Riemann solver function according to control file setup
      26                 :            :   //! \param[in] flux Riemann solver from input deck
      27                 :            :   //! \return Function pointer to the Riemann solver, must be of type
      28                 :            :   //!   tk::RiemannFluxFn
      29                 :        209 :   const static tk::RiemannFluxFn multimatRiemannSolver(ctr::FluxType flux)
      30                 :            :   {
      31                 :        209 :     tk::RiemannFluxFn fluxfn;
      32                 :            : 
      33         [ +  + ]:        209 :     if (flux == ctr::FluxType::AUSM) {
      34         [ +  - ]:        198 :       fluxfn = AUSM::flux;
      35                 :            :     }
      36         [ +  + ]:         11 :     else if (flux == ctr::FluxType::HLL) {
      37         [ +  - ]:          4 :       fluxfn = HLL::flux;
      38                 :            :     }
      39         [ +  - ]:          7 :     else if (flux == ctr::FluxType::LaxFriedrichs) {
      40         [ +  - ]:          7 :       fluxfn = LaxFriedrichsSolids::flux;
      41                 :            :     }
      42                 :            :     else {
      43 [ -  - ][ -  - ]:          0 :       Throw("Riemann solver not set up for multi-material PDEs.");
                 [ -  - ]
      44                 :            :     }
      45                 :            : 
      46                 :        209 :     return fluxfn;
      47                 :            :   }
      48                 :            : 
      49                 :            : } // inciter::
      50                 :            : 
      51                 :            : #endif // RiemannChoice_h

Generated by: LCOV version 1.14