Quinoa all test code coverage report
Current view: top level - Control/Inciter/Options - AMRError.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 6 7 85.7 %
Date: 2021-11-11 18:25:50 Functions: 2 2 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/AMRError.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 computing error estimates for adaptive mesh refinement
       9                 :            :   \details   Options for computing error estimates for adaptive mesh refinement.
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef InciterAMRErrorOptions_h
      13                 :            : #define InciterAMRErrorOptions_h
      14                 :            : 
      15                 :            : #include <brigand/sequences/list.hpp>
      16                 :            : 
      17                 :            : #include "Toggle.hpp"
      18                 :            : #include "Keywords.hpp"
      19                 :            : #include "PUPUtil.hpp"
      20                 :            : 
      21                 :            : namespace inciter {
      22                 :            : namespace ctr {
      23                 :            : 
      24                 :            : //! Mesh partitioning algorithm types
      25                 :            : enum class AMRErrorType : uint8_t { JUMP
      26                 :            :                                   , HESSIAN };
      27                 :            : 
      28                 :            : //! Pack/Unpack AMRErrorType: forward overload to generic enum class packer
      29                 :       1798 : inline void operator|( PUP::er& p, AMRErrorType& e ) { PUP::pup( p, e ); }
      30                 :            : 
      31                 :            : //! AMRError options: outsource searches to base templated on enum type
      32                 :            : class AMRError : public tk::Toggle< AMRErrorType > {
      33                 :            : 
      34                 :            :   public:
      35                 :            :     //! Valid expected choices to make them also available at compile-time
      36                 :            :     using keywords = brigand::list< kw::amr_jump
      37                 :            :                                   , kw::amr_hessian >;
      38                 :            : 
      39                 :            :     //! \brief Options constructor
      40                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      41                 :            :     //!    will handle client interactions
      42                 :         75 :     explicit AMRError() :
      43                 :            :       tk::Toggle< AMRErrorType >(
      44                 :            :         //! Group, i.e., options, name
      45         [ +  - ]:        150 :         kw::amr_error::name(),
      46                 :            :         //! Enums -> names
      47         [ +  - ]:         75 :         { { AMRErrorType::JUMP, kw::amr_jump::name() },
      48         [ +  - ]:        150 :           { AMRErrorType::HESSIAN, kw::amr_hessian::name() } },
      49                 :            :         //! keywords -> Enums
      50                 :          0 :         { { kw::amr_jump::string(), AMRErrorType::JUMP },
      51 [ +  - ][ +  - ]:        750 :           { kw::amr_hessian::string(), AMRErrorType::HESSIAN } } ) {}
         [ +  - ][ +  - ]
         [ +  + ][ +  + ]
         [ -  - ][ -  - ]
      52                 :            : };
      53                 :            : 
      54                 :            : } // ctr::
      55                 :            : } // inciter::
      56                 :            : 
      57                 :            : #endif // InciterAMRErrorOptions_h

Generated by: LCOV version 1.14