Quinoa regression test code coverage report
Current view: top level - PDE/Transport/Physics - CGAdvection.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 6 6 100.0 %
Date: 2021-11-11 13:17:06 Functions: 3 3 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/Transport/Physics/CGAdvection.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 advection using continuous Galerkin (no-op)
       9                 :            :   \details   This file defines a Physics policy class for scalar transport using
      10                 :            :      continuous Galerkin discretization, defined in PDE/Transport/CGTransport.h.
      11                 :            :      The class defined here is used to configure the behavior of CGTransport.
      12                 :            :      See PDE/Transport/Physics/CG.h for general requirements on Physics policy
      13                 :            :      classes for CGTransport.
      14                 :            : */
      15                 :            : // *****************************************************************************
      16                 :            : #ifndef TransportPhysicsCGAdvection_h
      17                 :            : #define TransportPhysicsCGAdvection_h
      18                 :            : 
      19                 :            : #include <limits>
      20                 :            : 
      21                 :            : #include "Types.hpp"
      22                 :            : #include "Inciter/Options/Physics.hpp"
      23                 :            : 
      24                 :            : namespace inciter {
      25                 :            : namespace cg {
      26                 :            : 
      27                 :            : //! Physics policy for advection using continuous Galerkin (no-op)
      28                 :            : //! \details This class is a no-op, consistent with no additional physics needed
      29                 :            : //!   to make the basic implementation in Transport the advection equation.
      30                 :            : class TransportPhysicsAdvection {
      31                 :            : 
      32                 :            :   private:
      33                 :            :     using ncomp_t = tk::ctr::ncomp_t;
      34                 :            : 
      35                 :            :   public:
      36                 :            :     //! Add diffusion contribution to rhs (no-op for advection only)
      37                 :            :     void
      38                 :    7252262 :     diffusionRhs( ncomp_t,
      39                 :            :                   ncomp_t,
      40                 :            :                   tk::real,
      41                 :            :                   tk::real,
      42                 :            :                   const std::array< std::array< tk::real, 3 >, 4 >&,
      43                 :            :                   const std::array< std::size_t, 4 >&,
      44                 :            :                   const std::vector< std::array< tk::real, 4 > >&,
      45                 :            :                   const std::vector< const tk::real* >&,
      46                 :    7252262 :                   tk::Fields& ) const {}
      47                 :            : 
      48                 :            :     //! Compute the minimum time step size based on the diffusion
      49                 :            :     //! \return A large time step size, i.e., ignore
      50                 :            :     tk::real
      51                 :     991462 :     diffusion_dt( tk::ctr::ncomp_t,
      52                 :            :                   tk::ctr::ncomp_t,
      53                 :            :                   tk::real,
      54                 :            :                   const std::vector< std::array< tk::real, 4 > >& ) const
      55                 :     991462 :     { return std::numeric_limits< tk::real >::max(); }
      56                 :            : 
      57                 :       7825 :     static ctr::PhysicsType type() noexcept
      58                 :       7825 :     { return ctr::PhysicsType::ADVECTION; }
      59                 :            : };
      60                 :            : 
      61                 :            : } // cg::
      62                 :            : } // inciter::
      63                 :            : 
      64                 :            : #endif // TransportPhysicsCGAdvection_h

Generated by: LCOV version 1.14