Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
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)

Private Attributes

EntityHandle otherSet

Detailed Description

template<class Container>
class SetIntersectIter< Container >

Definition at line 301 of file iMeshP_MOAB.cpp.


Constructor & Destructor Documentation

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.

        : MBIter< Container >( type, topology, set, array_sz ), otherSet( other_set )
    {
    }
template<class Container>
virtual SetIntersectIter< Container >::~SetIntersectIter ( ) [inline, virtual]

Definition at line 315 of file iMeshP_MOAB.cpp.

{}

Member Function Documentation

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

Definition at line 317 of file iMeshP_MOAB.cpp.

References ErrorCode, moab::Interface::get_entities_by_handle(), and moab::intersect().

    {
        Range tmp;
        ErrorCode result;
        result = mb->get_entities_by_handle( otherSet, tmp );
        range  = intersect( range, tmp );
        return result;
    }
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.

References moab::Interface::contains_entities(), and MB_SUCCESS.

    {
        size_t w = 0;
        for( size_t r = 0; r < list.size(); ++r )
        {
            if( mb->contains_entities( otherSet, &list[r], 1 ) ) list[w++] = list[r];
        }
        list.resize( w );
        return MB_SUCCESS;
    }
template<class Container>
virtual ErrorCode SetIntersectIter< Container >::reset ( Interface mb) [inline, virtual]

Definition at line 337 of file iMeshP_MOAB.cpp.

References ErrorCode, and MB_SUCCESS.

Referenced by iMeshP_initEntArrIter().

    {
        ErrorCode result = MBIter< Container >::reset( mb );
        if( MB_SUCCESS != result ) return result;

        result                       = intersect_with_set( mb, MBIter< Container >::iterData );
        MBIter< Container >::iterPos = MBIter< Container >::iterData.begin();
        return result;
    }

Member Data Documentation

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

Definition at line 304 of file iMeshP_MOAB.cpp.

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines