Quinoa all test code coverage report
Current view: top level - Control/Inciter/Options - PDE.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 8 8 100.0 %
Date: 2021-11-09 15:14:18 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 16 46 34.8 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Control/Inciter/Options/PDE.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     Partial differential equation options and associations for inciter
       9                 :            :   \details   Partial differential equation options and associations for inciter
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef InciterPDEOptions_h
      13                 :            : #define InciterPDEOptions_h
      14                 :            : 
      15                 :            : #include <brigand/sequences/list.hpp>
      16                 :            : 
      17                 :            : #include "TaggedTuple.hpp"
      18                 :            : #include "Toggle.hpp"
      19                 :            : #include "Keywords.hpp"
      20                 :            : #include "Inciter/Options/Physics.hpp"
      21                 :            : #include "Inciter/Options/Problem.hpp"
      22                 :            : 
      23                 :            : namespace inciter {
      24                 :            : namespace ctr {
      25                 :            : 
      26                 :            : //! Differential equation types
      27                 :            : enum class PDEType : uint8_t { TRANSPORT,
      28                 :            :                                COMPFLOW,
      29                 :            :                                MULTIMAT };
      30                 :            : 
      31                 :            : //! Pack/Unpack: forward overload to generic enum class packer
      32                 :            : inline void operator|( PUP::er& p, PDEType& e ) { PUP::pup( p, e ); }
      33                 :            : 
      34                 :            : //! Differential equation key used to access a diff eq in a factory
      35                 :            : using PDEKey =
      36                 :            :   tk::TaggedTuple< brigand::list<
      37                 :            :       tag::pde,         PDEType
      38                 :            :     , tag::physics,     ctr::PhysicsType
      39                 :            :     , tag::problem,     ctr::ProblemType
      40                 :            :   > >;
      41                 :            : 
      42                 :            : //! Class with base templated on the above enum class with associations
      43                 :        466 : class PDE : public tk::Toggle< PDEType > {
      44                 :            : 
      45                 :            :   public:
      46                 :            :     // List valid expected choices to make them also available at compile-time
      47                 :            :     using keywords = brigand::list< kw::transport
      48                 :            :                                   , kw::compflow
      49                 :            :                                   , kw::multimat
      50                 :            :                                   >;
      51                 :            : 
      52                 :            :     //! Constructor: pass associations references to base, which will handle
      53                 :            :     //! class-user interactions
      54                 :        466 :     explicit PDE() :
      55                 :            :       tk::Toggle< PDEType >( "Partial differential equation",
      56                 :            :         //! Enums -> names
      57                 :        466 :         { { PDEType::TRANSPORT, kw::transport::name() },
      58 [ -  + ][ -  - ]:        466 :           { PDEType::COMPFLOW, kw::compflow::name() },
      59 [ -  + ][ -  - ]:        466 :           { PDEType::MULTIMAT, kw::multimat::name() } },
      60                 :            :         //! keywords -> Enums
      61                 :        466 :         { { kw::transport::string(), PDEType::TRANSPORT },
      62 [ -  + ][ -  - ]:        466 :           { kw::compflow::string(), PDEType::COMPFLOW },
      63 [ +  - ][ +  - ]:       5592 :           { kw::multimat::string(), PDEType::MULTIMAT } } ) {}
         [ +  - ][ +  + ]
         [ +  + ][ -  + ]
         [ +  + ][ -  + ]
         [ -  + ][ -  + ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      64                 :            : };
      65                 :            : 
      66                 :            : } // ctr::
      67                 :            : } // inciter::
      68                 :            : 
      69                 :            : #endif // InciterPDEOptions_h

Generated by: LCOV version 1.14