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

Generated by: LCOV version 1.14