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

Generated by: LCOV version 1.14