moab
ReadUtil.hpp
Go to the documentation of this file.
00001 
00016 #ifndef MB_READ_UTIL_HPP
00017 #define MB_READ_UTIL_HPP
00018 
00019 #ifndef IS_BUILDING_MB
00020 #error "ReadUtil.hpp isn't supposed to be included into an application"
00021 #endif
00022 
00023 #include "moab/ReadUtilIface.hpp"
00024 
00025 namespace moab {
00026 
00027 class Core;
00028 class Error;
00029 
00030 class ReadUtil : public ReadUtilIface
00031 {
00032 private:
00034   Core* mMB;
00035   Error* mError;
00036 public:
00037 
00039   ReadUtil(Core* mdb, Error* error_handler);
00040 
00042   ~ReadUtil(){}
00043 
00045   ErrorCode get_node_coords(
00046       const int num_arrays,
00047       const int num_nodes, 
00048       const int preferred_start_id,
00049       EntityHandle& actual_start_handle, 
00050       std::vector<double*>& arrays,
00051       int sequence_size = -1);
00052 
00054   ErrorCode get_element_connect(
00055       const int num_elements, 
00056       const int verts_per_element,
00057       const EntityType mdb_type,
00058       const int preferred_start_id, 
00059       EntityHandle& actual_start_handle, 
00060       EntityHandle*& array,
00061       int sequence_size = -1
00062       );
00063 
00073   ErrorCode gather_related_ents(Range &partition,
00074                                 Range &related_ents,
00075                                 EntityHandle *file_set = NULL);
00076   
00077   ErrorCode create_entity_sets(
00078     EntityID num_sets,
00079     const unsigned* set_flags,
00080     EntityID preffered_start_id,
00081     EntityHandle& actual_start_handle
00082   );
00083  
00085   ErrorCode update_adjacencies(
00086       const EntityHandle start_handle,
00087       const int number_elements,
00088       const int number_vertices_per_element,
00089       const EntityHandle* conn_array);
00090 
00093   ErrorCode report_error( const std::string& error );
00094 
00095   ErrorCode report_error( const char* error, ... ) MB_PRINTF(1);
00096 
00099   ErrorCode get_ordered_vertices(EntityHandle *bound_ents, 
00100                                    int *sense, 
00101                                    int num_bound,
00102                                    int dim,
00103                                    EntityHandle *bound_verts, 
00104                                    EntityType &etype);
00105 
00106 
00107   ErrorCode assign_ids( Tag id_tag, const Range& ents, int start = 0 );
00108 
00109   ErrorCode assign_ids( Tag id_tag, const EntityHandle* ents, 
00110                           size_t num_ents, int start = 0 );
00111 
00113   ErrorCode create_gather_set(EntityHandle& gather_set);
00114 
00116   ErrorCode get_gather_set(EntityHandle& gather_set);
00117 };
00118   
00119 } // namespace moab
00120 
00121 #endif
00122 
00123 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines