Quinoa all test code coverage report
Current view: top level - PDE/CompFlow/Problem - GaussHumpCompflow.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 4 4 100.0 %
Date: 2021-11-11 18:25:50 Functions: 2 2 100.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/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 "SystemComponents.hpp"
      24                 :            : #include "Inciter/Options/Problem.hpp"
      25                 :            : 
      26                 :            : namespace inciter {
      27                 :            : 
      28                 :            : //! CompFlow system of PDEs problem: GaussHump
      29                 :            : class CompFlowProblemGaussHump {
      30                 :            : 
      31                 :            :   private:
      32                 :            :     using ncomp_t = tk::ctr::ncomp_t;
      33                 :            :     using eq = tag::compflow;
      34                 :            : 
      35                 :            :   public:
      36                 :            :     //! Initialize numerical solution
      37                 :            :     static tk::InitializeFn::result_type
      38                 :            :     initialize( ncomp_t system, ncomp_t ncomp, tk::real x, tk::real y, tk::real,
      39                 :            :                 tk::real t );
      40                 :            : 
      41                 :            :     //! Evaluate analytical solution at (x,y,z,t) for all components
      42                 :            :     static tk::InitializeFn::result_type
      43                 :            :     analyticSolution( ncomp_t system, ncomp_t ncomp, tk::real x, tk::real y,
      44                 :            :                       tk::real, tk::real t );
      45                 :            : 
      46                 :            :     //! Compute and return source term for manufactured solution
      47                 :            :     //! \param[in,out] r Density source
      48                 :            :     //! \param[in,out] ru X momentum source
      49                 :            :     //! \param[in,out] rv Y momentum source
      50                 :            :     //! \param[in,out] rw Z momentum source
      51                 :            :     //! \param[in,out] re Specific total energy source
      52                 :            :     //! \note The function signature must follow tk::SrcFn
      53                 :            :     static tk::CompFlowSrcFn::result_type
      54                 :    2682510 :     src( ncomp_t, tk::real, tk::real, tk::real, tk::real,
      55                 :            :          tk::real& r, tk::real& ru, tk::real& rv, tk::real& rw, tk::real& re )
      56                 :    2682510 :     { r = ru = rv = rw = re = 0.0; }
      57                 :            : 
      58                 :            :     //! Return analytic field names to be output to file
      59                 :            :     std::vector< std::string > analyticFieldNames( ncomp_t ) const;
      60                 :            : 
      61                 :            :     //! Return names of integral variables to be output to diagnostics file
      62                 :            :     std::vector< std::string > names( ncomp_t ) const;
      63                 :            : 
      64                 :            :     //! Assign prescribed velocity at a point
      65                 :            :     static std::vector< std::array< tk::real, 3 > >
      66                 :            :     prescribedVelocity( ncomp_t,
      67                 :            :                         ncomp_t ncomp,
      68                 :            :                         tk::real,
      69                 :            :                         tk::real,
      70                 :            :                         tk::real );
      71                 :            : 
      72                 :            :     //! Return problem type
      73                 :       4695 :     static ctr::ProblemType type() noexcept
      74                 :       4695 :     { return ctr::ProblemType::GAUSS_HUMP_COMPFLOW; }
      75                 :            : };
      76                 :            : 
      77                 :            : } // inciter::
      78                 :            : 
      79                 :            : #endif // CompFlowProblemGaussHump_h

Generated by: LCOV version 1.14