Quinoa all test code coverage report
Current view: top level - Inciter - ElemDiagnostics.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 2 2 100.0 %
Date: 2021-11-11 18:25:50 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/Inciter/ElemDiagnostics.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     ElemDiagnostics class for collecting diagnostics
       9                 :            :   \details   ElemDiagnostics class for collecting diagnostics, e.g., residuals,
      10                 :            :     and various norms of errors while solving partial differential equations.
      11                 :            : */
      12                 :            : // *****************************************************************************
      13                 :            : #ifndef ElemDiagnostics_h
      14                 :            : #define ElemDiagnostics_h
      15                 :            : 
      16                 :            : #include "Discretization.hpp"
      17                 :            : #include "PUPUtil.hpp"
      18                 :            : #include "Diagnostics.hpp"
      19                 :            : 
      20                 :            : namespace inciter {
      21                 :            : 
      22                 :            : //! ElemDiagnostics class used to compute diagnostics while integrating PDEs
      23                 :            : class ElemDiagnostics {
      24                 :            : 
      25                 :            :   public:
      26                 :            :     //! Configure Charm++ custom reduction types initiated from this class
      27                 :            :     static void registerReducers();
      28                 :            : 
      29                 :            :     //! Compute diagnostics, e.g., residuals, norms of errors, etc.
      30                 :            :     bool compute( Discretization& d,
      31                 :            :                   const std::size_t nchGhost,
      32                 :            :                   const tk::Fields& geoElem,
      33                 :            :                   const std::vector< std::size_t >& ndofel,
      34                 :            :                   const tk::Fields& u ) const;
      35                 :            : 
      36                 :            :     /** @name Charm++ pack/unpack serializer member functions */
      37                 :            :     ///@{
      38                 :            :     //! \brief Pack/Unpack serialize member function
      39                 :      15930 :     void pup( PUP::er& ) {}
      40                 :            :     //! \brief Pack/Unpack serialize operator|
      41                 :            :     //! \param[in,out] p Charm++'s PUP::er serializer object reference
      42                 :            :     //! \param[in,out] d Diagnostics object reference
      43                 :      15930 :     friend void operator|( PUP::er& p, ElemDiagnostics& d ) { d.pup(p); }
      44                 :            :     //@}
      45                 :            : 
      46                 :            :   private:
      47                 :            :     //! Compute diagnostics for DG
      48                 :            :     void compute_diag( const Discretization& d,
      49                 :            :                        const std::size_t ndofel,
      50                 :            :                        const std::size_t nchGhost,
      51                 :            :                        const tk::Fields& geoElem,
      52                 :            :                        const std::vector< std::size_t >& pIndex,
      53                 :            :                        const tk::Fields& u,
      54                 :            :                        std::vector< std::vector< tk::real > >& diag ) const;
      55                 :            : };
      56                 :            : 
      57                 :            : } // inciter::
      58                 :            : 
      59                 :            : #endif // ElemDiagnostics_h

Generated by: LCOV version 1.14