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

           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 "Inciter/Options/Physics.hpp"
      20                 :            : #include "Inciter/Options/Problem.hpp"
      21                 :            : 
      22                 :            : namespace inciter {
      23                 :            : namespace ctr {
      24                 :            : 
      25                 :            : //! Differential equation types
      26                 :            : enum class PDEType : uint8_t { TRANSPORT,
      27                 :            :                                COMPFLOW,
      28                 :            :                                MULTIMAT,
      29                 :            :                                MULTISPECIES };
      30                 :            : 
      31                 :            : //! Pack/Unpack: forward overload to generic enum class packer
      32                 :       1766 : 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                 :            : class PDE : public tk::Toggle< PDEType > {
      44                 :            : 
      45                 :            :   public:
      46                 :            :     //! Constructor: pass associations references to base, which will handle
      47                 :            :     //! class-user interactions
      48                 :        189 :     explicit PDE() :
      49                 :            :       tk::Toggle< PDEType >( "Partial differential equation",
      50                 :            :         //! Enums -> names
      51                 :          0 :         { { PDEType::TRANSPORT, "transport" },
      52                 :          0 :           { PDEType::COMPFLOW, "compflow" },
      53                 :          0 :           { PDEType::MULTIMAT, "multimat" },
      54                 :          0 :           { PDEType::MULTISPECIES, "multispecies" }
      55                 :            :         },
      56                 :            :         //! keywords -> Enums
      57                 :        378 :         { { "transport", PDEType::TRANSPORT },
      58                 :          0 :           { "compflow", PDEType::COMPFLOW },
      59                 :          0 :           { "multimat", PDEType::MULTIMAT },
      60                 :          0 :           { "multispecies", PDEType::MULTISPECIES }
      61 [ +  - ][ +  - ]:       1701 :         } ) {}
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  + ][ +  + ]
         [ -  - ][ -  - ]
      62                 :            : };
      63                 :            : 
      64                 :            : } // ctr::
      65                 :            : } // inciter::
      66                 :            : 
      67                 :            : #endif // InciterPDEOptions_h

Generated by: LCOV version 1.14