Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
ElementSequence.hpp
Go to the documentation of this file.
1 #ifndef ELEMENT_SEQUENCE_HPP
2 #define ELEMENT_SEQUENCE_HPP
3 
4 #include "EntitySequence.hpp"
5 #include "SequenceData.hpp"
6 #include "moab/CN.hpp"
7 
8 namespace moab
9 {
10 
12 {
13  public:
14  ElementSequence( EntityHandle start, EntityID count, unsigned int nodes_per_elem, SequenceData* dat )
15  : EntitySequence( start, count, dat ), nodesPerElement( nodes_per_elem )
16  {
17  }
18 
19  virtual ~ElementSequence() {}
20 
21  inline unsigned int nodes_per_element() const
22  {
23  return nodesPerElement;
24  }
25 
27  std::vector< EntityHandle >& connect,
28  bool topological = false ) const = 0;
29 
31  EntityHandle const*& connect,
32  int& connect_length,
33  bool topological = false,
34  std::vector< EntityHandle >* storage = 0 ) const = 0;
35 
36  virtual ErrorCode set_connectivity( EntityHandle handle, EntityHandle const* connect, int connect_length ) = 0;
37 
38  inline EntityHandle const* get_connectivity_array() const;
39 
41 
42  inline bool has_mid_edge_nodes() const;
43  inline bool has_mid_face_nodes() const;
44  inline bool has_mid_volume_nodes() const;
45 
46  protected:
48  : EntitySequence( split_from, here ), nodesPerElement( split_from.nodesPerElement )
49  {
50  }
51 
52  private:
53  unsigned nodesPerElement;
54 };
55 
57 {
58  return const_cast< ElementSequence* >( this )->get_connectivity_array();
59 }
60 
62 {
64 }
65 
67 {
69 }
70 
72 {
74 }
75 
76 } // namespace moab
77 
78 #endif