MOAB: Mesh Oriented datABase  (version 5.2.1)
ReadCGNS.hpp
Go to the documentation of this file.
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, const EntityHandle* file_set, const FileOptions& opts,
00028                          const SubsetList* subset_list = 0, const Tag* file_id_tag = 0 );
00029 
00030     ErrorCode read_tag_values( const char* file_name, const char* tag_name, const FileOptions& opts,
00031                                std::vector< int >& tag_values_out, const SubsetList* subset_list = 0 );
00032 
00033     //! Constructor
00034     ReadCGNS( Interface* impl = NULL );
00035 
00036     //! Destructor
00037     virtual ~ReadCGNS();
00038 
00039   private:
00040     ErrorCode create_elements( char* sectionName, const Tag* file_id_tag, const EntityType& ent_type,
00041                                const int& verts_per_elem, long& section_offset, int elems_count,
00042                                const std::vector< cgsize_t >& elemsConn );
00043 
00044     ErrorCode create_sets( char* sectionName, const Tag* file_id_tag, EntityType element_type, const Range& elements,
00045                            const std::vector< int >& set_ids, int set_type );
00046 
00047     ErrorCode create_geometric_topology();
00048 
00049     /** \brief Process options passed into the reader
00050      * \param opts Options passed into this read
00051      */
00052     ErrorCode process_options( const FileOptions& opts );
00053 
00054     const char* fileName;
00055 
00056     short mesh_dim;
00057 
00058     ReadUtilIface* readMeshIface;
00059 
00060     //! interface instance
00061     Interface* mbImpl;
00062 
00063     Tag globalId;
00064     Tag boundary;
00065     Range geomSets;
00066 };
00067 
00068 }  // namespace moab
00069 
00070 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines