Quinoa all test code coverage report
Current view: top level - PDE/CompFlow/Problem - GaussHumpCompflow.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 6 6 100.0 %
Date: 2024-04-29 14:59:56 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 8 12.5 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/CompFlow/Problem/GaussHumpCompflow.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     Problem configuration for the compressible flow equations
       9                 :            :   \details   This file declares a problem policy class for the compressible flow
      10                 :            :     equations, defined in PDE/CompFlow/CompFlow.h. See PDE/CompFlow/Problem.h
      11                 :            :     for general requirements on Problem policy classes for CompFlow.
      12                 :            : */
      13                 :            : // *****************************************************************************
      14                 :            : #ifndef CompFlowProblemGaussHump_h
      15                 :            : #define CompFlowProblemGaussHump_h
      16                 :            : 
      17                 :            : #include <string>
      18                 :            : #include <unordered_set>
      19                 :            : 
      20                 :            : #include "Types.hpp"
      21                 :            : #include "Fields.hpp"
      22                 :            : #include "FunctionPrototypes.hpp"
      23                 :            : #include "Inciter/Options/Problem.hpp"
      24                 :            : #include "Inciter/InputDeck/InputDeck.hpp"
      25                 :            : #include "EoS/EOS.hpp"
      26                 :            : 
      27                 :            : namespace inciter {
      28                 :            : 
      29                 :            : //! CompFlow system of PDEs problem: GaussHump
      30                 :            : class CompFlowProblemGaussHump {
      31                 :            : 
      32                 :            :   private:
      33                 :            :     using ncomp_t = tk::ncomp_t;
      34                 :            :     using eq = tag::compflow;
      35                 :            : 
      36                 :            :   public:
      37                 :            :     //! Initialize numerical solution
      38                 :            :     static tk::InitializeFn::result_type
      39                 :            :     initialize( ncomp_t ncomp, const std::vector< EOS >&,
      40                 :            :                 tk::real x, tk::real y, tk::real, tk::real t );
      41                 :            : 
      42                 :            :     //! Evaluate analytical solution at (x,y,z,t) for all components
      43                 :            :     static tk::InitializeFn::result_type
      44                 :            :     analyticSolution( ncomp_t ncomp,
      45                 :            :                       const std::vector< EOS >&, tk::real x, tk::real y,
      46                 :            :                       tk::real, tk::real t );
      47                 :            : 
      48                 :            :     //! Compute and return source term for manufactured solution
      49                 :            :     //! \param[in,out] sv Source term vector
      50                 :            :     //! \note The function signature must follow tk::SrcFn
      51                 :            :     static tk::SrcFn::result_type
      52                 :    2964990 :     src( ncomp_t, const std::vector< EOS >&, tk::real, tk::real,
      53                 :            :          tk::real, tk::real, std::vector< tk::real >& sv )
      54                 :            :     {
      55 [ -  + ][ -  - ]:    2964990 :       Assert(sv.size() == 5, "Incorrect source vector size");
         [ -  - ][ -  - ]
      56                 :    2964990 :       sv[0] = sv[1] = sv[2] = sv[3] = sv[4] = 0.0;
      57                 :    2964990 :     }
      58                 :            : 
      59                 :            :     //! Return analytic field names to be output to file
      60                 :            :     std::vector< std::string > analyticFieldNames( ncomp_t ) const;
      61                 :            : 
      62                 :            :     //! Return names of integral variables to be output to diagnostics file
      63                 :            :     std::vector< std::string > names( ncomp_t ) const;
      64                 :            : 
      65                 :            :     //! Assign prescribed velocity at a point
      66                 :            :     static std::vector< std::array< tk::real, 3 > >
      67                 :            :     prescribedVelocity( ncomp_t ncomp,
      68                 :            :                         tk::real,
      69                 :            :                         tk::real,
      70                 :            :                         tk::real );
      71                 :            : 
      72                 :            :     //! Return problem type
      73                 :       7020 :     static ctr::ProblemType type() noexcept
      74                 :       7020 :     { return ctr::ProblemType::GAUSS_HUMP_COMPFLOW; }
      75                 :            : };
      76                 :            : 
      77                 :            : } // inciter::
      78                 :            : 
      79                 :            : #endif // CompFlowProblemGaussHump_h

Generated by: LCOV version 1.14