Quinoa all test code coverage report
Current view: top level - PDE/MultiMat/Problem - SodShocktube.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 2 4 50.0 %
Date: 2021-11-11 18:25:50 Functions: 1 2 50.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/MultiMat/Problem/SodShocktube.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 Sod's shock-tube
       9                 :            :   \details   This file defines a policy class for the multi-material
      10                 :            :     compressible flow equations, defined in PDE/MultiMat/MultiMat.hpp.
      11                 :            :     See PDE/MultiMat/Problem.hpp for general requirements on Problem policy
      12                 :            :     classes for MultiMat.
      13                 :            : */
      14                 :            : // *****************************************************************************
      15                 :            : #ifndef MultiMatProblemSodShocktube_h
      16                 :            : #define MultiMatProblemSodShocktube_h
      17                 :            : 
      18                 :            : #include <string>
      19                 :            : 
      20                 :            : #include "Types.hpp"
      21                 :            : #include "Fields.hpp"
      22                 :            : #include "FunctionPrototypes.hpp"
      23                 :            : #include "SystemComponents.hpp"
      24                 :            : #include "Inciter/Options/Problem.hpp"
      25                 :            : 
      26                 :            : namespace inciter {
      27                 :            : 
      28                 :            : //! MultiMat system of PDEs problem: Sod shock-tube
      29                 :            : //! \see G. A. Sod. A Survey of Several Finite Difference Methods for Systems of
      30                 :            : //!   Nonlinear Hyperbolic Conservation Laws. J. Comput. Phys., 27:1–31, 1978.
      31                 :            : class MultiMatProblemSodShocktube {
      32                 :            : 
      33                 :            :   protected:
      34                 :            :     using ncomp_t = tk::ctr::ncomp_t;
      35                 :            :     using eq = tag::multimat;
      36                 :            : 
      37                 :            :   public:
      38                 :            :     //! Initialize numerical solution
      39                 :            :     static tk::InitializeFn::result_type
      40                 :            :     initialize( ncomp_t system, ncomp_t ncomp, tk::real x, tk::real, tk::real,
      41                 :            :                 tk::real );
      42                 :            : 
      43                 :            :     //! Evaluate analytical solution at (x,y,z,t) for all components
      44                 :            :     static std::vector< tk::real >
      45                 :          0 :     analyticSolution( ncomp_t system, ncomp_t ncomp,  tk::real x, tk::real y,
      46                 :            :                       tk::real z, tk::real t )
      47                 :          0 :     { return initialize( system, ncomp, x, y, z, t ); }
      48                 :            : 
      49                 :            :     //! Compute and return source term for this problem
      50                 :            :     static tk::MultiMatSrcFn::result_type
      51                 :            :     src( ncomp_t, ncomp_t ncomp, tk::real, tk::real, tk::real, tk::real )
      52                 :            :     { std::vector< tk::real > s( ncomp, 0.0 ); }
      53                 :            : 
      54                 :            :     //! Return names of integral variables to be output to diagnostics file
      55                 :            :     static std::vector< std::string > names( ncomp_t );
      56                 :            : 
      57                 :            :     //! Return problem type
      58                 :       1565 :     static ctr::ProblemType type() noexcept
      59                 :       1565 :     { return ctr::ProblemType::SOD_SHOCKTUBE; }
      60                 :            : };
      61                 :            : 
      62                 :            : } // inciter::
      63                 :            : 
      64                 :            : #endif // MultiMatProblemSodShocktube_h

Generated by: LCOV version 1.14