Quinoa all test code coverage report
Current view: top level - Control/Inciter/Options - AMRInitial.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 6 14 42.9 %
Date: 2024-11-08 10:55:28 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 18 36 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Control/Inciter/Options/AMRInitial.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     Initial (before t=0) adaptive mesh refinement (AMR) options
       9                 :            :   \details   Initial (before t=0) adaptive mesh refinement (AMR) options
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef InciterAMRInitialOptions_h
      13                 :            : #define InciterAMRInitialOptions_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                 :            : //! Initial AMR types
      25                 :            : enum class AMRInitialType : uint8_t { UNIFORM
      26                 :            :                                     , UNIFORM_DEREFINE
      27                 :            :                                     , INITIAL_CONDITIONS
      28                 :            :                                     , EDGELIST
      29                 :            :                                     , COORDINATES };
      30                 :            : 
      31                 :            : //! Pack/Unpack AMRInitialType: forward overload to generic enum class packer
      32                 :        225 : inline void operator|( PUP::er& p, AMRInitialType& e )
      33                 :        225 : { PUP::pup( p, e ); }
      34                 :            : 
      35                 :            : //! AMRInitial options: outsource searches to base templated on enum type
      36                 :            : class AMRInitial : public tk::Toggle< AMRInitialType > {
      37                 :            : 
      38                 :            :   public:
      39                 :            :     //! \brief Options constructor
      40                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      41                 :            :     //!    will handle client interactions
      42                 :         77 :     explicit AMRInitial() :
      43                 :            :       tk::Toggle< AMRInitialType >(
      44                 :            :         //! Group, i.e., options, name
      45                 :            :         "amr_initial",
      46                 :            :         //! Enums -> names
      47                 :          0 :         { { AMRInitialType::UNIFORM, "uniform" },
      48                 :          0 :           { AMRInitialType::UNIFORM_DEREFINE, "uniform_derefine" },
      49                 :          0 :           { AMRInitialType::INITIAL_CONDITIONS, "initial_conditions" },
      50                 :          0 :           { AMRInitialType::EDGELIST, "edgelist" },
      51                 :          0 :           { AMRInitialType::COORDINATES, "coords" } },
      52                 :            :         //! keywords -> Enums
      53                 :        154 :         { { "uniform", AMRInitialType::UNIFORM },
      54                 :          0 :           { "uniform_derefine", AMRInitialType::UNIFORM_DEREFINE },
      55                 :          0 :           { "initial_conditions", AMRInitialType::INITIAL_CONDITIONS },
      56                 :          0 :           { "edgelist", AMRInitialType::EDGELIST },
      57 [ +  - ][ +  - ]:        847 :           { "coords", AMRInitialType::COORDINATES } } )
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  + ][ +  + ]
         [ -  - ][ -  - ]
      58                 :         77 :     {}
      59                 :            : };
      60                 :            : 
      61                 :            : } // ctr::
      62                 :            : } // inciter::
      63                 :            : 
      64                 :            : #endif // InciterAMRInitialOptions_h

Generated by: LCOV version 1.14