moab
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 
00020 class ReadCGNS : public ReaderIface
00021 {
00022 
00023 public:
00024 
00026     static ReaderIface* factory(Interface*);
00027 
00028     ErrorCode load_file(const char* file_name,
00029                         const EntityHandle* file_set,
00030                         const FileOptions& opts,
00031                         const SubsetList* subset_list = 0,
00032                         const Tag* file_id_tag = 0);
00033 
00034     ErrorCode read_tag_values(const char* file_name,
00035                               const char* tag_name,
00036                               const FileOptions& opts,
00037                               std::vector<int>& tag_values_out,
00038                               const SubsetList* subset_list = 0);
00039 
00041     ReadCGNS(Interface* impl = NULL);
00042 
00044     virtual ~ReadCGNS();
00045 
00046 private:
00047 
00048     ErrorCode create_elements(char *sectionName,
00049                               const Tag* file_id_tag,
00050                               const EntityType& ent_type,
00051                               const int& verts_per_elem,
00052                               long& section_offset,
00053                               int elems_count,
00054                               const std::vector<cgsize_t>& elemsConn);
00055 
00056     ErrorCode create_sets(char* sectionName,
00057                           const Tag* file_id_tag,
00058                           EntityType element_type,
00059                           const Range& elements,
00060                           const std::vector<int>& set_ids,
00061                           int set_type);
00062 
00063     ErrorCode create_geometric_topology();
00064 
00068     ErrorCode process_options(const FileOptions &opts);
00069 
00070     const char *fileName;
00071 
00072     short mesh_dim;
00073 
00074     ReadUtilIface* readMeshIface;
00075 
00077     Interface* mbImpl;
00078 
00079     Tag globalId;
00080     Tag boundary;
00081     Range geomSets;
00082 
00083 };
00084 
00085 } // namespace moab
00086 
00087 #endif
00088 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines