Quinoa all test code coverage report
Current view: top level - PDE/Transport/Physics - CGAdvection.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 4 4 100.0 %
Date: 2024-11-22 08:51:48 Functions: 2 2 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 "Inciter/Options/Physics.hpp"
      22                 :            : 
      23                 :            : namespace inciter {
      24                 :            : namespace cg {
      25                 :            : 
      26                 :            : //! Physics policy for advection using continuous Galerkin (no-op)
      27                 :            : //! \details This class is a no-op, consistent with no additional physics needed
      28                 :            : //!   to make the basic implementation in Transport the advection equation.
      29                 :            : class TransportPhysicsAdvection {
      30                 :            : 
      31                 :            :   private:
      32                 :            :     using ncomp_t = tk::ncomp_t;
      33                 :            : 
      34                 :            :   public:
      35                 :            :     //! Add diffusion contribution to rhs (no-op for advection only)
      36                 :            :     void
      37                 :            :     diffusionRhs( ncomp_t,
      38                 :            :                   tk::real,
      39                 :            :                   tk::real,
      40                 :            :                   const std::array< std::array< tk::real, 3 >, 4 >&,
      41                 :            :                   const std::array< std::size_t, 4 >&,
      42                 :            :                   const std::vector< std::array< tk::real, 4 > >&,
      43                 :            :                   const std::vector< const tk::real* >&,
      44                 :            :                   tk::Fields& ) const {}
      45                 :            : 
      46                 :            :     //! Compute the minimum time step size based on the diffusion
      47                 :            :     //! \return A large time step size, i.e., ignore
      48                 :            :     tk::real
      49                 :     180432 :     diffusion_dt( ncomp_t,
      50                 :            :                   tk::real,
      51                 :            :                   const std::vector< std::array< tk::real, 4 > >& ) const
      52                 :     180432 :     { return std::numeric_limits< tk::real >::max(); }
      53                 :            : 
      54                 :      11355 :     static ctr::PhysicsType type() noexcept
      55                 :      11355 :     { return ctr::PhysicsType::ADVECTION; }
      56                 :            : };
      57                 :            : 
      58                 :            : } // cg::
      59                 :            : } // inciter::
      60                 :            : 
      61                 :            : #endif // TransportPhysicsCGAdvection_h

Generated by: LCOV version 1.14