Quinoa all test code coverage report
Current view: top level - Control/Inciter/Options - Physics.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 4 4 100.0 %
Date: 2024-11-27 16:40:44 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/Physics.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     Physics options for inciter
       9                 :            :   \details   Physics options for inciter
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef PhysicsOptions_h
      13                 :            : #define PhysicsOptions_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                 :            : //! Physics types
      25                 :            : enum class PhysicsType : uint8_t { ADVECTION
      26                 :            :                                  , ADVDIFF
      27                 :            :                                  , EULER
      28                 :            :                                  , ENERGYPILL
      29                 :            :                                  };
      30                 :            : 
      31                 :            : //! Pack/Unpack PhysicsType: forward overload to generic enum class packer
      32                 :            : inline void operator|( PUP::er& p, PhysicsType& e ) { PUP::pup( p, e ); }
      33                 :            : 
      34                 :            : //! \brief Physics options: outsource to base templated on enum type
      35                 :         97 : class Physics : public tk::Toggle< PhysicsType > {
      36                 :            : 
      37                 :            :   public:
      38                 :            :     //! \brief Options constructor
      39                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      40                 :            :     //!    will handle client interactions
      41                 :        286 :     explicit Physics() :
      42                 :            :       tk::Toggle< PhysicsType >(
      43                 :            :         //! Group, i.e., options, name
      44                 :            :         "Physics",
      45                 :            :         //! Enums -> names (if defined, policy codes, if not, name)
      46                 :            :         { { PhysicsType::ADVECTION, "advection" }
      47                 :            :         , { PhysicsType::ADVDIFF, "advdiff" }
      48                 :            :         , { PhysicsType::EULER, "euler" }
      49                 :            :         , { PhysicsType::ENERGYPILL, "energy_pill" }
      50                 :            :         },
      51                 :            :         //! keywords -> Enums
      52                 :            :         { { "advection", PhysicsType::ADVECTION }
      53                 :            :         , { "advdiff", PhysicsType::ADVDIFF }
      54                 :            :         , { "euler", PhysicsType::EULER }
      55                 :            :         , { "energy_pill", PhysicsType::ENERGYPILL }
      56 [ +  - ][ +  - ]:       3432 :         } )
         [ +  - ][ +  + ]
         [ -  + ][ +  + ]
         [ -  + ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      57                 :        286 :     {}
      58                 :            : };
      59                 :            : 
      60                 :            : } // ctr::
      61                 :            : } // inciter::
      62                 :            : 
      63                 :            : #endif // PhysicsOptions_h

Generated by: LCOV version 1.14