Xyst test code coverage report
Current view: top level - Inciter - NodeDiagnostics.hpp (source / functions) Hit Total Coverage
Commit: 5689ba12dc66a776d3d75f1ee48cc7d78eaa18dc Lines: 2 2 100.0 %
Date: 2024-11-22 19:17:03 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/NodeDiagnostics.hpp
       4                 :            :   \copyright 2012-2015 J. Bakosi,
       5                 :            :              2016-2018 Los Alamos National Security, LLC.,
       6                 :            :              2019-2021 Triad National Security, LLC.,
       7                 :            :              2022-2024 J. Bakosi
       8                 :            :              All rights reserved. See the LICENSE file for details.
       9                 :            :   \brief     NodeDiagnostics class for collecting diagnostics
      10                 :            :   \details   NodeDiagnostics class for collecting diagnostics, e.g., residuals,
      11                 :            :     and various norms of errors while solving partial differential equations.
      12                 :            : */
      13                 :            : // *****************************************************************************
      14                 :            : #pragma once
      15                 :            : 
      16                 :            : #include "Discretization.hpp"
      17                 :            : #include "PUPUtil.hpp"
      18                 :            : 
      19                 :            : namespace inciter {
      20                 :            : 
      21                 :            : //! NodeDiagnostics class used to compute diagnostics while integrating PDEs
      22                 :            : class NodeDiagnostics {
      23                 :            : 
      24                 :            :   public:
      25                 :            :     //! Configure Charm++ custom reduction types initiated from this class
      26                 :            :     static void registerReducers();
      27                 :            : 
      28                 :            :     //! Compute diagnostics for density-based solvers
      29                 :            :     bool rhocompute( Discretization& d,
      30                 :            :                      const tk::Fields& u,
      31                 :            :                      const tk::Fields& un,
      32                 :            :                      uint64_t diag_iter ) const;
      33                 :            : 
      34                 :            :     //! Compute diagnostics for pressure-based solvers
      35                 :            :     bool precompute( Discretization& d,
      36                 :            :                      const tk::Fields& u,
      37                 :            :                      const tk::Fields& un,
      38                 :            :                      const std::vector< tk::real >& p,
      39                 :            :                      const std::vector< tk::real >& dp,
      40                 :            :                      uint64_t diag_iter ) const;
      41                 :            : 
      42                 :            :     //! Compute diagnostics for artificial compressibility solvers
      43                 :            :     bool accompute( Discretization& d,
      44                 :            :                     const tk::Fields& u,
      45                 :            :                     const tk::Fields& un,
      46                 :            :                     uint64_t diag_iter ) const;
      47                 :            : 
      48                 :            :     /** @name Charm++ pack/unpack serializer member functions */
      49                 :            :     ///@{
      50                 :            :     //! \brief Pack/Unpack serialize member function
      51                 :      14707 :     void pup( PUP::er & ) {}
      52                 :            :     //! \brief Pack/Unpack serialize operator|
      53                 :            :     //! \param[in,out] p Charm++'s PUP::er serializer object reference
      54                 :            :     //! \param[in,out] d Diagnostics object reference
      55                 :      14707 :     friend void operator|( PUP::er& p, NodeDiagnostics& d ) { d.pup(p); }
      56                 :            :     //@}
      57                 :            : };
      58                 :            : 
      59                 :            : } // inciter::

Generated by: LCOV version 1.16