Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
Class to implement entity set functionality. More...
#include <MeshSet.hpp>
Classes | |
union | CompactList |
If the number of entities is less than 3, store the handles directly in the hnd member. Otherwise use the ptr member to hold the beginning and end of a dynamically allocated array. More... | |
struct | dim_test |
struct | hdl_iter |
struct | not_dim_test |
struct | not_type_test |
struct | type_test |
Public Types | |
enum | Count { ZERO = 0, ONE = 1, TWO = 2, MANY = 3 } |
Possible values of mParentCount and mChildCount. More... | |
Public Member Functions | |
MeshSet () | |
create an empty meshset | |
MeshSet (unsigned flags) | |
create an empty meshset | |
~MeshSet () | |
destructor | |
ErrorCode | set_flags (unsigned flags, EntityHandle my_handle, AEntityFactory *adjacencies) |
const EntityHandle * | get_children (int &count_out) const |
get all children pointed to by this meshset | |
const EntityHandle * | get_parents (int &count_out) const |
get all parents pointed to by this meshset | |
int | num_children () const |
return the number of children pointed to by this meshset | |
int | num_parents () const |
return the number of parents pointed to by this meshset | |
int | add_parent (EntityHandle parent) |
add a parent to this meshset; returns true if parent was added, 0 if it was already a parent of this meshset | |
int | add_child (EntityHandle child) |
add a child to this meshset; returns true if child was added, 0 if it was already a child of this meshset | |
int | remove_parent (EntityHandle parent) |
remove a parent from this meshset; returns true if parent was removed, 0 if it was not a parent of this meshset | |
int | remove_child (EntityHandle child) |
remove a child from this meshset; returns true if child was removed, 0 if it was not a child of this meshset | |
unsigned | flags () const |
int | tracking () const |
returns whether entities of meshsets know this meshset | |
int | set () const |
int | ordered () const |
int | vector_based () const |
ErrorCode | replace_entities (EntityHandle my_handle, const EntityHandle *old_entities, const EntityHandle *new_entities, size_t num_entities, AEntityFactory *mAdjFact) |
replace one entity with another in the set (contents and parent/child lists); returns whether it was replaced or not | |
ErrorCode | clear (EntityHandle myhandle, AEntityFactory *adjacencies) |
ErrorCode | clear_all (EntityHandle myhandle, AEntityFactory *adjacencies) |
const EntityHandle * | get_contents (size_t &count_out) const |
EntityHandle * | get_contents (size_t &count_out) |
ErrorCode | get_entities (std::vector< EntityHandle > &entities) const |
ErrorCode | get_entities (Range &entities) const |
ErrorCode | get_entities_by_type (EntityType entity_type, std::vector< EntityHandle > &entity_list) const |
get all entities in this MeshSet with the specified type | |
ErrorCode | get_entities_by_type (EntityType type, Range &entity_list) const |
unsigned int | num_entities_by_type (EntityType type) const |
return the number of entities with the given type contained in this meshset | |
ErrorCode | get_entities_by_dimension (int dimension, std::vector< EntityHandle > &entity_list) const |
ErrorCode | get_entities_by_dimension (int dimension, Range &entity_list) const |
unsigned int | num_entities_by_dimension (int dimension) const |
return the number of entities with the given type contained in this meshset | |
ErrorCode | get_non_set_entities (Range &range) const |
bool | contains_entities (const EntityHandle *entities, int num_entities, const int op) const |
ErrorCode | subtract (const MeshSet *meshset_2, EntityHandle my_handle, AEntityFactory *adjacencies) |
subtract/intersect/unite meshset_2 from/with/into meshset_1; modifies meshset_1 | |
ErrorCode | intersect (const MeshSet *meshset_2, EntityHandle my_handle, AEntityFactory *adjacencies) |
ErrorCode | unite (const MeshSet *meshset_2, EntityHandle my_handle, AEntityFactory *adjacencies) |
ErrorCode | add_entities (const EntityHandle *entity_handles, const int num_entities, EntityHandle my_handle, AEntityFactory *adjacencies) |
add these entities to this meshset | |
ErrorCode | add_entities (const Range &entities, EntityHandle my_handle, AEntityFactory *adjacencies) |
add these entities to this meshset | |
ErrorCode | remove_entities (const Range &entities, EntityHandle my_handle, AEntityFactory *adjacencies) |
add these entities to this meshset | |
ErrorCode | remove_entities (const EntityHandle *entities, const int num_entities, EntityHandle my_handle, AEntityFactory *adjacencies) |
remove these entities from this meshset | |
unsigned int | num_entities () const |
return the number of entities contained in this meshset | |
bool | empty () const |
unsigned long | get_memory_use () const |
Static Public Member Functions | |
static int | DIM_FROM_HANDLE (EntityHandle h) |
static EntityHandle | FIRST_OF_DIM (int dim) |
static EntityHandle | LAST_OF_DIM (int dim) |
Protected Member Functions | |
ErrorCode | convert (unsigned flags, EntityHandle my_handle, AEntityFactory *adj) |
ErrorCode | create_adjacencies (EntityHandle myhandle, AEntityFactory *adjacencies) |
ErrorCode | remove_adjacencies (EntityHandle myhandle, AEntityFactory *adjacencies) |
ErrorCode | insert_entity_vector (const EntityHandle *vect, size_t len, EntityHandle my_h, AEntityFactory *adj) |
ErrorCode | insert_entity_ranges (const EntityHandle *range_vect, size_t len, EntityHandle my_h, AEntityFactory *adj) |
ErrorCode | insert_entity_ranges (const Range &range, EntityHandle my_h, AEntityFactory *adj) |
ErrorCode | remove_entity_vector (const EntityHandle *vect, size_t len, EntityHandle my_h, AEntityFactory *adj) |
ErrorCode | remove_entity_ranges (const EntityHandle *range_vect, size_t len, EntityHandle my_h, AEntityFactory *adj) |
ErrorCode | remove_entity_ranges (const Range &range, EntityHandle my_h, AEntityFactory *adj) |
Private Attributes | |
unsigned char | mFlags |
Meshset propery flags. | |
unsigned | mParentCount: 2 |
If less than MANY, the number of parents stored inline in parentMeshSets.hnd. If MANY, then parentMeshSets.ptr contains array begin and end pointers for a dynamically allocated array of parent handles. | |
unsigned | mChildCount: 2 |
If less than MANY, the number of children stored inline in childMeshSets.hnd. If MANY, then childMeshSets.ptr contains array begin and end pointers for a dynamically allocated array of child handles. | |
unsigned | mContentCount: 2 |
If less than MANY, the number of children stored inline in contentList.hnd. If MANY, then contentList.ptr contains array begin and end pointers for a dynamically allocated array.. | |
CompactList | parentMeshSets |
Storage for data lists. | |
CompactList | childMeshSets |
CompactList | contentList |
Class to implement entity set functionality.
Definition at line 26 of file MeshSet.hpp.
enum moab::MeshSet::Count |
moab::MeshSet::MeshSet | ( | ) | [inline] |
create an empty meshset
Definition at line 393 of file MeshSet.hpp.
: mFlags( 0 ), mParentCount( ZERO ), mChildCount( ZERO ), mContentCount( ZERO ) {}
moab::MeshSet::MeshSet | ( | unsigned | flags | ) | [inline] |
create an empty meshset
Definition at line 396 of file MeshSet.hpp.
: mFlags( (unsigned char)flg ), mParentCount( ZERO ), mChildCount( ZERO ), mContentCount( ZERO ) { }
moab::MeshSet::~MeshSet | ( | ) | [inline] |
destructor
Definition at line 402 of file MeshSet.hpp.
References childMeshSets, contentList, MANY, mChildCount, mContentCount, mParentCount, parentMeshSets, moab::MeshSet::CompactList::ptr, and ZERO.
Referenced by moab::MeshSetSequence::deallocate_set().
{ if( mChildCount == MANY ) free( childMeshSets.ptr[0] ); if( mParentCount == MANY ) free( parentMeshSets.ptr[0] ); if( mContentCount == MANY ) free( contentList.ptr[0] ); mChildCount = mParentCount = mContentCount = ZERO; }
int moab::MeshSet::add_child | ( | EntityHandle | child | ) |
add a child to this meshset; returns true if child was added, 0 if it was already a child of this meshset
Definition at line 244 of file MeshSet.cpp.
References childMeshSets, moab::insert_in_vector(), and mChildCount.
Referenced by moab::Core::add_child_meshset(), moab::Core::add_child_meshsets(), and moab::Core::add_parent_child().
{ int result = 0; mChildCount = insert_in_vector( (Count)mChildCount, childMeshSets, child, result ); return result; }
ErrorCode moab::MeshSet::add_entities | ( | const EntityHandle * | entity_handles, |
const int | num_entities, | ||
EntityHandle | my_handle, | ||
AEntityFactory * | adjacencies | ||
) | [inline] |
add these entities to this meshset
Definition at line 858 of file MeshSet.hpp.
References insert_entity_vector().
Referenced by replace_entities().
{ return insert_entity_vector( entity_handles, num_ents, my_handle, adjacencies ); }
ErrorCode moab::MeshSet::add_entities | ( | const Range & | entities, |
EntityHandle | my_handle, | ||
AEntityFactory * | adjacencies | ||
) | [inline] |
add these entities to this meshset
Definition at line 867 of file MeshSet.hpp.
References insert_entity_ranges().
{ return insert_entity_ranges( entities, my_handle, adjacencies ); }
int moab::MeshSet::add_parent | ( | EntityHandle | parent | ) |
add a parent to this meshset; returns true if parent was added, 0 if it was already a parent of this meshset
Definition at line 238 of file MeshSet.cpp.
References moab::insert_in_vector(), mParentCount, and parentMeshSets.
Referenced by moab::Core::add_parent_child(), moab::Core::add_parent_meshset(), and moab::Core::add_parent_meshsets().
{ int result = 0; mParentCount = insert_in_vector( (Count)mParentCount, parentMeshSets, parent, result ); return result; }
ErrorCode moab::MeshSet::clear | ( | EntityHandle | myhandle, |
AEntityFactory * | adjacencies | ||
) | [inline] |
Clear *contents* of set (not parents or children)
Definition at line 459 of file MeshSet.hpp.
References contentList, MANY, MB_SUCCESS, mContentCount, moab::MeshSet::CompactList::ptr, remove_adjacencies(), tracking(), and ZERO.
Referenced by clear_all(), and intersect().
{ if( tracking() ) remove_adjacencies( myhandle, adjacencies ); if( mContentCount == MANY ) free( contentList.ptr[0] ); mContentCount = ZERO; return MB_SUCCESS; }
ErrorCode moab::MeshSet::clear_all | ( | EntityHandle | myhandle, |
AEntityFactory * | adjacencies | ||
) | [inline] |
Clear all set lists (contents, parents, and children)
Definition at line 467 of file MeshSet.hpp.
References childMeshSets, clear(), ErrorCode, MANY, mChildCount, mParentCount, parentMeshSets, moab::MeshSet::CompactList::ptr, and ZERO.
{ ErrorCode rval = clear( myhandle, adjacencies ); if( mChildCount == MANY ) free( childMeshSets.ptr[0] ); mChildCount = ZERO; if( mParentCount == MANY ) free( parentMeshSets.ptr[0] ); mParentCount = ZERO; return rval; }
bool moab::MeshSet::contains_entities | ( | const EntityHandle * | entities, |
int | num_entities, | ||
const int | op | ||
) | const [inline] |
Test of meshset contains some or all of passed entities
entities | Array of entities |
num_entities | Length of array of entities. |
op | - Interface::UNION : Test if set contains any of the input entities
|
Definition at line 812 of file MeshSet.hpp.
References get_contents(), moab::Interface::INTERSECT, and vector_based().
{ size_t count; const EntityHandle* const ptr = get_contents( count ); const EntityHandle* const end = ptr + count; size_t found_count = 0; if( vector_based() ) { for( int i = 0; i < num_ents; ++i ) if( std::find( ptr, end, entities[i] ) < end ) ++found_count; } else { assert( 0 == count % 2 ); for( int i = 0; i < num_ents; ++i ) { const unsigned long idx = std::lower_bound( ptr, end, entities[i] ) - ptr; if( idx < count && ( idx % 2 != 0 || ptr[idx] == entities[i] ) ) ++found_count; } } return found_count >= ( ( Interface::INTERSECT == op ) ? (unsigned)num_ents : 1u ); }
ErrorCode moab::MeshSet::convert | ( | unsigned | flags, |
EntityHandle | my_handle, | ||
AEntityFactory * | adj | ||
) | [protected] |
Convert for changing flag values
Definition at line 268 of file MeshSet.cpp.
References contentList, moab::convert_to_ranges(), create_adjacencies(), ErrorCode, get_contents(), MB_SUCCESS, mContentCount, MESHSET_TRACK_OWNER, mFlags, num_entities(), remove_adjacencies(), and moab::resize_compact_list().
Referenced by set_flags().
{ ErrorCode rval = MB_SUCCESS; if( ( mFlags & MESHSET_TRACK_OWNER ) && !( flg & MESHSET_TRACK_OWNER ) ) rval = remove_adjacencies( my_handle, adj ); else if( !( mFlags & MESHSET_TRACK_OWNER ) && ( flg & MESHSET_TRACK_OWNER ) ) rval = create_adjacencies( my_handle, adj ); if( MB_SUCCESS != rval ) return rval; if( !( mFlags & MESHSET_ORDERED ) && ( flg & MESHSET_ORDERED ) ) { size_t datalen; EntityHandle* data = get_contents( datalen ); if( datalen ) { std::vector< EntityHandle > list( datalen ); memcpy( &list[0], data, datalen * sizeof( EntityHandle ) ); int num_ents = num_entities(); Count count = (Count)mContentCount; data = resize_compact_list( count, contentList, num_ents ); mContentCount = count; assert( list.size() % 2 == 0 ); std::vector< EntityHandle >::iterator i = list.begin(); while( i != list.end() ) { EntityHandle h = *i; ++i; EntityHandle e = *i; ++i; for( ; h <= e; ++h ) { *data = h; ++data; } } } } else if( ( mFlags & MESHSET_ORDERED ) && !( flg & MESHSET_ORDERED ) ) { size_t datalen; EntityHandle* data = get_contents( datalen ); if( datalen ) { std::vector< EntityHandle > ranges; convert_to_ranges( data, datalen, ranges ); Count count = (Count)mContentCount; data = resize_compact_list( count, contentList, ranges.size() ); mContentCount = count; memcpy( data, &ranges[0], ranges.size() * sizeof( EntityHandle ) ); } } return MB_SUCCESS; }
ErrorCode moab::MeshSet::create_adjacencies | ( | EntityHandle | myhandle, |
AEntityFactory * | adjacencies | ||
) | [protected] |
Add explicit adjacencies from all contained entities to this (i.e. convert to tracking)
Definition at line 323 of file MeshSet.cpp.
References moab::AEntityFactory::add_adjacency(), ErrorCode, get_contents(), MB_SUCCESS, moab::AEntityFactory::remove_adjacency(), and vector_based().
Referenced by convert().
{ ErrorCode rval = MB_SUCCESS; ; size_t count; const EntityHandle* const ptr = get_contents( count ); const EntityHandle* const end = ptr + count; if( vector_based() ) { for( const EntityHandle* i = ptr; i != end; ++i ) { rval = adj->add_adjacency( *i, my_handle, false ); if( MB_SUCCESS != rval ) { for( const EntityHandle* j = ptr; j != i; ++j ) adj->remove_adjacency( *j, my_handle ); return rval; } } } else { assert( 0 == count % 2 ); for( const EntityHandle* i = ptr; i != end; i += 2 ) { for( EntityHandle h = i[0]; h <= i[1]; ++h ) { rval = adj->add_adjacency( h, my_handle, false ); if( MB_SUCCESS != rval ) { for( EntityHandle j = i[0]; j < h; ++j ) adj->remove_adjacency( j, my_handle ); for( const EntityHandle* j = ptr; j != i; j += 2 ) for( EntityHandle k = j[0]; k <= j[1]; ++k ) adj->remove_adjacency( k, my_handle ); return rval; } } } } return MB_SUCCESS; }
static int moab::MeshSet::DIM_FROM_HANDLE | ( | EntityHandle | h | ) | [inline, static] |
get dimension of enity
Definition at line 250 of file MeshSet.hpp.
References moab::CN::Dimension(), and moab::TYPE_FROM_HANDLE().
Referenced by get_entities_by_dimension(), num_entities_by_dimension(), moab::MeshSet::not_dim_test::operator()(), and moab::MeshSet::dim_test::operator()().
{ return CN::Dimension( TYPE_FROM_HANDLE( h ) ); }
bool moab::MeshSet::empty | ( | ) | const [inline] |
Definition at line 167 of file MeshSet.hpp.
References mContentCount, and ZERO.
{ return mContentCount == ZERO; }
static EntityHandle moab::MeshSet::FIRST_OF_DIM | ( | int | dim | ) | [inline, static] |
Get smallest possible handle with specified dimension (first handle for first type of dimension)
Definition at line 257 of file MeshSet.hpp.
References moab::GeomUtil::first(), moab::FIRST_HANDLE(), and moab::CN::TypeDimensionMap.
Referenced by get_entities_by_dimension(), and num_entities_by_dimension().
{ return FIRST_HANDLE( CN::TypeDimensionMap[dim].first ); }
unsigned moab::MeshSet::flags | ( | ) | const [inline] |
const EntityHandle * moab::MeshSet::get_children | ( | int & | count_out | ) | const [inline] |
get all children pointed to by this meshset
Definition at line 422 of file MeshSet.hpp.
References childMeshSets, moab::MeshSet::CompactList::hnd, MANY, mChildCount, and moab::MeshSet::CompactList::ptr.
Referenced by moab::MeshSetSequence::get_children(), and moab::MeshSetSequence::get_parent_child_meshsets().
{ count_out = mChildCount; if( count_out < MANY ) return childMeshSets.hnd; count_out = childMeshSets.ptr[1] - childMeshSets.ptr[0]; return childMeshSets.ptr[0]; }
const EntityHandle * moab::MeshSet::get_contents | ( | size_t & | count_out | ) | const [inline] |
Get contents data array. NOTE: this may not contain what you expect if not vector_based
Definition at line 477 of file MeshSet.hpp.
References contentList, moab::MeshSet::CompactList::hnd, MANY, mContentCount, and moab::MeshSet::CompactList::ptr.
Referenced by contains_entities(), convert(), create_adjacencies(), get_entities(), get_entities_by_dimension(), get_entities_by_type(), get_non_set_entities(), moab::MeshSetSequence::get_parent_child_meshsets(), intersect(), num_entities(), num_entities_by_dimension(), num_entities_by_type(), remove_adjacencies(), replace_entities(), subtract(), and unite().
{ if( mContentCount == MANY ) { count_out = contentList.ptr[1] - contentList.ptr[0]; return contentList.ptr[0]; } else { count_out = mContentCount; return contentList.hnd; } }
EntityHandle * moab::MeshSet::get_contents | ( | size_t & | count_out | ) | [inline] |
Get contents data array. NOTE: this may not contain what you expect if not vector_based
Definition at line 491 of file MeshSet.hpp.
References contentList, moab::MeshSet::CompactList::hnd, MANY, mContentCount, and moab::MeshSet::CompactList::ptr.
{ if( mContentCount == MANY ) { count_out = contentList.ptr[1] - contentList.ptr[0]; return contentList.ptr[0]; } else { count_out = mContentCount; return contentList.hnd; } }
ErrorCode moab::MeshSet::get_entities | ( | std::vector< EntityHandle > & | entities | ) | const [inline] |
Get entities contained in set
Definition at line 505 of file MeshSet.hpp.
References get_contents(), MB_SUCCESS, and vector_based().
Referenced by moab::MeshSetSequence::get_entities(), get_entities_by_type(), and intersect().
{ size_t count; const EntityHandle* ptr = get_contents( count ); if( vector_based() ) { size_t old_size = entities.size(); entities.resize( count + old_size ); std::copy( ptr, ptr + count, entities.begin() + old_size ); } else { assert( count % 2 == 0 ); for( size_t i = 0; i < count; i += 2 ) std::copy( hdl_iter( ptr[i] ), hdl_iter( ptr[i + 1] + 1 ), std::back_inserter( entities ) ); } return MB_SUCCESS; }
ErrorCode moab::MeshSet::get_entities | ( | Range & | entities | ) | const [inline] |
Get entities contained in set
Definition at line 524 of file MeshSet.hpp.
References moab::Range::begin(), get_contents(), moab::Range::insert(), MB_SUCCESS, and vector_based().
{ size_t count; const EntityHandle* ptr = get_contents( count ); if( vector_based() ) { std::copy( ptr, ptr + count, range_inserter( entities ) ); } else { assert( count % 2 == 0 ); Range::iterator in = entities.begin(); for( size_t i = 0; i < count; i += 2 ) in = entities.insert( in, ptr[i], ptr[i + 1] ); } return MB_SUCCESS; }
ErrorCode moab::MeshSet::get_entities_by_dimension | ( | int | dimension, |
std::vector< EntityHandle > & | entity_list | ||
) | const [inline] |
Definition at line 670 of file MeshSet.hpp.
References DIM_FROM_HANDLE(), FIRST_OF_DIM(), get_contents(), LAST_OF_DIM(), MB_SUCCESS, and vector_based().
Referenced by moab::MeshSetSequence::get_dimension().
{ size_t count; const EntityHandle* ptr = get_contents( count ); if( vector_based() ) { std::remove_copy_if( ptr, ptr + count, std::back_inserter( entity_list ), not_dim_test( dimension ) ); } else { size_t idx = std::lower_bound( ptr, ptr + count, FIRST_OF_DIM( dimension ) ) - ptr; if( idx < count && DIM_FROM_HANDLE( ptr[idx] ) == dimension ) { if( idx % 2 ) { // only part of first block is of type std::copy( hdl_iter( FIRST_OF_DIM( dimension ) ), hdl_iter( ptr[idx] + 1 ), std::back_inserter( entity_list ) ); ++idx; } for( ; idx < count; idx += 2 ) { if( DIM_FROM_HANDLE( ptr[idx + 1] ) == dimension ) // whole block is of type std::copy( hdl_iter( ptr[idx] ), hdl_iter( ptr[idx + 1] + 1 ), std::back_inserter( entity_list ) ); else { if( DIM_FROM_HANDLE( ptr[idx] ) == dimension ) // part of last block is of type std::copy( hdl_iter( ptr[idx] ), hdl_iter( LAST_OF_DIM( dimension ) ), std::back_inserter( entity_list ) ); break; } } } } return MB_SUCCESS; }
ErrorCode moab::MeshSet::get_entities_by_dimension | ( | int | dimension, |
Range & | entity_list | ||
) | const [inline] |
Definition at line 707 of file MeshSet.hpp.
References moab::Range::begin(), DIM_FROM_HANDLE(), FIRST_OF_DIM(), get_contents(), moab::Range::insert(), LAST_OF_DIM(), MB_SUCCESS, and vector_based().
{ size_t count; const EntityHandle* ptr = get_contents( count ); if( vector_based() ) { std::remove_copy_if( ptr, ptr + count, range_inserter( entity_list ), not_dim_test( dimension ) ); } else { size_t idx = std::lower_bound( ptr, ptr + count, FIRST_OF_DIM( dimension ) ) - ptr; Range::iterator in = entity_list.begin(); if( idx < count && DIM_FROM_HANDLE( ptr[idx] ) == dimension ) { if( idx % 2 ) { // only part of first block is of type in = entity_list.insert( in, FIRST_OF_DIM( dimension ), ptr[idx] ); ++idx; } for( ; idx < count; idx += 2 ) { if( DIM_FROM_HANDLE( ptr[idx + 1] ) == dimension ) // whole block is of type in = entity_list.insert( in, ptr[idx], ptr[idx + 1] ); else { if( DIM_FROM_HANDLE( ptr[idx] ) == dimension ) // part of last block is of type entity_list.insert( in, ptr[idx], LAST_OF_DIM( dimension ) ); break; } } } } return MB_SUCCESS; }
ErrorCode moab::MeshSet::get_entities_by_type | ( | EntityType | entity_type, |
std::vector< EntityHandle > & | entity_list | ||
) | const [inline] |
get all entities in this MeshSet with the specified type
Definition at line 543 of file MeshSet.hpp.
References moab::FIRST_HANDLE(), get_contents(), get_entities(), moab::LAST_HANDLE(), MB_SUCCESS, MBMAXTYPE, moab::TYPE_FROM_HANDLE(), and vector_based().
Referenced by moab::MeshSetSequence::get_contained_sets(), moab::MeshSetSequence::get_type(), and moab::MeshSetSequence::recursive_get_sets().
{ size_t count; const EntityHandle* ptr = get_contents( count ); if( MBMAXTYPE == type ) { return get_entities( entity_list ); } else if( vector_based() ) { std::remove_copy_if( ptr, ptr + count, std::back_inserter( entity_list ), not_type_test( type ) ); } else { size_t idx = std::lower_bound( ptr, ptr + count, FIRST_HANDLE( type ) ) - ptr; if( idx < count && TYPE_FROM_HANDLE( ptr[idx] ) == type ) { if( idx % 2 ) { // only part of first block is of type std::copy( hdl_iter( FIRST_HANDLE( type ) ), hdl_iter( ptr[idx] + 1 ), std::back_inserter( entity_list ) ); ++idx; } for( ; idx < count; idx += 2 ) { if( TYPE_FROM_HANDLE( ptr[idx + 1] ) == type ) // whole block is of type std::copy( hdl_iter( ptr[idx] ), hdl_iter( ptr[idx + 1] + 1 ), std::back_inserter( entity_list ) ); else { if( TYPE_FROM_HANDLE( ptr[idx] ) == type ) // part of last block is of type std::copy( hdl_iter( ptr[idx] ), hdl_iter( LAST_HANDLE( type ) ), std::back_inserter( entity_list ) ); break; } } } } return MB_SUCCESS; }
ErrorCode moab::MeshSet::get_entities_by_type | ( | EntityType | type, |
Range & | entity_list | ||
) | const [inline] |
Definition at line 584 of file MeshSet.hpp.
References moab::Range::begin(), moab::FIRST_HANDLE(), get_contents(), get_entities(), moab::Range::insert(), moab::LAST_HANDLE(), MB_SUCCESS, MBMAXTYPE, moab::TYPE_FROM_HANDLE(), and vector_based().
{ size_t count; const EntityHandle* ptr = get_contents( count ); if( MBMAXTYPE == type ) { return get_entities( entity_list ); } else if( vector_based() ) { std::remove_copy_if( ptr, ptr + count, range_inserter( entity_list ), not_type_test( type ) ); } else { size_t idx = std::lower_bound( ptr, ptr + count, FIRST_HANDLE( type ) ) - ptr; Range::iterator in = entity_list.begin(); if( idx < count && TYPE_FROM_HANDLE( ptr[idx] ) == type ) { if( idx % 2 ) { // only part of first block is of type in = entity_list.insert( in, FIRST_HANDLE( type ), ptr[idx] ); ++idx; } for( ; idx < count; idx += 2 ) { if( TYPE_FROM_HANDLE( ptr[idx + 1] ) == type ) // whole block is of type in = entity_list.insert( in, ptr[idx], ptr[idx + 1] ); else { if( TYPE_FROM_HANDLE( ptr[idx] ) == type ) // part of last block is of type entity_list.insert( in, ptr[idx], LAST_HANDLE( type ) ); break; } } } } return MB_SUCCESS; }
unsigned long moab::MeshSet::get_memory_use | ( | ) | const |
Definition at line 1279 of file MeshSet.cpp.
References childMeshSets, contentList, MANY, mChildCount, mContentCount, mParentCount, parentMeshSets, and moab::MeshSet::CompactList::ptr.
Referenced by moab::MeshSetSequence::get_per_entity_memory_use().
{ unsigned long result = 0; if( mParentCount == MANY ) result += parentMeshSets.ptr[1] - parentMeshSets.ptr[0]; if( mChildCount == MANY ) result += childMeshSets.ptr[1] - childMeshSets.ptr[0]; if( mContentCount == MANY ) result += contentList.ptr[1] - contentList.ptr[0]; return sizeof( EntityHandle ) * result; }
ErrorCode moab::MeshSet::get_non_set_entities | ( | Range & | range | ) | const [inline] |
Definition at line 785 of file MeshSet.hpp.
References moab::Range::begin(), get_contents(), moab::Range::insert(), moab::LAST_HANDLE(), MB_SUCCESS, MBENTITYSET, moab::TYPE_FROM_HANDLE(), and vector_based().
{ size_t count; const EntityHandle* ptr = get_contents( count ); if( vector_based() ) { std::remove_copy_if( ptr, ptr + count, range_inserter( range ), type_test( MBENTITYSET ) ); } else { Range::iterator in = range.begin(); for( size_t idx = 0; idx < count; idx += 2 ) { if( TYPE_FROM_HANDLE( ptr[idx + 1] ) != MBENTITYSET ) in = range.insert( in, ptr[idx], ptr[idx + 1] ); else { if( TYPE_FROM_HANDLE( ptr[idx] ) != MBENTITYSET ) in = range.insert( in, ptr[idx], LAST_HANDLE( MBENTITYSET - 1 ) ); break; } } } return MB_SUCCESS; }
const EntityHandle * moab::MeshSet::get_parents | ( | int & | count_out | ) | const [inline] |
get all parents pointed to by this meshset
Definition at line 432 of file MeshSet.hpp.
References moab::MeshSet::CompactList::hnd, MANY, mParentCount, parentMeshSets, and moab::MeshSet::CompactList::ptr.
Referenced by moab::MeshSetSequence::get_parent_child_meshsets(), and moab::MeshSetSequence::get_parents().
{ count_out = mParentCount; if( count_out < MANY ) return parentMeshSets.hnd; count_out = parentMeshSets.ptr[1] - parentMeshSets.ptr[0]; return parentMeshSets.ptr[0]; }
ErrorCode moab::MeshSet::insert_entity_ranges | ( | const EntityHandle * | range_vect, |
size_t | len, | ||
EntityHandle | my_h, | ||
AEntityFactory * | adj | ||
) | [protected] |
Insert vector of handle range pairs into MeshSet
Definition at line 1052 of file MeshSet.cpp.
References contentList, ErrorCode, mContentCount, tracking(), and vector_based().
Referenced by add_entities(), and unite().
{ typedef const std::pair< EntityHandle, EntityHandle >* pair_vect_t; pair_vect_t pair_vect = reinterpret_cast< pair_vect_t >( range_vect ); MeshSet::Count count = static_cast< MeshSet::Count >( mContentCount ); ErrorCode rval; if( !vector_based() ) rval = range_tool< pair_vect_t >::ranged_insert_entities( count, contentList, pair_vect, pair_vect + len / 2, my_h, tracking() ? adj : 0 ); else rval = range_tool< pair_vect_t >::vector_insert_entities( count, contentList, pair_vect, pair_vect + len / 2, my_h, tracking() ? adj : 0 ); mContentCount = count; return rval; }
ErrorCode moab::MeshSet::insert_entity_ranges | ( | const Range & | range, |
EntityHandle | my_h, | ||
AEntityFactory * | adj | ||
) | [protected] |
Insert Range of handles into MeshSet
Definition at line 1071 of file MeshSet.cpp.
References moab::Range::const_pair_begin(), moab::Range::const_pair_end(), contentList, ErrorCode, mContentCount, tracking(), and vector_based().
{ ErrorCode rval; MeshSet::Count count = static_cast< MeshSet::Count >( mContentCount ); if( !vector_based() ) rval = range_tool< Range::const_pair_iterator >::ranged_insert_entities( count, contentList, range.const_pair_begin(), range.const_pair_end(), my_h, tracking() ? adj : 0 ); else rval = range_tool< Range::const_pair_iterator >::vector_insert_entities( count, contentList, range.const_pair_begin(), range.const_pair_end(), my_h, tracking() ? adj : 0 ); mContentCount = count; return rval; }
ErrorCode moab::MeshSet::insert_entity_vector | ( | const EntityHandle * | vect, |
size_t | len, | ||
EntityHandle | my_h, | ||
AEntityFactory * | adj | ||
) | [protected] |
Insert vector of handles into MeshSet
Definition at line 1196 of file MeshSet.cpp.
References contentList, moab::convert_to_ranges(), ErrorCode, mContentCount, tracking(), vector_based(), and moab::vector_insert_vector().
Referenced by add_entities(), and unite().
{ MeshSet::Count count = static_cast< MeshSet::Count >( mContentCount ); ErrorCode rval; if( vector_based() ) rval = vector_insert_vector( count, contentList, vect, len, my_h, tracking() ? adj : 0 ); else { std::vector< EntityHandle > rangevect; convert_to_ranges( vect, len, rangevect ); typedef const std::pair< EntityHandle, EntityHandle >* pair_vect_t; pair_vect_t pair_vect = ( rangevect.empty() ) ? NULL : reinterpret_cast< pair_vect_t >( &rangevect[0] ); rval = range_tool< pair_vect_t >::ranged_insert_entities( count, contentList, pair_vect, pair_vect + rangevect.size() / 2, my_h, tracking() ? adj : 0 ); } mContentCount = count; return rval; }
ErrorCode moab::MeshSet::intersect | ( | const MeshSet * | meshset_2, |
EntityHandle | my_handle, | ||
AEntityFactory * | adjacencies | ||
) |
Definition at line 1118 of file MeshSet.cpp.
References clear(), ErrorCode, get_contents(), get_entities(), MB_SUCCESS, remove_entities(), remove_entity_ranges(), moab::subtract(), and vector_based().
Referenced by moab::Core::intersect_meshset().
{ ErrorCode rval; if( !vector_based() && !other->vector_based() ) { size_t other_count = 0; const EntityHandle* other_vect = other->get_contents( other_count ); if( !other_count ) return clear( my_handle, adj ); assert( 0 == other_count % 2 ); std::vector< EntityHandle > compliment; compliment.reserve( other_count + 4 ); if( *other_vect > 0 ) { compliment.push_back( 0 ); compliment.push_back( *other_vect - 1 ); } ++other_vect; const EntityHandle* const other_end = other_vect + other_count - 2; for( ; other_vect < other_end; other_vect += 2 ) { compliment.push_back( other_vect[0] + 1 ); compliment.push_back( other_vect[1] - 1 ); } if( *other_vect < ~(EntityHandle)0 ) { compliment.push_back( *other_vect + 1 ); compliment.push_back( ~(EntityHandle)0 ); } return remove_entity_ranges( &compliment[0], compliment.size(), my_handle, adj ); } else { Range my_ents, other_ents; rval = get_entities( my_ents ); if( MB_SUCCESS != rval ) return rval; rval = other->get_entities( other_ents ); return remove_entities( moab::subtract( my_ents, other_ents ), my_handle, adj ); } }
static EntityHandle moab::MeshSet::LAST_OF_DIM | ( | int | dim | ) | [inline, static] |
Get largest possible handle with specified dimension (largest handle for last type of dimension)
Definition at line 264 of file MeshSet.hpp.
References moab::LAST_HANDLE(), and moab::CN::TypeDimensionMap.
Referenced by get_entities_by_dimension(), and num_entities_by_dimension().
{ return LAST_HANDLE( CN::TypeDimensionMap[dim].second ); }
int moab::MeshSet::num_children | ( | ) | const [inline] |
return the number of children pointed to by this meshset
Definition at line 442 of file MeshSet.hpp.
References childMeshSets, MANY, mChildCount, and moab::MeshSet::CompactList::ptr.
Referenced by moab::MeshSetSequence::num_children().
{ if( mChildCount < MANY ) return mChildCount; else return childMeshSets.ptr[1] - childMeshSets.ptr[0]; }
unsigned int moab::MeshSet::num_entities | ( | ) | const [inline] |
return the number of entities contained in this meshset
Definition at line 888 of file MeshSet.hpp.
References get_contents(), and vector_based().
Referenced by convert(), moab::MeshSetSequence::num_entities(), and num_entities_by_type().
{ size_t count; const EntityHandle* list = get_contents( count ); if( vector_based() ) return count; int result = 0; const EntityHandle* const end = list + count; for( ; list < end; list += 2 ) result += list[1] - list[0] + 1; return result; }
unsigned int moab::MeshSet::num_entities_by_dimension | ( | int | dimension | ) | const [inline] |
return the number of entities with the given type contained in this meshset
Definition at line 744 of file MeshSet.hpp.
References DIM_FROM_HANDLE(), FIRST_OF_DIM(), get_contents(), LAST_OF_DIM(), and vector_based().
Referenced by moab::MeshSetSequence::num_dimension().
{ unsigned int result; size_t count; const EntityHandle* ptr = get_contents( count ); if( vector_based() ) { #ifndef __SUNPRO_CC result = std::count_if( ptr, ptr + count, dim_test( dimension ) ); #else std::count_if( ptr, ptr + count, dim_test( dimension ), result ); #endif } else { result = 0; size_t idx = std::lower_bound( ptr, ptr + count, FIRST_OF_DIM( dimension ) ) - ptr; if( idx < count && DIM_FROM_HANDLE( ptr[idx] ) == dimension ) { if( idx % 2 ) { // only part of first block is of type result += ptr[idx] - FIRST_OF_DIM( dimension ) + 1; ++idx; } for( ; idx < count; idx += 2 ) { if( DIM_FROM_HANDLE( ptr[idx + 1] ) == dimension ) // whole block is of type result += ptr[idx + 1] - ptr[idx] + 1; else { if( DIM_FROM_HANDLE( ptr[idx] ) == dimension ) // part of last block is of type result += LAST_OF_DIM( dimension ) - ptr[idx] + 1; break; } } } } return result; }
unsigned int moab::MeshSet::num_entities_by_type | ( | EntityType | type | ) | const [inline] |
return the number of entities with the given type contained in this meshset
Definition at line 625 of file MeshSet.hpp.
References moab::FIRST_HANDLE(), get_contents(), moab::LAST_HANDLE(), MBMAXTYPE, num_entities(), moab::TYPE_FROM_HANDLE(), and vector_based().
Referenced by moab::MeshSetSequence::num_contained_sets(), and moab::MeshSetSequence::num_type().
{ unsigned int result; size_t count; const EntityHandle* ptr = get_contents( count ); if( MBMAXTYPE == type ) { return num_entities(); } else if( vector_based() ) { #ifndef __SUNPRO_CC result = std::count_if( ptr, ptr + count, type_test( type ) ); #else std::count_if( ptr, ptr + count, type_test( type ), result ); #endif } else { result = 0; size_t idx = std::lower_bound( ptr, ptr + count, FIRST_HANDLE( type ) ) - ptr; if( idx < count && TYPE_FROM_HANDLE( ptr[idx] ) == type ) { if( idx % 2 ) { // only part of first block is of type result += ptr[idx] - FIRST_HANDLE( type ) + 1; ++idx; } for( ; idx < count; idx += 2 ) { if( TYPE_FROM_HANDLE( ptr[idx + 1] ) == type ) // whole block is of type result += ptr[idx + 1] - ptr[idx] + 1; else { if( TYPE_FROM_HANDLE( ptr[idx] ) == type ) // part of last block is of type result += LAST_HANDLE( type ) - ptr[idx] + 1; break; } } } } return result; }
int moab::MeshSet::num_parents | ( | ) | const [inline] |
return the number of parents pointed to by this meshset
Definition at line 451 of file MeshSet.hpp.
References MANY, mParentCount, parentMeshSets, and moab::MeshSet::CompactList::ptr.
Referenced by moab::MeshSetSequence::num_parents().
{ if( mParentCount < MANY ) return mParentCount; else return parentMeshSets.ptr[1] - parentMeshSets.ptr[0]; }
int moab::MeshSet::ordered | ( | ) | const [inline] |
Definition at line 79 of file MeshSet.hpp.
References mFlags.
Referenced by vector_based().
{ return mFlags & MESHSET_ORDERED; }
ErrorCode moab::MeshSet::remove_adjacencies | ( | EntityHandle | myhandle, |
AEntityFactory * | adjacencies | ||
) | [protected] |
Remvoe explicit adjacencies from all contained entities to this (i.e. convert from tracking)
Definition at line 366 of file MeshSet.cpp.
References get_contents(), MB_SUCCESS, moab::AEntityFactory::remove_adjacency(), and vector_based().
Referenced by clear(), and convert().
{ size_t count; const EntityHandle* const ptr = get_contents( count ); const EntityHandle* const end = ptr + count; if( vector_based() ) { for( const EntityHandle* i = ptr; i != end; ++i ) adj->remove_adjacency( *i, my_handle ); } else { assert( 0 == count % 2 ); for( const EntityHandle* i = ptr; i != end; i += 2 ) for( EntityHandle h = i[0]; h <= i[1]; ++h ) adj->remove_adjacency( h, my_handle ); } return MB_SUCCESS; }
int moab::MeshSet::remove_child | ( | EntityHandle | child | ) |
remove a child from this meshset; returns true if child was removed, 0 if it was not a child of this meshset
Definition at line 257 of file MeshSet.cpp.
References childMeshSets, mChildCount, and moab::remove_from_vector().
Referenced by moab::Core::remove_child_meshset(), and moab::Core::remove_parent_child().
{ int result = 0; mChildCount = remove_from_vector( (Count)mChildCount, childMeshSets, child, result ); return result; }
ErrorCode moab::MeshSet::remove_entities | ( | const Range & | entities, |
EntityHandle | my_handle, | ||
AEntityFactory * | adjacencies | ||
) | [inline] |
add these entities to this meshset
Definition at line 873 of file MeshSet.hpp.
References remove_entity_ranges().
Referenced by intersect(), and replace_entities().
{ return remove_entity_ranges( entities, my_handle, adjacencies ); }
ErrorCode moab::MeshSet::remove_entities | ( | const EntityHandle * | entities, |
const int | num_entities, | ||
EntityHandle | my_handle, | ||
AEntityFactory * | adjacencies | ||
) | [inline] |
remove these entities from this meshset
Definition at line 879 of file MeshSet.hpp.
References remove_entity_vector().
{ return remove_entity_vector( entities, num_ents, my_handle, adjacencies ); }
ErrorCode moab::MeshSet::remove_entity_ranges | ( | const EntityHandle * | range_vect, |
size_t | len, | ||
EntityHandle | my_h, | ||
AEntityFactory * | adj | ||
) | [protected] |
Remove vector of handle range pairs from MeshSet
Definition at line 1085 of file MeshSet.cpp.
References contentList, ErrorCode, mContentCount, tracking(), vector_based(), and moab::vector_remove_ranges().
Referenced by intersect(), remove_entities(), and subtract().
{ ErrorCode rval; MeshSet::Count count = static_cast< MeshSet::Count >( mContentCount ); if( vector_based() ) rval = vector_remove_ranges( count, contentList, range_vect, len / 2, my_h, tracking() ? adj : 0 ); else { typedef const std::pair< EntityHandle, EntityHandle >* pair_vect_t; pair_vect_t pair_vect = reinterpret_cast< pair_vect_t >( range_vect ); rval = range_tool< pair_vect_t >::ranged_remove_entities( count, contentList, pair_vect, pair_vect + len / 2, my_h, tracking() ? adj : 0 ); } mContentCount = count; return rval; }
ErrorCode moab::MeshSet::remove_entity_ranges | ( | const Range & | range, |
EntityHandle | my_h, | ||
AEntityFactory * | adj | ||
) | [protected] |
Remove Range of handles from MeshSet
Definition at line 1105 of file MeshSet.cpp.
References moab::Range::const_pair_begin(), moab::Range::const_pair_end(), contentList, ErrorCode, mContentCount, tracking(), vector_based(), and moab::vector_remove_range().
{ ErrorCode rval; MeshSet::Count count = static_cast< MeshSet::Count >( mContentCount ); if( vector_based() ) rval = vector_remove_range( count, contentList, range, my_h, tracking() ? adj : 0 ); else rval = range_tool< Range::const_pair_iterator >::ranged_remove_entities( count, contentList, range.const_pair_begin(), range.const_pair_end(), my_h, tracking() ? adj : 0 ); mContentCount = count; return rval; }
ErrorCode moab::MeshSet::remove_entity_vector | ( | const EntityHandle * | vect, |
size_t | len, | ||
EntityHandle | my_h, | ||
AEntityFactory * | adj | ||
) | [protected] |
Remove vector of handles from MeshSet
Definition at line 1215 of file MeshSet.cpp.
References contentList, moab::convert_to_ranges(), ErrorCode, mContentCount, tracking(), vector_based(), and moab::vector_remove_vector().
Referenced by remove_entities(), and subtract().
{ MeshSet::Count count = static_cast< MeshSet::Count >( mContentCount ); ErrorCode rval; if( vector_based() ) rval = vector_remove_vector( count, contentList, vect, len, my_h, tracking() ? adj : 0 ); else { std::vector< EntityHandle > rangevect; convert_to_ranges( vect, len, rangevect ); typedef const std::pair< EntityHandle, EntityHandle >* pair_vect_t; pair_vect_t pair_vect = ( rangevect.empty() ) ? NULL : reinterpret_cast< pair_vect_t >( &rangevect[0] ); rval = range_tool< pair_vect_t >::ranged_remove_entities( count, contentList, pair_vect, pair_vect + rangevect.size() / 2, my_h, tracking() ? adj : 0 ); } mContentCount = count; return rval; }
int moab::MeshSet::remove_parent | ( | EntityHandle | parent | ) |
remove a parent from this meshset; returns true if parent was removed, 0 if it was not a parent of this meshset
Definition at line 251 of file MeshSet.cpp.
References mParentCount, parentMeshSets, and moab::remove_from_vector().
Referenced by moab::Core::remove_parent_child(), and moab::Core::remove_parent_meshset().
{ int result = 0; mParentCount = remove_from_vector( (Count)mParentCount, parentMeshSets, parent, result ); return result; }
ErrorCode moab::MeshSet::replace_entities | ( | EntityHandle | my_handle, |
const EntityHandle * | old_entities, | ||
const EntityHandle * | new_entities, | ||
size_t | num_entities, | ||
AEntityFactory * | mAdjFact | ||
) |
replace one entity with another in the set (contents and parent/child lists); returns whether it was replaced or not
Definition at line 1234 of file MeshSet.cpp.
References moab::AEntityFactory::add_adjacency(), add_entities(), ErrorCode, get_contents(), MB_ENTITY_NOT_FOUND, MB_SUCCESS, moab::AEntityFactory::remove_adjacency(), remove_entities(), tracking(), and vector_based().
{ if( vector_based() ) { ErrorCode result = MB_SUCCESS; size_t count; EntityHandle* vect = get_contents( count ); EntityHandle* const vect_end = vect + count; for( size_t i = 0; i < num_ents; ++i ) { EntityHandle* p = std::find( vect, vect_end, old_entities[i] ); if( p == vect_end ) { result = MB_ENTITY_NOT_FOUND; } else do { if( tracking() ) { adjfact->remove_adjacency( *p, my_handle ); adjfact->add_adjacency( new_entities[i], my_handle, false ); } *p = new_entities[i]; p = std::find( p + 1, vect_end, old_entities[i] ); } while( p != vect_end ); } return result; } else { ErrorCode r1 = remove_entities( old_entities, num_ents, my_handle, adjfact ); ErrorCode r2 = add_entities( new_entities, num_ents, my_handle, adjfact ); return ( MB_SUCCESS == r2 ) ? r1 : r2; } }
int moab::MeshSet::set | ( | ) | const [inline] |
Definition at line 75 of file MeshSet.hpp.
References MESHSET_SET, and mFlags.
{ return mFlags & MESHSET_SET; }
ErrorCode moab::MeshSet::set_flags | ( | unsigned | flags, |
EntityHandle | my_handle, | ||
AEntityFactory * | adjacencies | ||
) | [inline] |
Definition at line 410 of file MeshSet.hpp.
References convert(), ErrorCode, MB_SUCCESS, mContentCount, mFlags, and ZERO.
{ if( ZERO != mContentCount ) { ErrorCode result = convert( flg, my_handle, adjacencies ); if( MB_SUCCESS != result ) return result; } mFlags = (unsigned char)flg; return MB_SUCCESS; }
ErrorCode moab::MeshSet::subtract | ( | const MeshSet * | meshset_2, |
EntityHandle | my_handle, | ||
AEntityFactory * | adjacencies | ||
) | [inline] |
subtract/intersect/unite meshset_2 from/with/into meshset_1; modifies meshset_1
Definition at line 837 of file MeshSet.hpp.
References get_contents(), remove_entity_ranges(), remove_entity_vector(), and vector_based().
Referenced by moab::Core::subtract_meshset().
{ size_t count; const EntityHandle* const ptr = meshset_2->get_contents( count ); if( meshset_2->vector_based() ) return remove_entity_vector( ptr, count, my_handle, adjacencies ); else return remove_entity_ranges( ptr, count, my_handle, adjacencies ); }
int moab::MeshSet::tracking | ( | ) | const [inline] |
returns whether entities of meshsets know this meshset
Definition at line 71 of file MeshSet.hpp.
References MESHSET_TRACK_OWNER, and mFlags.
Referenced by clear(), insert_entity_ranges(), insert_entity_vector(), remove_entity_ranges(), remove_entity_vector(), and replace_entities().
{ return mFlags & MESHSET_TRACK_OWNER; }
ErrorCode moab::MeshSet::unite | ( | const MeshSet * | meshset_2, |
EntityHandle | my_handle, | ||
AEntityFactory * | adjacencies | ||
) | [inline] |
Definition at line 847 of file MeshSet.hpp.
References get_contents(), insert_entity_ranges(), insert_entity_vector(), and vector_based().
Referenced by moab::Core::unite_meshset().
{ size_t count; const EntityHandle* const ptr = meshset_2->get_contents( count ); if( meshset_2->vector_based() ) return insert_entity_vector( ptr, count, my_handle, adjacencies ); else return insert_entity_ranges( ptr, count, my_handle, adjacencies ); }
int moab::MeshSet::vector_based | ( | ) | const [inline] |
Definition at line 83 of file MeshSet.hpp.
References ordered().
Referenced by contains_entities(), create_adjacencies(), get_entities(), get_entities_by_dimension(), get_entities_by_type(), get_non_set_entities(), moab::MeshSetSequence::get_parent_child_meshsets(), insert_entity_ranges(), insert_entity_vector(), intersect(), num_entities(), num_entities_by_dimension(), num_entities_by_type(), remove_adjacencies(), remove_entity_ranges(), remove_entity_vector(), replace_entities(), subtract(), and unite().
{ return ordered(); }
CompactList moab::MeshSet::childMeshSets [private] |
Definition at line 246 of file MeshSet.hpp.
Referenced by add_child(), clear_all(), get_children(), get_memory_use(), num_children(), remove_child(), and ~MeshSet().
CompactList moab::MeshSet::contentList [private] |
Definition at line 246 of file MeshSet.hpp.
Referenced by clear(), convert(), get_contents(), get_memory_use(), insert_entity_ranges(), insert_entity_vector(), remove_entity_ranges(), remove_entity_vector(), and ~MeshSet().
unsigned moab::MeshSet::mChildCount [private] |
If less than MANY, the number of children stored inline in childMeshSets.hnd. If MANY, then childMeshSets.ptr contains array begin and end pointers for a dynamically allocated array of child handles.
Definition at line 240 of file MeshSet.hpp.
Referenced by add_child(), clear_all(), get_children(), get_memory_use(), num_children(), remove_child(), and ~MeshSet().
unsigned moab::MeshSet::mContentCount [private] |
If less than MANY, the number of children stored inline in contentList.hnd. If MANY, then contentList.ptr contains array begin and end pointers for a dynamically allocated array..
Definition at line 244 of file MeshSet.hpp.
Referenced by clear(), convert(), empty(), get_contents(), get_memory_use(), insert_entity_ranges(), insert_entity_vector(), remove_entity_ranges(), remove_entity_vector(), set_flags(), and ~MeshSet().
unsigned char moab::MeshSet::mFlags [private] |
Meshset propery flags.
Definition at line 230 of file MeshSet.hpp.
Referenced by convert(), flags(), ordered(), set(), set_flags(), and tracking().
unsigned moab::MeshSet::mParentCount [private] |
If less than MANY, the number of parents stored inline in parentMeshSets.hnd. If MANY, then parentMeshSets.ptr contains array begin and end pointers for a dynamically allocated array of parent handles.
Definition at line 235 of file MeshSet.hpp.
Referenced by add_parent(), clear_all(), get_memory_use(), get_parents(), num_parents(), remove_parent(), and ~MeshSet().
CompactList moab::MeshSet::parentMeshSets [private] |
Storage for data lists.
Definition at line 246 of file MeshSet.hpp.
Referenced by add_parent(), clear_all(), get_memory_use(), get_parents(), num_parents(), remove_parent(), and ~MeshSet().