Quinoa all test code coverage report
Current view: top level - PDE/Integrate - Quadrature.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 12 12 100.0 %
Date: 2021-11-09 15:14:18 Functions: 4 4 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 20 32 62.5 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/Integrate/Quadrature.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     Quadrature coordinates and weights for numerical integration
       9                 :            :   \details   This file contains functions that provide Gauss quadrature
      10                 :            :     coordinates and weights for numerical integration.
      11                 :            : */
      12                 :            : // *****************************************************************************
      13                 :            : #ifndef Quadrature_h
      14                 :            : #define Quadrature_h
      15                 :            : 
      16                 :            : #include <array>
      17                 :            : #include <vector>
      18                 :            : #include <stdexcept>
      19                 :            : 
      20                 :            : #include "Types.hpp"
      21                 :            : #include "Exception.hpp"
      22                 :            : 
      23                 :            : namespace tk {
      24                 :            : //! Initialization of number of Gauss points for volume integration
      25                 :            : //! \param[in] ndof Number of degrees of freedom
      26                 :   17430915 : constexpr std::size_t NGvol( const std::size_t ndof ) {
      27 [ +  + ][ +  + ]:   17430915 :   return ndof == 1 ? 1 :
                 [ -  + ]
      28                 :            :          ndof == 4 ? 5 :
      29                 :            :          ndof == 10 ? 11 :
      30         [ -  - ]:   17430915 :          throw std::logic_error("ndof must be one of 1,4,10");
      31                 :            : }
      32                 :            : 
      33                 :            : 
      34                 :            : //! Initialization of number of Gauss points for face integration
      35                 :            : //! \param[in] ndof Number of degrees of freedom
      36                 :  156485213 : constexpr std::size_t NGfa( const std::size_t ndof ) {
      37 [ +  + ][ +  + ]:  156485213 :   return ndof == 1 ? 1 :
                 [ -  + ]
      38                 :            :          ndof == 4 ? 3 :
      39                 :            :          ndof == 10 ? 6 :
      40         [ -  - ]:  156485213 :          throw std::logic_error("ndof must be one of 1,4,10");
      41                 :            : }
      42                 :            : 
      43                 :            : //! \brief Initialization of number of Gauss points for volume integration
      44                 :            : //!   in error estimation
      45                 :            : //! \param[in] ndof Number of degrees of freedom
      46                 :    8917630 : constexpr std::size_t NGdiag( const std::size_t ndof ) {
      47 [ +  + ][ +  + ]:    8917630 :   return ndof == 1 ? 1 :
                 [ -  + ]
      48                 :            :          ndof == 4 ? 4 :
      49                 :            :          ndof == 10 ? 14 :
      50         [ -  - ]:    8917630 :          throw std::logic_error("ndof must be one of 1,4,10");
      51                 :            : }
      52                 :            : 
      53                 :            : //! \brief Initialization of number of Gauss points for volume integration
      54                 :            : //!   in DG initialization
      55                 :            : //! \param[in] ndof Number of degrees of freedom
      56                 :       1050 : constexpr std::size_t NGinit( const std::size_t ndof ) {
      57 [ +  + ][ +  + ]:       1050 :   return ndof == 1 ? 1 :
                 [ -  + ]
      58                 :            :          ndof == 4 ? 14 :
      59                 :            :          ndof == 10 ? 14 :
      60         [ -  - ]:       1050 :          throw std::logic_error("ndof must be one of 1,4,10");
      61                 :            : }
      62                 :            : 
      63                 :            : //! Initialize Gaussian quadrature points locations and weights for a tetrahedron
      64                 :            : void
      65                 :            : GaussQuadratureTet( std::size_t NG,
      66                 :            :                     std::array< std::vector< real >, 3 >& coordgp,
      67                 :            :                     std::vector< real >& wgp );
      68                 :            : 
      69                 :            : //! Initialize Gaussian quadrature points locations and weights for a triangle
      70                 :            : void
      71                 :            : GaussQuadratureTri( std::size_t NG,
      72                 :            :                     std::array< std::vector< real >, 2 >& coordgp,
      73                 :            :                     std::vector< real >& wgp );
      74                 :            : } // tk::
      75                 :            : 
      76                 :            : #endif // Quadrature_h

Generated by: LCOV version 1.14