Quinoa all test code coverage report
Current view: top level - PDE/MultiMat/Problem - EquilInterfaceAdvect.cpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 0 26 0.0 %
Date: 2024-11-08 10:55:28 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 14 0.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/MultiMat/Problem/EquilInterfaceAdvect.cpp
       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 Problem policy class for the multi-material
      10                 :            :     compressible flow equations, defined in PDE/MultiMat/MultiMat.hpp. See
      11                 :            :     PDE/MultiMat/Problem.hpp for general requirements on Problem policy classes
      12                 :            :     for MultiMat.
      13                 :            : */
      14                 :            : // *****************************************************************************
      15                 :            : 
      16                 :            : #include "EquilInterfaceAdvect.hpp"
      17                 :            : #include "Inciter/InputDeck/InputDeck.hpp"
      18                 :            : #include "MultiMat/MultiMatIndexing.hpp"
      19                 :            : 
      20                 :            : namespace inciter {
      21                 :            : 
      22                 :            : extern ctr::InputDeck g_inputdeck;
      23                 :            : 
      24                 :            : } // ::inciter
      25                 :            : 
      26                 :            : using inciter::MultiMatProblemEquilInterfaceAdvect;
      27                 :            : 
      28                 :            : tk::InitializeFn::result_type
      29                 :          0 : MultiMatProblemEquilInterfaceAdvect::initialize(
      30                 :            :   ncomp_t ncomp,
      31                 :            :   const std::vector< EOS >& mat_blk,
      32                 :            :   tk::real x,
      33                 :            :   tk::real y,
      34                 :            :   tk::real z,
      35                 :            :   tk::real t )
      36                 :            : // *****************************************************************************
      37                 :            : //! Evaluate analytical solution at (x,y,z,t) for all components
      38                 :            : //! \param[in] ncomp Number of scalar components in this PDE system
      39                 :            : //! \param[in] x X coordinate where to evaluate the solution
      40                 :            : //! \param[in] y Y coordinate where to evaluate the solution
      41                 :            : //! \param[in] z Z coordinate where to evaluate the solution
      42                 :            : //! \param[in] t Time at which to evaluate the solution
      43                 :            : //! \return Values of all components evaluated at (x,y,z,t)
      44                 :            : //! \note The function signature must follow tk::InitializeFn
      45                 :            : //! \details This function initializes the equilibrium interface advection
      46                 :            : //!   problem, and gives the analytical solution at time greater than 0.
      47                 :            : // *****************************************************************************
      48                 :            : {
      49                 :            :   // see also Control/Inciter/InputDeck/Grammar.hpp
      50 [ -  - ][ -  - ]:          0 :   Assert( ncomp == 9, "Number of scalar components must be 9" );
         [ -  - ][ -  - ]
      51                 :            : 
      52                 :          0 :   auto nmat = g_inputdeck.get< eq, tag::nmat >();
      53                 :            : 
      54         [ -  - ]:          0 :   std::vector< tk::real > s( ncomp, 0.0 );
      55                 :            :   tk::real r, p, u, v, w;
      56                 :          0 :   auto alphamin = 1.0e-12;
      57                 :            : 
      58                 :            :   // pressure
      59                 :          0 :   p = 0.4;
      60                 :            :   // velocity
      61                 :          0 :   u = 3.0;
      62                 :          0 :   v = 2.0;
      63                 :          0 :   w = 1.0;
      64                 :            :   // location of interface
      65                 :          0 :   auto xc = 0.45 + u*t;
      66                 :          0 :   auto yc = 0.45 + v*t;
      67                 :          0 :   auto zc = 0.45 + w*t;
      68                 :            :   // volume-fraction
      69                 :          0 :   s[volfracIdx(nmat, 0)] = (1.0-2.0*alphamin) * 0.5 *
      70                 :          0 :     (1.0-std::tanh(5.0*((x-xc)+(y-yc)+(z-zc)))) + alphamin;
      71                 :          0 :   s[volfracIdx(nmat, 1)] = 1.0 - s[volfracIdx(nmat, 0)];
      72                 :            :   // density
      73                 :          0 :   r = 5.0 + x + y + z;
      74                 :          0 :   s[densityIdx(nmat, 0)] = s[volfracIdx(nmat, 0)]*r;
      75                 :          0 :   s[densityIdx(nmat, 1)] = s[volfracIdx(nmat, 1)]*r;
      76                 :            :   // total specific energy
      77                 :          0 :   s[energyIdx(nmat, 0)] = s[volfracIdx(nmat, 0)]*
      78         [ -  - ]:          0 :     mat_blk[0].compute< EOS::totalenergy >( r, u, v, w, p );
      79                 :          0 :   s[energyIdx(nmat, 1)] = s[volfracIdx(nmat, 1)]*
      80         [ -  - ]:          0 :     mat_blk[1].compute< EOS::totalenergy >( r, u, v, w, p );
      81                 :            :   // momentum
      82                 :          0 :   s[momentumIdx(nmat, 0)] = r*u;
      83                 :          0 :   s[momentumIdx(nmat, 1)] = r*v;
      84                 :          0 :   s[momentumIdx(nmat, 2)] = r*w;
      85                 :            : 
      86                 :          0 :   return s;
      87                 :            : }

Generated by: LCOV version 1.14