Quinoa all test code coverage report
Current view: top level - Control/Inciter/Options - PrefIndicator.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 3 3 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: 9 22 40.9 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Control/Inciter/Options/PrefIndicator.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     Options for adaptive indicators for p-adaptive DG scheme.
       9                 :            :   \details   Options for adaptive indicators for p-adaptive DG scheme.
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef InciterPrefIndicatorOptions_h
      13                 :            : #define InciterPrefIndicatorOptions_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                 :            : //! Types of adaptive indicators
      24                 :            : enum class PrefIndicatorType : uint8_t { SPECTRAL_DECAY
      25                 :            :                                        , NON_CONFORMITY };
      26                 :            : 
      27                 :            : //! Pack/Unpack PrefIndicatorType: forward overload to generic enum class
      28                 :            : //! packer
      29                 :            : inline void operator|( PUP::er& p, PrefIndicatorType& e ) { PUP::pup( p, e ); }
      30                 :            : 
      31                 :            : //! PrefIndicator options: outsource searches to base templated on enum type
      32                 :         24 : class PrefIndicator : public tk::Toggle< PrefIndicatorType > {
      33                 :            : 
      34                 :            :   public:
      35                 :            :     //! \brief Options constructor
      36                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      37                 :            :     //!    will handle client interactions
      38                 :         24 :     explicit PrefIndicator() :
      39                 :            :       tk::Toggle< PrefIndicatorType >(
      40                 :            :         //! Group, i.e., options, name
      41                 :            :         "p-adaptive indicator",
      42                 :            :         //! Enums -> names
      43                 :            :         { { PrefIndicatorType::SPECTRAL_DECAY, "spectral_decay" },
      44                 :            :           { PrefIndicatorType::NON_CONFORMITY, "non_conformity" } },
      45                 :            :         //! keywords -> Enums
      46                 :            :         { { "spectral_decay", PrefIndicatorType::SPECTRAL_DECAY },
      47 [ +  - ][ +  - ]:        192 :           { "non_conformity", PrefIndicatorType::NON_CONFORMITY } } ) {}
         [ +  - ][ +  + ]
         [ -  + ][ +  + ]
         [ -  + ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      48                 :            : };
      49                 :            : 
      50                 :            : } // ctr::
      51                 :            : } // inciter::
      52                 :            : 
      53                 :            : #endif // InciterPrefIndicatorOptions_h

Generated by: LCOV version 1.14