Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
ReadGmsh.hpp
Go to the documentation of this file.
1 /**
2  * MOAB, a Mesh-Oriented datABase, is a software component for creating,
3  * storing and accessing finite element mesh data.
4  *
5  * Copyright 2004 Sandia Corporation. Under the terms of Contract
6  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
7  * retains certain rights in this software.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  */
15 
16 #ifndef READ_GMSH_HPP
17 #define READ_GMSH_HPP
18 
19 #include "moab/Forward.hpp"
20 #include "moab/ReaderIface.hpp"
21 #include "moab/Range.hpp"
22 
23 namespace moab
24 {
25 
26 class ReadUtilIface;
27 struct GmshElemType;
28 
29 /**
30  * \brief Gmsh (http://www.geuz.org/gmsh) file reader
31  * \author Jason Kraftcheck
32  */
33 class ReadGmsh : public ReaderIface
34 {
35 
36  public:
37  //! factory method
38  static ReaderIface* factory( Interface* );
39 
40  ErrorCode load_file( const char* file_name,
41  const EntityHandle* file_set,
42  const FileOptions& opts,
43  const SubsetList* subset_list = 0,
44  const Tag* file_id_tag = 0 );
45 
46  ErrorCode read_tag_values( const char* file_name,
47  const char* tag_name,
48  const FileOptions& opts,
49  std::vector< int >& tag_values_out,
50  const SubsetList* subset_list = 0 );
51 
52  //! Constructor
53  ReadGmsh( Interface* impl = NULL );
54 
55  //! Destructor
56  virtual ~ReadGmsh();
57 
58  private:
60  const std::vector< int >& elem_ids,
61  const std::vector< int >& matl_ids,
62  const std::vector< int >& geom_ids,
63  const std::vector< int >& prtn_ids,
64  const std::vector< EntityHandle >& connectivity,
65  const Tag* file_id_tag );
66 
67  ErrorCode create_sets( EntityType element_type,
68  const Range& elements,
69  const std::vector< int >& set_ids,
70  int set_type );
71 
73 
75 
76  //! interface instance
78 
81 };
82 
83 } // namespace moab
84 
85 #endif