36 std::vector< unsigned > vect( count, flags );
49 std::vector< unsigned > vect( count, flags );
66 for(
EntityID i = 0; i < count; ++i )
80 for(
EntityID i = 0; i < count; ++i )
90 for(
EntityID i = 0; i < count; ++i )
100 for(
EntityID i = 0; i < count; ++i )
110 for(
EntityID i = 0; i < count; ++i )
118 seq_size =
sizeof( *this );
126 unsigned long sum = 0;
135 bool recursive )
const
144 std::vector< const MeshSet* > list;
146 for( std::vector< const MeshSet* >::iterator i = list.begin(); i != list.end(); ++i )
147 ( *i )->get_non_set_entities(
entities );
161 std::vector< EntityHandle >&
entities,
162 bool recursive )
const
171 std::vector< const MeshSet* > list;
173 for( std::vector< const MeshSet* >::iterator i = list.begin(); i != list.end(); ++i )
174 ( *i )->get_entities_by_dimension( dimension,
entities );
183 bool recursive )
const
192 std::vector< const MeshSet* > list;
194 for( std::vector< const MeshSet* >::iterator i = list.begin(); i != list.end(); ++i )
195 ( *i )->get_entities_by_dimension( dimension,
entities );
203 std::vector< EntityHandle >&
entities,
204 bool recursive )
const
221 #ifdef MOAB_NO_VECTOR_TEMPLATE_INSERT
231 std::vector< const MeshSet* > list;
233 for( std::vector< const MeshSet* >::iterator i = list.begin(); i != list.end(); ++i )
234 ( *i )->get_entities_by_type( tp,
entities );
243 bool recursive )
const
256 std::vector< const MeshSet* > list;
258 for( std::vector< const MeshSet* >::iterator i = list.begin(); i != list.end(); ++i )
259 ( *i )->get_non_set_entities(
entities );
264 std::vector< const MeshSet* > list;
266 for( std::vector< const MeshSet* >::iterator i = list.begin(); i != list.end(); ++i )
267 ( *i )->get_entities_by_type( tp,
entities );
275 bool recursive )
const
286 number = range.
size();
295 bool recursive )
const
306 number = range.
size();
315 bool recursive )
const
326 number = range.
size();
333 std::vector< const MeshSet* >* sets,
335 std::vector< EntityHandle >* set_vector )
337 std::set< EntityHandle > visited;
338 std::vector< EntityHandle > stack;
339 stack.push_back( start_set );
340 bool remove_start_set =
true;
341 while( !stack.empty() )
346 if( !visited.insert( handle ).second )
348 if( handle == start_set ) remove_start_set =
false;
358 if( sets ) sets->push_back( ms_ptr );
362 std::copy( tmp_range.
begin(), tmp_range.
end(), std::back_inserter( stack ) );
367 if( remove_start_set ) visited.erase( start_set );
369 std::set< EntityHandle >::iterator it;
370 for( it = visited.begin(); it != visited.end(); ++it )
371 hint = set_handles->
insert( hint, *it, *it );
376 if( remove_start_set ) visited.erase( start_set );
377 std::copy( visited.begin(), visited.end(), std::back_inserter( *set_vector ) );
385 std::vector< MeshSet* >& sets )
387 std::set< EntityHandle > visited;
388 std::vector< EntityHandle > stack;
389 stack.push_back( start_set );
390 while( !stack.empty() )
395 if( !visited.insert( handle ).second )
continue;
403 sets.push_back( ms_ptr );
407 std::copy( tmp_range.
begin(), tmp_range.
end(), std::back_inserter( stack ) );
415 std::vector< EntityHandle >& results,
420 std::vector< EntityHandle >::iterator i;
431 std::set< EntityHandle > visited;
432 for( i = results.begin(); i != results.end(); ++i )
433 visited.insert( *i );
436 std::vector< EntityHandle > lists[2];
438 lists[index].push_back( meshset );
440 for( ; num_hops && !lists[index].empty(); --num_hops )
443 for( i = lists[index].begin(); i != lists[index].end(); ++i )
458 for( ; tmp_array != end; ++tmp_array )
460 lists[1 - index].push_back( *tmp_array );
464 assert( n % 2 == 0 );
467 if( ( end - tmp_array ) % 2 )
473 if( visited.insert( s ).second ) lists[1 - index].push_back( s );
475 while( tmp_array < end )
480 if( visited.insert( s ).second ) lists[1 - index].push_back( s );
493 for( end = tmp_array + count; tmp_array != end; ++tmp_array )
494 if( visited.insert( *tmp_array ).second ) lists[1 - index].push_back( *tmp_array );
498 lists[index].clear();
505 std::copy( lists[index].begin(), lists[index].end(), std::back_inserter( results ) );
513 std::vector< EntityHandle >& parents,
520 if( parents.empty() )
522 parents.resize( count );
523 std::copy( tmp_array, tmp_array + count, parents.begin() );
540 std::vector< EntityHandle >&
children,
550 std::copy( tmp_array, tmp_array + count,
children.begin() );
567 std::vector< EntityHandle >& contained,
570 if( num_hops == 1 && contained.empty() )
592 std::vector< EntityHandle > parents;
594 number = parents.size();
609 std::vector< EntityHandle >
children;
626 std::vector< EntityHandle > contained;
628 number = contained.size();