Walker test code coverage report
Current view: top level - Control/Walker/Options - Normalization.hpp (source / functions) Hit Total Coverage
Commit: test_coverage.info Lines: 7 7 100.0 %
Date: 2022-09-21 13:52:12 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 14 40 35.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Control/Walker/Options/Normalization.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     Normalization variants (used for MixDirichlet)
       9                 :            :   \details   Normalization variants (used for MixDirichlet).
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef NormalizationOptions_h
      13                 :            : #define NormalizationOptions_h
      14                 :            : 
      15                 :            : #include <brigand/sequences/list.hpp>
      16                 :            : 
      17                 :            : #include "Toggle.hpp"
      18                 :            : #include "Keywords.hpp"
      19                 :            : #include "PUPUtil.hpp"
      20                 :            : 
      21                 :            : namespace walker {
      22                 :            : namespace ctr {
      23                 :            : 
      24                 :            : //! Normalization types
      25                 :            : enum class NormalizationType : uint8_t { LIGHT=0
      26                 :            :                                        , HEAVY };
      27                 :            : 
      28                 :            : //! \brief Pack/Unpack NormalizationType: forward overload to generic enum
      29                 :            : //!    class packer
      30                 :            : inline void operator|( PUP::er& p, NormalizationType& e )
      31                 :            : { PUP::pup( p, e ); }
      32                 :            : 
      33                 :            : //! Normalization variants: outsource to base templated on enum type
      34         [ -  + ]:         16 : class Normalization : public tk::Toggle< NormalizationType > {
      35                 :            : 
      36                 :            :   public:
      37                 :            :     //! Valid expected choices to make them also available at compile-time
      38                 :            :     using keywords = brigand::list< kw::light
      39                 :            :                                   , kw::heavy
      40                 :            :                                   >;
      41                 :            : 
      42                 :            :     //! \brief Options constructor
      43                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      44                 :            :     //!    will handle client interactions
      45                 :         16 :     explicit Normalization() :
      46                 :            :       tk::Toggle< NormalizationType >(
      47                 :            :         //! Group, i.e., options, name
      48                 :            :         "Normalization",
      49                 :            :         //! Enums -> names
      50                 :         16 :         { { NormalizationType::LIGHT, kw::light::name() },
      51 [ -  + ][ -  - ]:         16 :           { NormalizationType::HEAVY, kw::heavy::name() } },
      52                 :            :         //! keywords -> Enums
      53                 :         16 :         { { kw::light::string(), NormalizationType::LIGHT },
      54 [ +  - ][ +  - ]:        144 :           { kw::heavy::string(), NormalizationType::HEAVY } } )
         [ +  - ][ +  + ]
         [ -  + ][ -  + ]
         [ +  + ][ -  + ]
         [ -  + ][ -  + ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      55                 :         16 :     {}
      56                 :            : };
      57                 :            : 
      58                 :            : } // ctr::
      59                 :            : } // walker::
      60                 :            : 
      61                 :            : #endif // NormalizationOptions_h

Generated by: LCOV version 1.14