Quinoa all test code coverage report
Current view: top level - IO - DiagWriter.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 1 1 100.0 %
Date: 2024-11-08 10:37:44 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 4 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                 :            :              All rights reserved. See the LICENSE file for details.
       8                 :            :   \brief     Text diagnostics writer declaration
       9                 :            :   \details   This file declares the ASCII diagnostics writer class that
      10                 :            :      facilitates outputing diagnostics to text files.
      11                 :            : */
      12                 :            : // *****************************************************************************
      13                 :            : #ifndef DiagWriter_h
      14                 :            : #define DiagWriter_h
      15                 :            : 
      16                 :            : #include <string>
      17                 :            : #include <vector>
      18                 :            : #include <fstream>
      19                 :            : 
      20                 :            : #include "Types.hpp"
      21                 :            : #include "Writer.hpp"
      22                 :            : #include "Options/TxtFloatFormat.hpp"
      23                 :            : 
      24                 :            : namespace tk {
      25                 :            : 
      26                 :            : //! \brief DiagWriter : tk::Writer
      27                 :            : //! \details ASCII diagnostics writer class that facilitates outputing
      28                 :            : //!   diagnostics to text files.
      29 [ -  + ][ -  + ]:       3463 : class DiagWriter : public tk::Writer {
      30                 :            : 
      31                 :            :   public:
      32                 :            :     //! Constructor
      33                 :            :     explicit DiagWriter(
      34                 :            :       const std::string& filename,
      35                 :            :       tk::ctr::TxtFloatFormatType format = tk::ctr::TxtFloatFormatType::DEFAULT,
      36                 :            :       std::streamsize precision = std::cout.precision(),
      37                 :            :       std::ios_base::openmode mode = std::ios_base::out );
      38                 :            : 
      39                 :            :     //! Write out diagnostics file header
      40                 :            :     void header( const std::vector< std::string >& name ) const;
      41                 :            : 
      42                 :            :     //! Write diagnostics file
      43                 :            :     std::size_t diag( uint64_t it,
      44                 :            :                       tk::real t,
      45                 :            :                       tk::real dt,
      46                 :            :                       const std::vector< tk::real >& diagnostics );
      47                 :            : 
      48                 :            :     //! Precision accessor
      49                 :            :     int prec() const { return m_precision; }
      50                 :            : 
      51                 :            :   private:
      52                 :            :     int m_precision;    //!< Floating-point precision in digits
      53                 :            :     int m_width;        //!< Floating-point number width
      54                 :            : };
      55                 :            : 
      56                 :            : } // tk::
      57                 :            : 
      58                 :            : #endif // DiagWriter_h

Generated by: LCOV version 1.14