Xyst test code coverage report
Current view: top level - IO - DiagWriter.hpp (source / functions) Hit Total Coverage
Commit: ac3d28f3f8b86b070d167d5aee7fb8740cd81df6 Lines: 1 1 100.0 %
Date: 2024-11-28 13:48:12 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 5 10 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/IO/DiagWriter.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     Text diagnostics writer definition
      10                 :            :   \details   This file feines the ASCII diagnostics writer class that
      11                 :            :      facilitates outputing diagnostics to text files.
      12                 :            : */
      13                 :            : // *****************************************************************************
      14                 :            : #pragma once
      15                 :            : 
      16                 :            : #include <string>
      17                 :            : #include <vector>
      18                 :            : #include <fstream>
      19                 :            : 
      20                 :            : #include "Types.hpp"
      21                 :            : #include "Writer.hpp"
      22                 :            : 
      23                 :            : namespace tk {
      24                 :            : 
      25                 :            : //! \brief DiagWriter : tk::Writer
      26                 :            : //! \details ASCII diagnostics writer class that facilitates outputing
      27                 :            : //!   diagnostics to text files.
      28 [ -  + ][ -  + ]:       5026 : class DiagWriter : public tk::Writer {
         [ -  + ][ -  + ]
                 [ -  + ]
      29                 :            : 
      30                 :            :   public:
      31                 :            :     //! Constructor
      32                 :            :     explicit DiagWriter( const std::string& filename,
      33                 :            :                          const std::string& format = "default",
      34                 :            :                          std::streamsize precision = std::cout.precision(),
      35                 :            :                          std::ios_base::openmode mode = std::ios_base::out );
      36                 :            : 
      37                 :            :     //! Write out diagnostics file header
      38                 :            :     void header( const std::vector< std::string >& name ) const;
      39                 :            : 
      40                 :            :     //! Write diagnostics file
      41                 :            :     std::size_t write( uint64_t it,
      42                 :            :                        tk::real t,
      43                 :            :                        tk::real dt,
      44                 :            :                        const std::vector< tk::real >& diagnostics );
      45                 :            : 
      46                 :            :   private:
      47                 :            :     int m_precision;     //!< Floating-point precision in digits
      48                 :            :     int m_width;         //!< Floating-point number width
      49                 :            : };
      50                 :            : 
      51                 :            : } // tk::

Generated by: LCOV version 1.16