moab
|
00001 #include "PolyElementSeq.hpp" 00002 00003 namespace moab { 00004 00005 PolyElementSeq::~PolyElementSeq() {} 00006 00007 EntitySequence* PolyElementSeq::split( EntityHandle here ) 00008 { return new PolyElementSeq( *this, here ); } 00009 00010 00011 ErrorCode 00012 PolyElementSeq::get_connectivity( EntityHandle handle, 00013 std::vector<EntityHandle>& connect, 00014 bool ) const 00015 { 00016 EntityHandle const* conn = get_array() + nodes_per_element() * (handle - start_handle()); 00017 int len = nodes_per_element(); 00018 connect.reserve( connect.size() + len ); 00019 std::copy( conn, conn+len, std::back_inserter( connect ) ); 00020 return MB_SUCCESS; 00021 } 00022 00023 00024 ErrorCode 00025 PolyElementSeq::get_connectivity( EntityHandle handle, 00026 EntityHandle const*& conn_ptr, 00027 int& len, 00028 bool, 00029 std::vector<EntityHandle>* ) const 00030 { 00031 conn_ptr = get_array() + nodes_per_element() * (handle - start_handle()); 00032 len = nodes_per_element(); 00033 return MB_SUCCESS; 00034 } 00035 00036 } // namespace moab