Quinoa all test code coverage report
Current view: top level - PDE/MultiMat/Problem - UserDefined.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 4 5 80.0 %
Date: 2024-04-22 13:03:21 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 2 100.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/MultiMat/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 multi-material compressible flow
       9                 :            :     equations
      10                 :            :   \details   This file defines a Problem policy class for the multi-material
      11                 :            :     compressible flow equations, defined under PDE/MultiMat. See
      12                 :            :     PDE/MultiMat/Problem.h for general requirements on Problem policy
      13                 :            :     classes for MultiMat.
      14                 :            : */
      15                 :            : // *****************************************************************************
      16                 :            : #ifndef MultiMatProblemUserDefined_h
      17                 :            : #define MultiMatProblemUserDefined_h
      18                 :            : 
      19                 :            : #include <string>
      20                 :            : 
      21                 :            : #include "Types.hpp"
      22                 :            : #include "Inciter/InputDeck/InputDeck.hpp"
      23                 :            : #include "FunctionPrototypes.hpp"
      24                 :            : #include "Inciter/Options/Problem.hpp"
      25                 :            : #include "MultiMat/MultiMatIndexing.hpp"
      26                 :            : #include "EoS/EOS.hpp"
      27                 :            : 
      28                 :            : namespace inciter {
      29                 :            : 
      30                 :            : //! MultiMat system of PDEs problem: user defined
      31                 :            : class MultiMatProblemUserDefined {
      32                 :            : 
      33                 :            :   private:
      34                 :            :     using ncomp_t = tk::ncomp_t;
      35                 :            :     using eq = tag::multimat;
      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 std::vector< tk::real >
      45                 :            :     analyticSolution( ncomp_t ncomp,
      46                 :            :                       const std::vector< EOS >& mat_blk, tk::real x,
      47                 :            :                       tk::real y, tk::real z, tk::real t )
      48                 :          0 :     { return initialize( ncomp, mat_blk, x, y, z, t ); }
      49                 :            : 
      50                 :            :     //! Compute and return source term for Rayleigh-Taylor manufactured solution
      51                 :            :     //! \details No-op for user-deefined problems.
      52                 :            :     static tk::SrcFn::result_type
      53                 :     164760 :     src( ncomp_t, const std::vector< EOS >&,tk::real, tk::real,
      54                 :            :          tk::real, tk::real, std::vector< tk::real >& sv )
      55                 :            :     {
      56         [ +  + ]:    2540760 :       for (std::size_t i=0; i<sv.size(); ++i) {
      57                 :    2376000 :         sv[i] = 0.0;
      58                 :            :       }
      59                 :     164760 :     }
      60                 :            : 
      61                 :            :    static ctr::ProblemType type() noexcept
      62                 :            :    { return ctr::ProblemType::USER_DEFINED; }
      63                 :            : };
      64                 :            : } // inciter::
      65                 :            : 
      66                 :            : #endif // MultiMatProblemUserDefined_h

Generated by: LCOV version 1.14