MOAB: Mesh Oriented datABase
(version 5.2.1)
|
00001 /** 00002 * MOAB, a Mesh-Oriented datABase, is a software component for creating, 00003 * storing and accessing finite element mesh data. 00004 * 00005 * Copyright 2004 Sandia Corporation. Under the terms of Contract 00006 * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government 00007 * retains certain rights in this software. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2.1 of the License, or (at your option) any later version. 00013 * 00014 */ 00015 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 00028 class Core; 00029 class Error; 00030 00031 class ReadUtil : public ReadUtilIface 00032 { 00033 private: 00034 //! Pointer to the Core 00035 Core* mMB; 00036 00037 public: 00038 //! Constructor takes Core pointer 00039 ReadUtil( Core* mdb, Error* error_handler ); 00040 00041 //! Destructor 00042 ~ReadUtil() {} 00043 00044 //! Get arrays for coordinate data from the MB 00045 ErrorCode get_node_coords( const int num_arrays, const int num_nodes, const int preferred_start_id, 00046 EntityHandle& actual_start_handle, std::vector< double* >& arrays, 00047 int sequence_size = -1 ); 00048 00049 //! Get array for connectivity data from the MB 00050 ErrorCode get_element_connect( const int num_elements, const int verts_per_element, const EntityType mdb_type, 00051 const int preferred_start_id, EntityHandle& actual_start_handle, 00052 EntityHandle*& array, int sequence_size = -1 ); 00053 00054 /** 00055 *\brief Gather entities related to those in the partition 00056 * Gather entities related to those in the input partition. Related 00057 * means down-adjacent to, contained in, etc. 00058 * \param partition Entities for which to gather related entities 00059 * \param related_ents Related entities 00060 * \param all_sets If non-NULL, all sets in mesh instance are returned 00061 * in the pointed-to range 00062 */ 00063 ErrorCode gather_related_ents( Range& partition, Range& related_ents, EntityHandle* file_set = NULL ); 00064 00065 ErrorCode create_entity_sets( EntityID num_sets, const unsigned* set_flags, EntityID preffered_start_id, 00066 EntityHandle& actual_start_handle ); 00067 00068 //! Tell MB which elements have been added to the database 00069 ErrorCode update_adjacencies( const EntityHandle start_handle, const int number_elements, 00070 const int number_vertices_per_element, const EntityHandle* conn_array ); 00071 00072 //! Given an ordered list of bounding entities and the sense of 00073 //! those entities, return an ordered list of vertices 00074 ErrorCode get_ordered_vertices( EntityHandle* bound_ents, int* sense, int num_bound, int dim, 00075 EntityHandle* bound_verts, EntityType& etype ); 00076 00077 ErrorCode assign_ids( Tag id_tag, const Range& ents, int start = 0 ); 00078 00079 ErrorCode assign_ids( Tag id_tag, const EntityHandle* ents, size_t num_ents, int start = 0 ); 00080 00081 //! Create a new gather set with tag GATHER_SET 00082 ErrorCode create_gather_set( EntityHandle& gather_set ); 00083 00084 //! Get entity handle of an existing gather set 00085 ErrorCode get_gather_set( EntityHandle& gather_set ); 00086 }; 00087 00088 } // namespace moab 00089 00090 #endif