Branch data Line data Source code
1 : : // *****************************************************************************
2 : : /*!
3 : : \file src/IO/RDGFLOMeshReader.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 RDGFLO mesh reader class declaration
10 : : \details RDGFLO mesh reader class declaration. Mesh reader facilitating
11 : : reading a mesh from a simple text file used by Prof. Hong Luo at
12 : : North Carolina State University.
13 : : */
14 : : // *****************************************************************************
15 : : #ifndef RDGFLOMeshReader_h
16 : : #define RDGFLOMeshReader_h
17 : :
18 : : #include <iosfwd>
19 : :
20 : : #include "Reader.hpp"
21 : :
22 : : namespace tk {
23 : :
24 : : class UnsMesh;
25 : :
26 : : //! \brief RDGFLOMeshReader : tk::Reader
27 : : //! \details Mesh reader class facilitating reading a mesh from a simple text
28 : : //! file used by Prof. Hong Luo at North Carolina State University.
29 : 1 : class RDGFLOMeshReader : public Reader {
30 : :
31 : : public:
32 : : //! Constructor
33 : 1 : explicit RDGFLOMeshReader( const std::string& filename ) :
34 [ + - ][ + - ]: 1 : Reader( filename ), m_nnode(0), m_ntet(0), m_ntri(0) {}
35 : :
36 : : //! Read RDGFLO mesh
37 : : void readMesh( UnsMesh& mesh );
38 : :
39 : : private:
40 : : std::size_t m_nnode; //!< Number of nodes
41 : : std::size_t m_ntet; //!< Number of tetrahedra
42 : : std::size_t m_ntri; //!< Number of triangles
43 : :
44 : : //! Read header
45 : : void readHeader();
46 : :
47 : : //! Read nodes
48 : : void readNodes( UnsMesh& mesh );
49 : :
50 : : //! Read element connectivity
51 : : void readElements( UnsMesh& mesh );
52 : : };
53 : :
54 : : } // tk::
55 : :
56 : : #endif // RDGFLOMeshReader_h
|