Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
00001 #ifndef READ_CGNS_HPP 00002 #define READ_CGNS_HPP 00003 00004 #include "moab/ReaderIface.hpp" 00005 #include "moab/Range.hpp" 00006 00007 #include "cgnslib.h" 00008 00009 namespace moab 00010 { 00011 00012 class ReadUtilIface; 00013 class Interface; 00014 00015 /** 00016 * \brief Export CGNS files. 00017 * \author Carlos Breviglieri, Carlos Junqueira Junior 00018 */ 00019 00020 class ReadCGNS : public ReaderIface 00021 { 00022 00023 public: 00024 //! factory method 00025 static ReaderIface* factory( Interface* ); 00026 00027 ErrorCode load_file( const char* file_name, 00028 const EntityHandle* file_set, 00029 const FileOptions& opts, 00030 const SubsetList* subset_list = 0, 00031 const Tag* file_id_tag = 0 ); 00032 00033 ErrorCode read_tag_values( const char* file_name, 00034 const char* tag_name, 00035 const FileOptions& opts, 00036 std::vector< int >& tag_values_out, 00037 const SubsetList* subset_list = 0 ); 00038 00039 //! Constructor 00040 ReadCGNS( Interface* impl = NULL ); 00041 00042 //! Destructor 00043 virtual ~ReadCGNS(); 00044 00045 private: 00046 ErrorCode create_elements( char* sectionName, 00047 const Tag* file_id_tag, 00048 const EntityType& ent_type, 00049 const int& verts_per_elem, 00050 long& section_offset, 00051 int elems_count, 00052 const std::vector< cgsize_t >& elemsConn ); 00053 00054 ErrorCode create_sets( char* sectionName, 00055 const Tag* file_id_tag, 00056 EntityType element_type, 00057 const Range& elements, 00058 const std::vector< int >& set_ids, 00059 int set_type ); 00060 00061 ErrorCode create_geometric_topology(); 00062 00063 /** \brief Process options passed into the reader 00064 * \param opts Options passed into this read 00065 */ 00066 ErrorCode process_options( const FileOptions& opts ); 00067 00068 const char* fileName; 00069 00070 short mesh_dim; 00071 00072 ReadUtilIface* readMeshIface; 00073 00074 //! interface instance 00075 Interface* mbImpl; 00076 00077 Tag globalId; 00078 Tag boundary; 00079 Range geomSets; 00080 }; 00081 00082 } // namespace moab 00083 00084 #endif