Quinoa all test code coverage report
Current view: top level - PDE - ConfigureTransport.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 0 7 0.0 %
Date: 2024-04-29 14:42:33 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 0.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/ConfigureTransport.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     Register and compile configuration on the Transport PDE
       9                 :            :   \details   Register and compile configuration on the Transport PDE.
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef ConfigureTransport_h
      13                 :            : #define ConfigureTransport_h
      14                 :            : 
      15                 :            : #include <set>
      16                 :            : #include <map>
      17                 :            : #include <vector>
      18                 :            : 
      19                 :            : #include "PDEFactory.hpp"
      20                 :            : #include "Inciter/Options/PDE.hpp"
      21                 :            : 
      22                 :            : namespace inciter {
      23                 :            : 
      24                 :            : //! Register transport PDEs into PDE factory
      25                 :            : void
      26                 :            : registerTransport( CGFactory& cf,
      27                 :            :                    DGFactory& df,
      28                 :            :                    std::set< ctr::PDEType >& cgt,
      29                 :            :                    std::set< ctr::PDEType >& dgt );
      30                 :            : 
      31                 :            : //! Return information on the transport PDE
      32                 :            : std::vector< std::pair< std::string, std::string > >
      33                 :            : infoTransport( std::map< ctr::PDEType, tk::ncomp_t >& cnt );
      34                 :            : 
      35                 :            : /** @name Functions that compute physics variables from the numerical solution for Transport */
      36                 :            : ///@{
      37                 :            : 
      38                 :            : #if defined(__clang__)
      39                 :            :   #pragma clang diagnostic push
      40                 :            :   #pragma clang diagnostic ignored "-Wunused-function"
      41                 :            : #endif
      42                 :            : 
      43                 :            : namespace transport {
      44                 :            : 
      45                 :            : //! Compute material indicator function for output to file
      46                 :            : //! \note Must follow the signature in tk::GetVarFn
      47                 :            : //! \param[in] U Numerical solution
      48                 :            : //! \param[in] rdof Number of reconstructed solution DOFs
      49                 :            : //! \return Material indicator function ready to be output to file
      50                 :            : static tk::GetVarFn::result_type
      51                 :          0 : matIndicatorOutVar( const tk::Fields& U, std::size_t rdof )
      52                 :            : {
      53                 :          0 :   auto ncomp = U.nprop()/rdof;
      54                 :          0 :   std::vector< tk::real > m(U.nunk(), 0.0);
      55         [ -  - ]:          0 :   for (std::size_t i=0; i<U.nunk(); ++i) {
      56         [ -  - ]:          0 :     for (std::size_t k=0; k<ncomp; ++k)
      57                 :          0 :       m[i] += U(i, rdof*k) * static_cast< tk::real >(k+1);
      58                 :            :   }
      59                 :          0 :   return m;
      60                 :            : }
      61                 :            : 
      62                 :            : } // transport::
      63                 :            : 
      64                 :            : #if defined(__clang__)
      65                 :            :   #pragma clang diagnostic pop
      66                 :            : #endif
      67                 :            : 
      68                 :            : //@}
      69                 :            : 
      70                 :            : } // inciter::
      71                 :            : 
      72                 :            : #endif // ConfigureTransport_h

Generated by: LCOV version 1.14