Quinoa all test code coverage report
Current view: top level - Control/Inciter/Options - Problem.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 5 51 9.8 %
Date: 2024-11-08 10:55:28 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 55 110 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                 :       7064 : 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                 :            : 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                 :        378 :     explicit Problem() :
      60                 :            :       tk::Toggle< ProblemType >(
      61                 :            :         //! Group, i.e., options, name
      62                 :            :         "Problem",
      63                 :            :         //! Enums -> names
      64                 :          0 :         { { ProblemType::USER_DEFINED, "user_defined" },
      65                 :          0 :           { ProblemType::SHEAR_DIFF, "shear_diff" },
      66                 :          0 :           { ProblemType::VORTICAL_FLOW, "vortical_flow" },
      67                 :          0 :           { ProblemType::NL_ENERGY_GROWTH, "nl_energy_growth" },
      68                 :          0 :           { ProblemType::RAYLEIGH_TAYLOR, "rayleigh_taylor" },
      69                 :          0 :           { ProblemType::TAYLOR_GREEN, "taylor_green" },
      70                 :          0 :           { ProblemType::SLOT_CYL, "slot_cyl" },
      71                 :          0 :           { ProblemType::GAUSS_HUMP, "gauss_hump" },
      72                 :          0 :           { ProblemType::CYL_ADVECT, "cyl_advect" },
      73                 :          0 :           { ProblemType::CYL_VORTEX, "cyl_vortex" },
      74                 :          0 :           { ProblemType::SHEDDING_FLOW, "shedding_flow" },
      75                 :          0 :           { ProblemType::SOD_SHOCKTUBE, "sod_shocktube" },
      76                 :          0 :           { ProblemType::ROTATED_SOD_SHOCKTUBE, "rotated_sod_shocktube" },
      77                 :          0 :           { ProblemType::SEDOV_BLASTWAVE, "sedov_blastwave" },
      78                 :          0 :           { ProblemType::INTERFACE_ADVECTION, "interface_advection" },
      79                 :          0 :           { ProblemType::GAUSS_HUMP_COMPFLOW, "gauss_hump_compflow" },
      80                 :          0 :           { ProblemType::WATERAIR_SHOCKTUBE, "waterair_shocktube" },
      81                 :          0 :           { ProblemType::SHOCK_HEBUBBLE, "shock_hebubble" },
      82                 :          0 :           { ProblemType::UNDERWATER_EX, "underwater_ex" },
      83                 :          0 :           { ProblemType::SHOCKDENSITY_WAVE, "shockdensity_wave" },
      84                 :          0 :           { ProblemType::EQUILINTERFACE_ADVECT, "equilinterface_advect" },
      85                 :          0 :           { ProblemType::RICHTMYER_MESHKOV, "richtmyer_meshkov" },
      86                 :          0 :           { ProblemType::SINEWAVE_PACKET, "sinewave_packet" }
      87                 :            :         },
      88                 :            :         //! keywords -> Enums
      89                 :        756 :         { { "user_defined", ProblemType::USER_DEFINED },
      90                 :          0 :           { "shear_diff", ProblemType::SHEAR_DIFF },
      91                 :          0 :           { "vortical_flow", ProblemType::VORTICAL_FLOW },
      92                 :          0 :           { "nl_energy_growth", ProblemType::NL_ENERGY_GROWTH },
      93                 :          0 :           { "rayleigh_taylor", ProblemType::RAYLEIGH_TAYLOR },
      94                 :          0 :           { "taylor_green", ProblemType::TAYLOR_GREEN },
      95                 :          0 :           { "slot_cyl", ProblemType::SLOT_CYL },
      96                 :          0 :           { "gauss_hump", ProblemType::GAUSS_HUMP },
      97                 :          0 :           { "cyl_advect", ProblemType::CYL_ADVECT },
      98                 :          0 :           { "cyl_vortex", ProblemType::CYL_VORTEX },
      99                 :          0 :           { "shedding_flow", ProblemType::SHEDDING_FLOW },
     100                 :          0 :           { "sod_shocktube", ProblemType::SOD_SHOCKTUBE },
     101                 :          0 :           { "rotated_sod_shocktube", ProblemType::ROTATED_SOD_SHOCKTUBE },
     102                 :          0 :           { "sod_shocktube", ProblemType::SOD_SHOCKTUBE },
     103                 :          0 :           { "sedov_blastwave", ProblemType::SEDOV_BLASTWAVE },
     104                 :          0 :           { "interface_advection", ProblemType::INTERFACE_ADVECTION },
     105                 :          0 :           { "gauss_hump_compflow", ProblemType::GAUSS_HUMP_COMPFLOW },
     106                 :          0 :           { "waterair_shocktube", ProblemType::WATERAIR_SHOCKTUBE },
     107                 :          0 :           { "shock_hebubble", ProblemType::SHOCK_HEBUBBLE },
     108                 :          0 :           { "underwater_ex", ProblemType::UNDERWATER_EX },
     109                 :          0 :           { "shockdensity_wave", ProblemType::SHOCKDENSITY_WAVE },
     110                 :          0 :           { "equilinterface_advect", ProblemType::EQUILINTERFACE_ADVECT },
     111                 :          0 :           { "richtmyer_meshkov", ProblemType::RICHTMYER_MESHKOV },
     112                 :          0 :           { "sinewave_packet", ProblemType::SINEWAVE_PACKET }
     113 [ +  - ][ +  - ]:      18144 :         } )
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  + ]
         [ +  + ][ -  - ]
                 [ -  - ]
     114                 :        378 :     {}
     115                 :            : };
     116                 :            : 
     117                 :            : } // ctr::
     118                 :            : } // inciter::
     119                 :            : 
     120                 :            : #endif // ProblemOptions_h

Generated by: LCOV version 1.14