Quinoa all test code coverage report
Current view: top level - PDE/CompFlow/Problem - ShockDensityWave.cpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 0 26 0.0 %
Date: 2024-11-22 09:12:55 Functions: 0 4 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 38 0.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/PDE/CompFlow/Problem/ShockDensityWave.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 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                 :            : 
      15                 :            : #include "ShockDensityWave.hpp"
      16                 :            : #include "FieldOutput.hpp"
      17                 :            : 
      18                 :            : using inciter::CompFlowProblemShockDensityWave;
      19                 :            : 
      20                 :            : tk::InitializeFn::result_type
      21                 :          0 : CompFlowProblemShockDensityWave::initialize( ncomp_t,
      22                 :            :                                              const std::vector< EOS >& mat_blk,
      23                 :            :                                              tk::real x,
      24                 :            :                                              tk::real,
      25                 :            :                                              tk::real,
      26                 :            :                                              tk::real )
      27                 :            : // *****************************************************************************
      28                 :            : //! Evaluate analytical solution at (x,y,z,t) for all components
      29                 :            : //! \param[in] x X coordinate where to evaluate the solution
      30                 :            : //! \return Values of all components evaluated at (x)
      31                 :            : //! \note The function signature must follow tk::InitializeFn
      32                 :            : //! \details This function only initializes the Shock-density wave problem, but
      33                 :            : //!   does not actually give the analytical solution at time greater than 0.
      34                 :            : //!   This problem does not have an analytical solution.
      35                 :            : // *****************************************************************************
      36                 :            : {
      37                 :            :   tk::real r, p, u, v, w, rE;
      38         [ -  - ]:          0 :   if (x > -4.0) {
      39                 :            :     // density
      40                 :          0 :     r = 1.0 + 0.2 * sin(5.0 * x);
      41                 :            :     // pressure
      42                 :          0 :     p = 1.0;
      43                 :            :     // velocity
      44                 :          0 :     u = 0.0;
      45                 :          0 :     v = 0.0;
      46                 :          0 :     w = 0.0;
      47                 :            :   }
      48                 :            :   else {
      49                 :            :     // density
      50                 :          0 :     r = 3.8571;
      51                 :            :     // pressure
      52                 :          0 :     p = 10.3333;
      53                 :            :     // velocity
      54                 :          0 :     u = 2.6294;
      55                 :          0 :     v = 0.0;
      56                 :          0 :     w = 0.0;
      57                 :            :   }
      58                 :            :   // total specific energy
      59         [ -  - ]:          0 :   rE = mat_blk[0].compute< EOS::totalenergy >( r, u, v, w, p );
      60                 :            : 
      61                 :          0 :   return {{ r, r*u, r*v, r*w, rE }};
      62                 :            : }
      63                 :            : 
      64                 :            : tk::InitializeFn::result_type
      65                 :          0 : CompFlowProblemShockDensityWave::analyticSolution(
      66                 :            :  ncomp_t,
      67                 :            :  const std::vector< EOS >& mat_blk,
      68                 :            :  tk::real x,
      69                 :            :  tk::real,
      70                 :            :  tk::real,
      71                 :            :  tk::real )
      72                 :            : // *****************************************************************************
      73                 :            : //! Evaluate analytical solution at (x,y,z,t) for all components
      74                 :            : //! \param[in] x X coordinate where to evaluate the solution
      75                 :            : //! \return Values of all components evaluated at (x)
      76                 :            : //! \note The function signature must follow tk::InitializeFn
      77                 :            : //! \warning This is NOT the analytic solution at all times, only at t=0
      78                 :            : // *****************************************************************************
      79                 :            : {
      80                 :          0 :   return initialize( 0, mat_blk, x, 0, 0, 0 );
      81                 :            : }
      82                 :            : 
      83                 :            : std::vector< std::string >
      84         [ -  - ]:          0 : CompFlowProblemShockDensityWave::analyticFieldNames( ncomp_t ) const
      85                 :            : // *****************************************************************************
      86                 :            : // Return analytic field names to be output to file
      87                 :            : //! \return Vector of strings labelling analytic fields output in file
      88                 :            : // *****************************************************************************
      89                 :            : {
      90                 :            :   std::vector< std::string > n;
      91         [ -  - ]:          0 :   n.push_back( "density_analytical" );
      92         [ -  - ]:          0 :   n.push_back( "x-velocity_analytical" );
      93         [ -  - ]:          0 :   n.push_back( "y-velocity_analytical" );
      94         [ -  - ]:          0 :   n.push_back( "z-velocity_analytical" );
      95         [ -  - ]:          0 :   n.push_back( "specific_total_energy_analytical" );
      96         [ -  - ]:          0 :   n.push_back( "pressure_analytical" );
      97                 :            : 
      98                 :          0 :   return n;
      99                 :            : }
     100                 :            : 
     101                 :            : std::vector< std::string >
     102                 :          0 : CompFlowProblemShockDensityWave::names( ncomp_t ) const
     103                 :            : // *****************************************************************************
     104                 :            : //  Return names of integral variables to be output to diagnostics file
     105                 :            : //! \return Vector of strings labelling integral variables output
     106                 :            : // *****************************************************************************
     107                 :            : {
     108 [ -  - ][ -  - ]:          0 :   return { "r", "ru", "rv", "rw", "re" };
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
     109                 :            : }

Generated by: LCOV version 1.14