MOAB: Mesh Oriented datABase  (version 5.2.1)
PolyElementSeq.cpp
Go to the documentation of this file.
00001 #include "PolyElementSeq.hpp"
00002 
00003 namespace moab
00004 {
00005 
00006 PolyElementSeq::~PolyElementSeq() {}
00007 
00008 EntitySequence* PolyElementSeq::split( EntityHandle here )
00009 {
00010     return new PolyElementSeq( *this, here );
00011 }
00012 
00013 ErrorCode PolyElementSeq::get_connectivity( EntityHandle handle, std::vector< EntityHandle >& connect, bool ) const
00014 {
00015     EntityHandle const* conn = get_array() + nodes_per_element() * ( handle - start_handle() );
00016     int len                  = nodes_per_element();
00017     connect.reserve( connect.size() + len );
00018     std::copy( conn, conn + len, std::back_inserter( connect ) );
00019     return MB_SUCCESS;
00020 }
00021 
00022 ErrorCode PolyElementSeq::get_connectivity( EntityHandle handle, EntityHandle const*& conn_ptr, int& len, bool,
00023                                             std::vector< EntityHandle >* ) const
00024 {
00025     conn_ptr = get_array() + nodes_per_element() * ( handle - start_handle() );
00026     len      = nodes_per_element();
00027     return MB_SUCCESS;
00028 }
00029 
00030 }  // namespace moab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines