MOAB: Mesh Oriented datABase  (version 5.5.0)
SetIntersectIter< Container > Class Template Reference
+ Inheritance diagram for SetIntersectIter< Container >:
+ Collaboration diagram for SetIntersectIter< Container >:

Public Member Functions

 SetIntersectIter (iBase_EntityType type, iMesh_EntityTopology topology, EntityHandle set, EntityHandle other_set, int array_sz)
 
virtual ~SetIntersectIter ()
 
ErrorCode intersect_with_set (Interface *mb, Range &range)
 
ErrorCode intersect_with_set (Interface *mb, std::vector< EntityHandle > &list)
 
virtual ErrorCode reset (Interface *mb)
 
- Public Member Functions inherited from MBIter< Container >
 MBIter (iBase_EntityType type, iMesh_EntityTopology topology, EntityHandle set, int arr_size, bool recursive=false)
 
 ~MBIter ()
 
Container::const_iterator position () const
 
Container::const_iterator end () const
 
ErrorCode step (int num_steps, bool &at_end)
 
void get_entities (Core *mb, EntityHandle *array, int &count)
 
virtual ErrorCode reset (Interface *mb)
 
- Public Member Functions inherited from iBase_EntityArrIterator_Private
 iBase_EntityArrIterator_Private (iBase_EntityType type, iMesh_EntityTopology topology, EntityHandle set, int array_sz, bool recursive=false)
 
virtual ~iBase_EntityArrIterator_Private ()
 
int array_size () const
 
void remove_type (std::vector< EntityHandle > &vect, EntityType t)
 
void remove_type (Range &range, EntityType t)
 

Private Attributes

EntityHandle otherSet
 

Additional Inherited Members

- Protected Attributes inherited from MBIter< Container >
Container iterData
 
Container::const_iterator iterPos
 
- Protected Attributes inherited from iBase_EntityArrIterator_Private
iBase_EntityType entType
 
iMesh_EntityTopology entTopo
 
EntityHandle entSet
 
int arrSize
 
bool isRecursive
 

Detailed Description

template<class Container>
class SetIntersectIter< Container >

Definition at line 301 of file iMeshP_MOAB.cpp.

Constructor & Destructor Documentation

◆ SetIntersectIter()

template<class Container >
SetIntersectIter< Container >::SetIntersectIter ( iBase_EntityType  type,
iMesh_EntityTopology  topology,
EntityHandle  set,
EntityHandle  other_set,
int  array_sz 
)
inline

Definition at line 307 of file iMeshP_MOAB.cpp.

312  : MBIter< Container >( type, topology, set, array_sz ), otherSet( other_set )
313  {
314  }

◆ ~SetIntersectIter()

template<class Container >
virtual SetIntersectIter< Container >::~SetIntersectIter ( )
inlinevirtual

Definition at line 315 of file iMeshP_MOAB.cpp.

315 {}

Member Function Documentation

◆ intersect_with_set() [1/2]

template<class Container >
ErrorCode SetIntersectIter< Container >::intersect_with_set ( Interface mb,
Range range 
)
inline

Definition at line 317 of file iMeshP_MOAB.cpp.

318  {
319  Range tmp;
320  ErrorCode result;
321  result = mb->get_entities_by_handle( otherSet, tmp );
322  range = intersect( range, tmp );
323  return result;
324  }

References ErrorCode, moab::Core::get_entities_by_handle(), moab::intersect(), and mb.

◆ intersect_with_set() [2/2]

template<class Container >
ErrorCode SetIntersectIter< Container >::intersect_with_set ( Interface mb,
std::vector< EntityHandle > &  list 
)
inline

Definition at line 326 of file iMeshP_MOAB.cpp.

327  {
328  size_t w = 0;
329  for( size_t r = 0; r < list.size(); ++r )
330  {
331  if( mb->contains_entities( otherSet, &list[r], 1 ) ) list[w++] = list[r];
332  }
333  list.resize( w );
334  return MB_SUCCESS;
335  }

References moab::Core::contains_entities(), mb, and MB_SUCCESS.

◆ reset()

template<class Container >
virtual ErrorCode SetIntersectIter< Container >::reset ( Interface mb)
inlinevirtual

Definition at line 337 of file iMeshP_MOAB.cpp.

338  {
340  if( MB_SUCCESS != result ) return result;
341 
344  return result;
345  }

References ErrorCode, mb, MB_SUCCESS, and MBIter< Container >::reset().

Member Data Documentation

◆ otherSet

template<class Container >
EntityHandle SetIntersectIter< Container >::otherSet
private

Definition at line 304 of file iMeshP_MOAB.cpp.


The documentation for this class was generated from the following file: