Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
PolyElementSeq.cpp
Go to the documentation of this file.
1 #include "PolyElementSeq.hpp"
2 
3 namespace moab
4 {
5 
7 
9 {
10  return new PolyElementSeq( *this, here );
11 }
12 
13 ErrorCode PolyElementSeq::get_connectivity( EntityHandle handle, std::vector< EntityHandle >& connect, bool ) const
14 {
15  EntityHandle const* conn = get_array() + nodes_per_element() * ( handle - start_handle() );
16  int len = nodes_per_element();
17  connect.reserve( connect.size() + len );
18  std::copy( conn, conn + len, std::back_inserter( connect ) );
19  return MB_SUCCESS;
20 }
21 
23  EntityHandle const*& conn_ptr,
24  int& len,
25  bool,
26  std::vector< EntityHandle >* ) const
27 {
28  conn_ptr = get_array() + nodes_per_element() * ( handle - start_handle() );
29  len = nodes_per_element();
30  return MB_SUCCESS;
31 }
32 
33 } // namespace moab