Quinoa all test code coverage report
Current view: top level - Mesh - STLMesh.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 0 1 0.0 %
Date: 2024-04-29 14:42:33 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 2 0.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Mesh/STLMesh.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     STL (STereoLithography) mesh class declaration
       9                 :            :   \details   STL (STereoLithography) mesh class declaration.
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef STLMesh_h
      13                 :            : #define STLMesh_h
      14                 :            : 
      15                 :            : #include <memory>
      16                 :            : #include <string>
      17                 :            : #include <cstddef>
      18                 :            : #include <iosfwd>
      19                 :            : 
      20                 :            : #include "Types.hpp"
      21                 :            : 
      22                 :            : namespace tk {
      23                 :            : 
      24                 :            : //! STLMesh
      25                 :            : class STLMesh {
      26                 :            : 
      27                 :            :   public:
      28                 :            :     //! Constructor
      29                 :            :     explicit STLMesh() : m_name(), m_x(), m_y(), m_z(), m_nnode( 0 ) {}
      30                 :            : 
      31                 :            :     //! Allocate memory for mesh
      32                 :            :     void alloc( std::size_t num );
      33                 :            : 
      34                 :            :     //! Set mesh name
      35         [ -  - ]:          0 :     void setName( const std::string& n ) { m_name = n; }
      36                 :            :     //! Get mesh name
      37                 :            :     const std::string& name() const noexcept { return m_name; }
      38                 :            : 
      39                 :            :     //! Coordinate array accessors
      40                 :            :     tk::real* getx() const noexcept { return m_x.get(); }
      41                 :            :     tk::real* gety() const noexcept { return m_y.get(); }
      42                 :            :     tk::real* getz() const noexcept { return m_z.get(); }
      43                 :            : 
      44                 :            :     //! Number of nodes accessor
      45                 :            :     std::size_t nnode() const noexcept { return m_nnode; }
      46                 :            : 
      47                 :            :   private:
      48                 :            :     std::string m_name;                         //!< Name of the mesh
      49                 :            :     std::unique_ptr< tk::real[] > m_x;          //!< Vertex x coordinates
      50                 :            :     std::unique_ptr< tk::real[] > m_y;          //!< Vertex y coordinates
      51                 :            :     std::unique_ptr< tk::real[] > m_z;          //!< Vertex z coordinates
      52                 :            : 
      53                 :            :     std::size_t m_nnode;                        //!< Number of nodes
      54                 :            : };
      55                 :            : 
      56                 :            : } // tk::
      57                 :            : 
      58                 :            : #endif // STLMesh_h

Generated by: LCOV version 1.14