Quinoa all test code coverage report
Current view: top level - PDE/CompFlow/Problem - ShockDensityWave.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 2 6 33.3 %
Date: 2024-11-08 10:55:28 Functions: 1 2 50.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 8 0.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/CompFlow/Problem/ShockDensityWave.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 shock-density wave problem
       9                 :            :   \details   This file defines a 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 CompFlowProblemShockDensityWave_h
      15                 :            : #define CompFlowProblemShockDensityWave_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                 :            : 
      26                 :            : namespace inciter {
      27                 :            : 
      28                 :            : //! MultiMat system of PDEs problem: Shock-density Wave
      29                 :            : //! \see C. Shu, S. Osher. Efficient implementation of essentially
      30                 :            : //!   non-oscillatory shock-capturing schemes, II. J. Comput. Phys., 1989.
      31                 :            : class CompFlowProblemShockDensityWave {
      32                 :            : 
      33                 :            :   protected:
      34                 :            :     using ncomp_t = tk::ncomp_t;
      35                 :            :     using eq = tag::compflow;
      36                 :            : 
      37                 :            :   public:
      38                 :            :     //! Initialize numerical solution
      39                 :            :     static tk::InitializeFn::result_type
      40                 :            :     initialize( ncomp_t, const std::vector< EOS >&,
      41                 :            :                 tk::real x, tk::real, tk::real, tk::real );
      42                 :            : 
      43                 :            :     //! Evaluate analytical solution at (x,y,z,t) for all components
      44                 :            :     static tk::InitializeFn::result_type
      45                 :            :     analyticSolution( ncomp_t, const std::vector< EOS >&,
      46                 :            :                       tk::real x, tk::real, tk::real, tk::real );
      47                 :            : 
      48                 :            :     //! Compute and return source term for this problem
      49                 :            :     //! \param[in,out] sv Source term vector
      50                 :            :     //! \note The function signature must follow tk::SrcFn
      51                 :            :     static tk::SrcFn::result_type
      52                 :          0 :     src( ncomp_t, const std::vector< EOS >&, tk::real, tk::real,
      53                 :            :          tk::real, tk::real, std::vector< tk::real >& sv )
      54                 :            :     {
      55 [ -  - ][ -  - ]:          0 :       Assert(sv.size() == 5, "Incorrect source vector size");
         [ -  - ][ -  - ]
      56                 :          0 :       sv[0] = sv[1] = sv[2] = sv[3] = sv[4] = 0.0;
      57                 :          0 :     }
      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                 :            :     //! Return problem type
      66                 :       4542 :     static ctr::ProblemType type() noexcept
      67                 :       4542 :     { return ctr::ProblemType::SHOCKDENSITY_WAVE; }
      68                 :            : };
      69                 :            : 
      70                 :            : } // inciter::
      71                 :            : 
      72                 :            : #endif // CompFlowProblemShockDensityWave_h

Generated by: LCOV version 1.14