Quinoa all test code coverage report
Current view: top level - PDE/MultiMat/Problem - InterfaceAdvection.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 4 5 80.0 %
Date: 2024-11-22 09:12:55 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/InterfaceAdvection.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.hpp for general requirements on Problem policy classes
      13                 :            :     for MultiMat.
      14                 :            : */
      15                 :            : // *****************************************************************************
      16                 :            : #ifndef MultiMatProblemInterfaceAdvection_h
      17                 :            : #define MultiMatProblemInterfaceAdvection_h
      18                 :            : 
      19                 :            : #include <string>
      20                 :            : 
      21                 :            : #include "Types.hpp"
      22                 :            : #include "Fields.hpp"
      23                 :            : #include "FunctionPrototypes.hpp"
      24                 :            : #include "Inciter/Options/Problem.hpp"
      25                 :            : #include "Inciter/InputDeck/InputDeck.hpp"
      26                 :            : #include "EoS/EOS.hpp"
      27                 :            : 
      28                 :            : namespace inciter {
      29                 :            : 
      30                 :            : //! MultiMat system of PDEs problem: interface advection
      31                 :            : //! \see Waltz, et. al, "Manufactured solutions for the three-dimensional Euler
      32                 :            : //!   equations with relevance to Inertial Confinement Fusion", Journal of
      33                 :            : //!   Computational Physics 267 (2014) 196-209.
      34                 :            : class MultiMatProblemInterfaceAdvection {
      35                 :            : 
      36                 :            :   private:
      37                 :            :     using ncomp_t = tk::ncomp_t;
      38                 :            :     using eq = tag::multimat;
      39                 :            : 
      40                 :            :   public:
      41                 :            :     //! Initialize numerical solution
      42                 :            :     static tk::InitializeFn::result_type
      43                 :            :     initialize( ncomp_t ncomp,
      44                 :            :                 const std::vector< EOS >&,
      45                 :            :                 tk::real x,
      46                 :            :                 tk::real y,
      47                 :            :                 tk::real /*z*/,
      48                 :            :                 tk::real t );
      49                 :            : 
      50                 :            :     //! Evaluate analytical solution at (x,y,z,t) for all components
      51                 :            :     static std::vector< tk::real >
      52                 :            :     analyticSolution( ncomp_t ncomp,
      53                 :            :                       const std::vector< EOS >& mat_blk, tk::real x,
      54                 :            :                       tk::real y, tk::real z, tk::real t )
      55                 :          0 :     { return initialize( ncomp, mat_blk, x, y, z, t ); }
      56                 :            : 
      57                 :            :     //! Compute and return source term for interface advection
      58                 :            :     static tk::SrcFn::result_type
      59                 :    1145460 :     src( ncomp_t, const std::vector< EOS >&, tk::real, tk::real,
      60                 :            :          tk::real, tk::real, std::vector< tk::real >& sv )
      61                 :            :     {
      62         [ +  + ]:   14890980 :       for (std::size_t i=0; i<sv.size(); ++i) {
      63                 :   13745520 :         sv[i] = 0.0;
      64                 :            :       }
      65                 :    1145460 :     }
      66                 :            : 
      67                 :            :     static ctr::ProblemType type() noexcept
      68                 :            :     { return ctr::ProblemType::INTERFACE_ADVECTION; }
      69                 :            : };
      70                 :            : 
      71                 :            : } // inciter::
      72                 :            : 
      73                 :            : #endif // MultiMatProblemInterfaceAdvection_h

Generated by: LCOV version 1.14