41 #include "DTK_STKMeshEntityIterator.hpp" 43 #include <DTK_STKMeshEntity.hpp> 54 const Teuchos::RCP<STKMeshEntityIteratorRange> &entity_range,
55 const Teuchos::Ptr<stk::mesh::BulkData> &bulk_data,
57 : d_entity_range( entity_range )
58 , d_stk_entity_it( d_entity_range->d_stk_entities.begin() )
59 , d_bulk_data( bulk_data )
61 this->b_predicate = predicate;
67 : d_entity_range( rhs.d_entity_range )
68 , d_stk_entity_it( rhs.d_stk_entity_it )
69 , d_bulk_data( rhs.d_bulk_data )
71 this->b_predicate = rhs.b_predicate;
79 this->b_predicate = rhs.b_predicate;
84 d_entity_range = rhs.d_entity_range;
85 d_stk_entity_it = rhs.d_stk_entity_it;
86 d_bulk_data = rhs.d_bulk_data;
100 Entity &STKMeshEntityIterator::operator*(
void )
103 return d_current_entity;
108 Entity *STKMeshEntityIterator::operator->(
void )
110 d_current_entity =
STKMeshEntity( *d_stk_entity_it, d_bulk_data );
111 return &d_current_entity;
116 bool STKMeshEntityIterator::operator==(
const EntityIterator &rhs )
const 122 rhs_it->b_iterator_impl.get() );
123 return ( rhs_it_impl->d_stk_entity_it == d_stk_entity_it );
128 bool STKMeshEntityIterator::operator!=(
const EntityIterator &rhs )
const 134 rhs_it->b_iterator_impl.get() );
135 return ( rhs_it_impl->d_stk_entity_it != d_stk_entity_it );
152 end_it.d_stk_entity_it = d_entity_range->d_stk_entities.end();
159 std::unique_ptr<EntityIterator> STKMeshEntityIterator::clone()
const 161 return std::unique_ptr<EntityIterator>(
Geometric entity interface definition.
STKMesh entity interface definition.
Entity iterator interface.
STK mesh entity iterator implementation.
Assertions and Design-by-Contract for error handling.
STKMeshEntityIterator()
Default constructor.
std::function< bool(Entity)> PredicateFunction
Predicate function typedef.
STKMeshEntityIterator & operator=(const STKMeshEntityIterator &rhs)
Assignment operator.