Branch data Line data Source code
1 : : // *****************************************************************************
2 : : /*!
3 : : \file src/IO/ASCMeshReader.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 ASC mesh reader class declaration
10 : : \details ASC mesh reader class declaration. Mesh reader facilitating reading
11 : : a mesh from a simple text file used by Jacob Waltz's Chicoma code.
12 : : */
13 : : // *****************************************************************************
14 : : #ifndef ASCMeshReader_h
15 : : #define ASCMeshReader_h
16 : :
17 : : #include <iosfwd>
18 : :
19 : : #include "Reader.hpp"
20 : :
21 : : namespace tk {
22 : :
23 : : class UnsMesh;
24 : :
25 : : //! \brief ASCMeshReader : tk::Reader
26 : : //! \details Mesh reader class facilitating reading a mesh from a simple test
27 : : //! file used by Jacob Waltz's Chicoma code.
28 : 4 : class ASCMeshReader : public Reader {
29 : :
30 : : public:
31 : : //! Constructor
32 : 4 : explicit ASCMeshReader( const std::string& filename ) :
33 [ + - ][ + - ]: 4 : Reader( filename ) {}
34 : :
35 : : //! Read ASC mesh
36 : : void readMesh( UnsMesh& mesh );
37 : :
38 : : private:
39 : : //! Read header
40 : : void readHeader();
41 : :
42 : : //! Read nodes
43 : : void readNodes( UnsMesh& mesh );
44 : :
45 : : //! Read element connectivity
46 : : void readElements( UnsMesh& mesh );
47 : : };
48 : :
49 : : } // tk::
50 : :
51 : : #endif // ASCMeshReader_h
|