Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
UnstructuredElemSeq.hpp
Go to the documentation of this file.
1 #ifndef UNSTRUCTURED_ELEM_SEQ_HPP
2 #define UNSTRUCTURED_ELEM_SEQ_HPP
3 
4 #include "ElementSequence.hpp"
5 #include "SequenceData.hpp"
6 
7 namespace moab
8 {
9 
11 {
12  public:
14  EntityID entity_count,
15  unsigned nodes_per_entity,
16  SequenceData* data );
17 
19  EntityID entity_count,
20  unsigned nodes_per_entity,
21  EntityID sequence_data_size );
22 
23  virtual ~UnstructuredElemSeq();
24 
25  int values_per_entity() const;
26 
27  virtual EntitySequence* split( EntityHandle here );
28 
30 
31  virtual ErrorCode get_connectivity( EntityHandle handle,
32  std::vector< EntityHandle >& connect,
33  bool topological = false ) const;
34 
35  virtual ErrorCode get_connectivity( EntityHandle handle,
36  EntityHandle const*& connect,
37  int& connect_length,
38  bool topological = false,
39  std::vector< EntityHandle >* storage = 0 ) const;
40 
41  ErrorCode set_connectivity( EntityHandle handle, EntityHandle const* connect, int connect_length );
42 
44 
45  ErrorCode push_front( EntityID count );
46  ErrorCode push_back( EntityID count );
47 
48  void get_const_memory_use( unsigned long& bytes_per_entity, unsigned long& size_of_sequence ) const;
49 
50  protected:
51  inline EntityHandle const* get_array() const
52  {
53  return reinterpret_cast< EntityHandle const* >( data()->get_sequence_data( 0 ) ) +
55  }
56 
58  {
59  return reinterpret_cast< EntityHandle* >( data()->get_sequence_data( 0 ) ) +
61  }
62 
63  UnstructuredElemSeq( UnstructuredElemSeq& split_from, EntityHandle here ) : ElementSequence( split_from, here ) {}
64 };
65 
66 } // namespace moab
67 
68 #endif