Quinoa all test code coverage report
Current view: top level - PDE/CompFlow/Problem - UserDefined.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 6 10 60.0 %
Date: 2024-04-29 14:59:56 Functions: 2 4 50.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/UserDefined.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 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 CompFlowProblemUserDefined_h
      15                 :            : #define CompFlowProblemUserDefined_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 "EoS/EOS.hpp"
      25                 :            : #include "Inciter/InputDeck/InputDeck.hpp"
      26                 :            : 
      27                 :            : namespace inciter {
      28                 :            : 
      29                 :            : //! CompFlow system of PDEs problem: user defined
      30                 :            : class CompFlowProblemUserDefined {
      31                 :            : 
      32                 :            :   private:
      33                 :            :     using ncomp_t = tk::ncomp_t;
      34                 :            :     using eq = tag::compflow;
      35                 :            :     using real = tk::real;
      36                 :            : 
      37                 :            :   public:
      38                 :            :     //! Initialize numerical solution
      39                 :            :     static tk::InitializeFn::result_type
      40                 :            :     initialize( ncomp_t ncomp, const std::vector< EOS >&,
      41                 :            :                 tk::real, 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                 :          0 :     analyticSolution( ncomp_t, const std::vector< EOS >&,
      46                 :            :                       tk::real, tk::real, tk::real, tk::real )
      47                 :          0 :     { return {}; }
      48                 :            : 
      49                 :            :     //! Compute and return source term for Rayleigh-Taylor manufactured solution
      50                 :            :     //! \param[in,out] sv Source term vector
      51                 :            :     //! \note The function signature must follow tk::SrcFn
      52                 :            :     static tk::SrcFn::result_type
      53                 :   36039120 :     src( ncomp_t, const std::vector< EOS >&, tk::real, tk::real,
      54                 :            :          tk::real, tk::real, std::vector< tk::real >& sv )
      55                 :            :     {
      56 [ -  + ][ -  - ]:   36039120 :       Assert(sv.size() == 5, "Incorrect source vector size");
         [ -  - ][ -  - ]
      57                 :   36039120 :       sv[0] = sv[1] = sv[2] = sv[3] = sv[4] = 0.0;
      58                 :   36039120 :     }
      59                 :            : 
      60                 :            :     //! Return field names to be output to file
      61                 :          0 :     std::vector< std::string > analyticFieldNames( ncomp_t ) const
      62                 :          0 :     { return {}; }
      63                 :            : 
      64                 :            :     //! Return names of integral variables to be output to diagnostics file
      65                 :            :     std::vector< std::string > names( ncomp_t ) const;
      66                 :            : 
      67                 :            :     //! Return problem type
      68                 :       7020 :     static ctr::ProblemType type() noexcept
      69                 :       7020 :     { return ctr::ProblemType::USER_DEFINED; }
      70                 :            : };
      71                 :            : } // inciter::
      72                 :            : 
      73                 :            : #endif // CompFlowProblemUserDefined_h

Generated by: LCOV version 1.14