Quinoa all test code coverage report
Current view: top level - Control/Inciter/Options - Problem.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 4 4 100.0 %
Date: 2024-04-29 14:42:33 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 11 22 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Control/Inciter/Options/Problem.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     Problem options for inciter
       9                 :            :   \details   Problem options for inciter
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef ProblemOptions_h
      13                 :            : #define ProblemOptions_h
      14                 :            : 
      15                 :            : #include <brigand/sequences/list.hpp>
      16                 :            : #include <brigand/algorithms/for_each.hpp>
      17                 :            : 
      18                 :            : #include "Toggle.hpp"
      19                 :            : #include "PUPUtil.hpp"
      20                 :            : 
      21                 :            : namespace inciter {
      22                 :            : namespace ctr {
      23                 :            : 
      24                 :            : //! Problem types
      25                 :            : enum class ProblemType : uint8_t { USER_DEFINED,
      26                 :            :                                    SHEAR_DIFF,
      27                 :            :                                    VORTICAL_FLOW,
      28                 :            :                                    NL_ENERGY_GROWTH,
      29                 :            :                                    RAYLEIGH_TAYLOR,
      30                 :            :                                    TAYLOR_GREEN,
      31                 :            :                                    SLOT_CYL,
      32                 :            :                                    GAUSS_HUMP,
      33                 :            :                                    CYL_ADVECT,
      34                 :            :                                    CYL_VORTEX,
      35                 :            :                                    SHEDDING_FLOW,
      36                 :            :                                    SOD_SHOCKTUBE,
      37                 :            :                                    ROTATED_SOD_SHOCKTUBE,
      38                 :            :                                    SEDOV_BLASTWAVE,
      39                 :            :                                    INTERFACE_ADVECTION,
      40                 :            :                                    GAUSS_HUMP_COMPFLOW,
      41                 :            :                                    WATERAIR_SHOCKTUBE,
      42                 :            :                                    SHOCK_HEBUBBLE,
      43                 :            :                                    UNDERWATER_EX,
      44                 :            :                                    SHOCKDENSITY_WAVE,
      45                 :            :                                    EQUILINTERFACE_ADVECT,
      46                 :            :                                    SINEWAVE_PACKET,
      47                 :            :                                    RICHTMYER_MESHKOV };
      48                 :            : 
      49                 :            : //! Pack/Unpack ProblemType: forward overload to generic enum class packer
      50                 :            : inline void operator|( PUP::er& p, ProblemType& e ) { PUP::pup( p, e ); }
      51                 :            : 
      52                 :            : //! \brief Problem options: outsource to base templated on enum type
      53                 :        390 : class Problem : public tk::Toggle< ProblemType > {
      54                 :            : 
      55                 :            :   public:
      56                 :            :     //! \brief Options constructor
      57                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      58                 :            :     //!    will handle client interactions
      59                 :        390 :     explicit Problem() :
      60                 :            :       tk::Toggle< ProblemType >(
      61                 :            :         //! Group, i.e., options, name
      62                 :            :         "Problem",
      63                 :            :         //! Enums -> names
      64                 :            :         { { ProblemType::USER_DEFINED, "user_defined" },
      65                 :            :           { ProblemType::SHEAR_DIFF, "shear_diff" },
      66                 :            :           { ProblemType::VORTICAL_FLOW, "vortical_flow" },
      67                 :            :           { ProblemType::NL_ENERGY_GROWTH, "nl_energy_growth" },
      68                 :            :           { ProblemType::RAYLEIGH_TAYLOR, "rayleigh_taylor" },
      69                 :            :           { ProblemType::TAYLOR_GREEN, "taylor_green" },
      70                 :            :           { ProblemType::SLOT_CYL, "slot_cyl" },
      71                 :            :           { ProblemType::GAUSS_HUMP, "gauss_hump" },
      72                 :            :           { ProblemType::CYL_ADVECT, "cyl_advect" },
      73                 :            :           { ProblemType::CYL_VORTEX, "cyl_vortex" },
      74                 :            :           { ProblemType::SHEDDING_FLOW, "shedding_flow" },
      75                 :            :           { ProblemType::SOD_SHOCKTUBE, "sod_shocktube" },
      76                 :            :           { ProblemType::ROTATED_SOD_SHOCKTUBE, "rotated_sod_shocktube" },
      77                 :            :           { ProblemType::SEDOV_BLASTWAVE, "sedov_blastwave" },
      78                 :            :           { ProblemType::INTERFACE_ADVECTION, "interface_advection" },
      79                 :            :           { ProblemType::GAUSS_HUMP_COMPFLOW, "gauss_hump_compflow" },
      80                 :            :           { ProblemType::WATERAIR_SHOCKTUBE, "waterair_shocktube" },
      81                 :            :           { ProblemType::SHOCK_HEBUBBLE, "shock_hebubble" },
      82                 :            :           { ProblemType::UNDERWATER_EX, "underwater_ex" },
      83                 :            :           { ProblemType::SHOCKDENSITY_WAVE, "shockdensity_wave" },
      84                 :            :           { ProblemType::EQUILINTERFACE_ADVECT, "equilinterface_advect" },
      85                 :            :           { ProblemType::RICHTMYER_MESHKOV, "richtmyer_meshkov" },
      86                 :            :           { ProblemType::SINEWAVE_PACKET, "sinewave_packet" }
      87                 :            :         },
      88                 :            :         //! keywords -> Enums
      89                 :            :         { { "user_defined", ProblemType::USER_DEFINED },
      90                 :            :           { "shear_diff", ProblemType::SHEAR_DIFF },
      91                 :            :           { "vortical_flow", ProblemType::VORTICAL_FLOW },
      92                 :            :           { "nl_energy_growth", ProblemType::NL_ENERGY_GROWTH },
      93                 :            :           { "rayleigh_taylor", ProblemType::RAYLEIGH_TAYLOR },
      94                 :            :           { "taylor_green", ProblemType::TAYLOR_GREEN },
      95                 :            :           { "slot_cyl", ProblemType::SLOT_CYL },
      96                 :            :           { "gauss_hump", ProblemType::GAUSS_HUMP },
      97                 :            :           { "cyl_advect", ProblemType::CYL_ADVECT },
      98                 :            :           { "cyl_vortex", ProblemType::CYL_VORTEX },
      99                 :            :           { "shedding_flow", ProblemType::SHEDDING_FLOW },
     100                 :            :           { "sod_shocktube", ProblemType::SOD_SHOCKTUBE },
     101                 :            :           { "rotated_sod_shocktube", ProblemType::ROTATED_SOD_SHOCKTUBE },
     102                 :            :           { "sod_shocktube", ProblemType::SOD_SHOCKTUBE },
     103                 :            :           { "sedov_blastwave", ProblemType::SEDOV_BLASTWAVE },
     104                 :            :           { "interface_advection", ProblemType::INTERFACE_ADVECTION },
     105                 :            :           { "gauss_hump_compflow", ProblemType::GAUSS_HUMP_COMPFLOW },
     106                 :            :           { "waterair_shocktube", ProblemType::WATERAIR_SHOCKTUBE },
     107                 :            :           { "shock_hebubble", ProblemType::SHOCK_HEBUBBLE },
     108                 :            :           { "underwater_ex", ProblemType::UNDERWATER_EX },
     109                 :            :           { "shockdensity_wave", ProblemType::SHOCKDENSITY_WAVE },
     110                 :            :           { "equilinterface_advect", ProblemType::EQUILINTERFACE_ADVECT },
     111                 :            :           { "richtmyer_meshkov", ProblemType::RICHTMYER_MESHKOV },
     112                 :            :           { "sinewave_packet", ProblemType::SINEWAVE_PACKET }
     113 [ +  - ][ +  - ]:      19890 :         } )
         [ +  - ][ +  + ]
         [ +  + ][ +  + ]
         [ +  + ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
     114                 :        390 :     {}
     115                 :            : };
     116                 :            : 
     117                 :            : } // ctr::
     118                 :            : } // inciter::
     119                 :            : 
     120                 :            : #endif // ProblemOptions_h

Generated by: LCOV version 1.14