Quinoa all test code coverage report
Current view: top level - Control/Inciter/Options - Initiate.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 26 42.3 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Control/Inciter/Options/Initiate.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     Initiation options for initial conditions
       9                 :            :   \details   Initiation options for initial conditions
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef InitiateOptions_h
      13                 :            : #define InitiateOptions_h
      14                 :            : 
      15                 :            : #include <brigand/sequences/list.hpp>
      16                 :            : 
      17                 :            : #include "Toggle.hpp"
      18                 :            : #include "PUPUtil.hpp"
      19                 :            : 
      20                 :            : namespace inciter {
      21                 :            : namespace ctr {
      22                 :            : 
      23                 :            : //! Initiation types
      24                 :            : enum class InitiateType : uint8_t { IMPULSE
      25                 :            :                                   , LINEAR };
      26                 :            : 
      27                 :            : //! Pack/Unpack InitiateType: forward overload to generic enum class packer
      28                 :            : inline void operator|( PUP::er& p, InitiateType& e ) { PUP::pup( p, e ); }
      29                 :            : 
      30                 :            : //! \brief Initiation options: outsource to base templated on enum type
      31 [ -  + ][ -  + ]:         14 : class Initiate : public tk::Toggle< InitiateType > {
      32                 :            : 
      33                 :            :   public:
      34                 :            :     //! \brief Options constructor
      35                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      36                 :            :     //!    will handle client interactions
      37                 :         14 :     explicit Initiate() :
      38                 :            :       tk::Toggle< InitiateType >(
      39                 :            :         //! Group, i.e., options, name
      40                 :            :         "initiate type",
      41                 :            :         //! Enums -> names (if defined, policy codes, if not, name)
      42                 :            :         { { InitiateType::IMPULSE, "impulse" },
      43                 :            :           { InitiateType::LINEAR, "linear" } },
      44                 :            :         //! keywords -> Enums
      45                 :            :         { { "impulse", InitiateType::IMPULSE },
      46 [ +  - ][ +  - ]:        112 :           { "linear", InitiateType::LINEAR } } )
         [ +  - ][ +  + ]
         [ -  + ][ +  + ]
         [ -  + ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      47                 :         14 :     {}
      48                 :            : 
      49                 :            : };
      50                 :            : 
      51                 :            : } // ctr::
      52                 :            : } // inciter::
      53                 :            : 
      54                 :            : #endif // InitiateOptions_h

Generated by: LCOV version 1.14