MOAB: Mesh Oriented datABase  (version 5.2.1)
UnstructuredElemSeq.hpp
Go to the documentation of this file.
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, EntityID entity_count, unsigned nodes_per_entity,
00014                          SequenceData* data );
00015 
00016     UnstructuredElemSeq( EntityHandle start_handle, EntityID entity_count, unsigned nodes_per_entity,
00017                          EntityID sequence_data_size );
00018 
00019     virtual ~UnstructuredElemSeq();
00020 
00021     int values_per_entity() const;
00022 
00023     virtual EntitySequence* split( EntityHandle here );
00024 
00025     SequenceData* create_data_subset( EntityHandle start, EntityHandle end ) const;
00026 
00027     virtual ErrorCode get_connectivity( EntityHandle handle, std::vector< EntityHandle >& connect,
00028                                         bool topological = false ) const;
00029 
00030     virtual ErrorCode get_connectivity( EntityHandle handle, EntityHandle const*& connect, int& connect_length,
00031                                         bool topological = false, std::vector< EntityHandle >* storage = 0 ) const;
00032 
00033     ErrorCode set_connectivity( EntityHandle handle, EntityHandle const* connect, int connect_length );
00034 
00035     EntityHandle* get_connectivity_array();
00036 
00037     ErrorCode push_front( EntityID count );
00038     ErrorCode push_back( EntityID count );
00039 
00040     void get_const_memory_use( unsigned long& bytes_per_entity, unsigned long& size_of_sequence ) const;
00041 
00042   protected:
00043     inline EntityHandle const* get_array() const
00044     {
00045         return reinterpret_cast< EntityHandle const* >( data()->get_sequence_data( 0 ) ) +
00046                nodes_per_element() * ( start_handle() - data()->start_handle() );
00047     }
00048 
00049     inline EntityHandle* get_array()
00050     {
00051         return reinterpret_cast< EntityHandle* >( data()->get_sequence_data( 0 ) ) +
00052                nodes_per_element() * ( start_handle() - data()->start_handle() );
00053     }
00054 
00055     UnstructuredElemSeq( UnstructuredElemSeq& split_from, EntityHandle here ) : ElementSequence( split_from, here ) {}
00056 };
00057 
00058 }  // namespace moab
00059 
00060 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines