Quinoa regression test code coverage report
Current view: top level - PDE/CompFlow/Physics - CGNavierStokes.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 2 2 100.0 %
Date: 2021-11-11 13:17:06 Functions: 1 1 100.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/Physics/CGNavierStokes.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     Physics policy for the Navier-Stokes equation using continuous
       9                 :            :     Galerkin
      10                 :            :   \details   This file declares a Physics policy class for the compressible
      11                 :            :     single-material viscous flow equations using continuous Galerkin
      12                 :            :     discretization, defined in PDE/CompFlow/CGCompFlow.h. The class defined here
      13                 :            :     is used to configure the behavior of CGCompFlow. See
      14                 :            :     PDE/CompFlow/Physics/CG.h for general requirements on Physics policy classes
      15                 :            :     for CGCompFlow.
      16                 :            : */
      17                 :            : // *****************************************************************************
      18                 :            : #ifndef CompFlowPhysicsCGNavierStokes_h
      19                 :            : #define CompFlowPhysicsCGNavierStokes_h
      20                 :            : 
      21                 :            : #include <array>
      22                 :            : #include <limits>
      23                 :            : 
      24                 :            : #include "Types.hpp"
      25                 :            : #include "Fields.hpp"
      26                 :            : #include "Inciter/Options/Physics.hpp"
      27                 :            : #include "Inciter/InputDeck/InputDeck.hpp"
      28                 :            : 
      29                 :            : namespace inciter {
      30                 :            : 
      31                 :            : extern ctr::InputDeck g_inputdeck;
      32                 :            : 
      33                 :            : namespace cg {
      34                 :            : 
      35                 :            : //! CompFlow system of PDEs problem: Navier-Stokes (viscous flow)
      36                 :            : //! \details This class adds the viscous force contributions to the momentum and
      37                 :            : //!    energy conservation equations governing compressible flow.
      38                 :            : class CompFlowPhysicsNavierStokes {
      39                 :            : 
      40                 :            :   public:
      41                 :            :     //! Add viscous stress contribution to momentum and energy rhs
      42                 :            :     void
      43                 :            :     viscousRhs( tk::real dt,
      44                 :            :                 tk::real J,
      45                 :            :                 const std::array< std::size_t, 4 >& N,
      46                 :            :                 const std::array< std::array< tk::real, 3 >, 4 >& grad,
      47                 :            :                 const std::array< std::array< tk::real, 4 >, 5 >& u,
      48                 :            :                 const std::array< const tk::real*, 5 >& r,
      49                 :            :                 tk::Fields& R ) const;
      50                 :            : 
      51                 :            :     //! Compute the minimum time step size based on the viscous force
      52                 :            :     tk::real
      53                 :            :     viscous_dt( tk::real L,
      54                 :            :                 const std::array< std::array< tk::real, 4 >, 5 >& u ) const;
      55                 :            : 
      56                 :            :     //! Add heat conduction contribution to the energy rhs
      57                 :            :     void
      58                 :            :     conductRhs( tk::real dt,
      59                 :            :                 tk::real J,
      60                 :            :                 const std::array< std::size_t, 4 >& N,
      61                 :            :                 const std::array< std::array< tk::real, 3 >, 4 >& grad,
      62                 :            :                 const std::array< std::array< tk::real, 4 >, 5 >& u,
      63                 :            :                 const std::array< const tk::real*, 5 >& r,
      64                 :            :                 tk::Fields& R ) const;
      65                 :            : 
      66                 :            :     //! Compute the minimum time step size based on thermal diffusion
      67                 :            :     tk::real
      68                 :            :     conduct_dt( tk::real L,
      69                 :            :                 tk::real g,
      70                 :            :                 const std::array< std::array< tk::real, 4 >, 5 >& u ) const;
      71                 :            : 
      72                 :            :     //! Return phsyics type
      73                 :      15650 :     static ctr::PhysicsType type() noexcept
      74                 :      15650 :     { return ctr::PhysicsType::NAVIERSTOKES; }
      75                 :            : };
      76                 :            : 
      77                 :            : } // cg::
      78                 :            : 
      79                 :            : } // inciter::
      80                 :            : 
      81                 :            : #endif // CompFlowPhysicsCGNavierStokes_h

Generated by: LCOV version 1.14