Xyst test code coverage report
Current view: top level - IO - DiagWriter.hpp Coverage Total Hit
Commit: 1fb74642dd9d7732b67f32dec2f2762e238d3fa7 Lines: 100.0 % 1 1
Test Date: 2025-08-13 22:18:46 Functions: - 0 0
Legend: Lines:     hit not hit

            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-2025 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         5254 : 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 2.0-1