![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
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,
00023 EntityHandle const*& conn_ptr,
00024 int& len,
00025 bool,
00026 std::vector< EntityHandle >* ) const
00027 {
00028 conn_ptr = get_array() + nodes_per_element() * ( handle - start_handle() );
00029 len = nodes_per_element();
00030 return MB_SUCCESS;
00031 }
00032
00033 } // namespace moab