MOAB: Mesh Oriented datABase
(version 5.4.1)
|
00001 #ifndef UNSTRUCTURED_ELEM_SEQ_HPP 00002 #define UNSTRUCTURED_ELEM_SEQ_HPP 00003 00004 #include "ElementSequence.hpp" 00005 #include "SequenceData.hpp" 00006 00007 namespace moab 00008 { 00009 00010 class UnstructuredElemSeq : public ElementSequence 00011 { 00012 public: 00013 UnstructuredElemSeq( EntityHandle start_handle, 00014 EntityID entity_count, 00015 unsigned nodes_per_entity, 00016 SequenceData* data ); 00017 00018 UnstructuredElemSeq( EntityHandle start_handle, 00019 EntityID entity_count, 00020 unsigned nodes_per_entity, 00021 EntityID sequence_data_size ); 00022 00023 virtual ~UnstructuredElemSeq(); 00024 00025 int values_per_entity() const; 00026 00027 virtual EntitySequence* split( EntityHandle here ); 00028 00029 SequenceData* create_data_subset( EntityHandle start, EntityHandle end ) const; 00030 00031 virtual ErrorCode get_connectivity( EntityHandle handle, 00032 std::vector< EntityHandle >& connect, 00033 bool topological = false ) const; 00034 00035 virtual ErrorCode get_connectivity( EntityHandle handle, 00036 EntityHandle const*& connect, 00037 int& connect_length, 00038 bool topological = false, 00039 std::vector< EntityHandle >* storage = 0 ) const; 00040 00041 ErrorCode set_connectivity( EntityHandle handle, EntityHandle const* connect, int connect_length ); 00042 00043 EntityHandle* get_connectivity_array(); 00044 00045 ErrorCode push_front( EntityID count ); 00046 ErrorCode push_back( EntityID count ); 00047 00048 void get_const_memory_use( unsigned long& bytes_per_entity, unsigned long& size_of_sequence ) const; 00049 00050 protected: 00051 inline EntityHandle const* get_array() const 00052 { 00053 return reinterpret_cast< EntityHandle const* >( data()->get_sequence_data( 0 ) ) + 00054 nodes_per_element() * ( start_handle() - data()->start_handle() ); 00055 } 00056 00057 inline EntityHandle* get_array() 00058 { 00059 return reinterpret_cast< EntityHandle* >( data()->get_sequence_data( 0 ) ) + 00060 nodes_per_element() * ( start_handle() - data()->start_handle() ); 00061 } 00062 00063 UnstructuredElemSeq( UnstructuredElemSeq& split_from, EntityHandle here ) : ElementSequence( split_from, here ) {} 00064 }; 00065 00066 } // namespace moab 00067 00068 #endif