Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
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, 00046 const int num_nodes, 00047 const int preferred_start_id, 00048 EntityHandle& actual_start_handle, 00049 std::vector< double* >& arrays, 00050 int sequence_size = -1 ); 00051 00052 //! Get array for connectivity data from the MB 00053 ErrorCode get_element_connect( const int num_elements, 00054 const int verts_per_element, 00055 const EntityType mdb_type, 00056 const int preferred_start_id, 00057 EntityHandle& actual_start_handle, 00058 EntityHandle*& array, 00059 int sequence_size = -1 ); 00060 00061 /** 00062 *\brief Gather entities related to those in the partition 00063 * Gather entities related to those in the input partition. Related 00064 * means down-adjacent to, contained in, etc. 00065 * \param partition Entities for which to gather related entities 00066 * \param related_ents Related entities 00067 * \param all_sets If non-NULL, all sets in mesh instance are returned 00068 * in the pointed-to range 00069 */ 00070 ErrorCode gather_related_ents( Range& partition, Range& related_ents, EntityHandle* file_set = NULL ); 00071 00072 ErrorCode create_entity_sets( EntityID num_sets, 00073 const unsigned* set_flags, 00074 EntityID preffered_start_id, 00075 EntityHandle& actual_start_handle ); 00076 00077 //! Tell MB which elements have been added to the database 00078 ErrorCode update_adjacencies( const EntityHandle start_handle, 00079 const int number_elements, 00080 const int number_vertices_per_element, 00081 const EntityHandle* conn_array ); 00082 00083 //! Given an ordered list of bounding entities and the sense of 00084 //! those entities, return an ordered list of vertices 00085 ErrorCode get_ordered_vertices( EntityHandle* bound_ents, 00086 int* sense, 00087 int num_bound, 00088 int dim, 00089 EntityHandle* bound_verts, 00090 EntityType& etype ); 00091 00092 ErrorCode assign_ids( Tag id_tag, const Range& ents, int start = 0 ); 00093 00094 ErrorCode assign_ids( Tag id_tag, const EntityHandle* ents, size_t num_ents, int start = 0 ); 00095 00096 //! Create a new gather set with tag GATHER_SET 00097 ErrorCode create_gather_set( EntityHandle& gather_set ); 00098 00099 //! Get entity handle of an existing gather set 00100 ErrorCode get_gather_set( EntityHandle& gather_set ); 00101 }; 00102 00103 } // namespace moab 00104 00105 #endif