33 #ifndef __H__UG__element_visitor_util__
34 #define __H__UG__element_visitor_util__
44 template <
class TIter>
45 void VisitAll(
const TIter begin,
const TIter end,
71 template <
class TIter>
77 typedef typename TElem::side TSide;
81 std::vector<TSide*> sides;
82 std::vector<TElem*> elems;
84 while(iter != facesEnd){
88 for(
size_t i = 0; i < sides.size(); ++i){
89 TSide* side = sides[i];
95 for(
size_t i_elem = 0; i_elem < elems.size(); ++i_elem){
96 if(cbBelongsToArea(elems[i_elem]))
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
bool is_marked(GridObject *obj) const
returns true if the object is marked, false if not.
Definition: grid_impl.hpp:843
void mark(GridObject *obj)
marks the object. Calls are only valid between calls to Grid::begin_marking and Grid::end_marking.
Definition: grid_impl.hpp:773
void begin_marking()
begin marking.
Definition: grid.cpp:1262
UG_API void CollectAssociated(std::vector< Vertex * > &vVertexOut, Grid &grid, GridObject *obj, bool clearContainer=true)
Definition: grid_util_impl.hpp:169
void VisitAll(const TIter begin, const TIter end, boost::function< void(typename TIter::value_type)> visitorCallback)
Visits all elements between begin and end and executes the visitorCallback on them.
Definition: element_visitor_util.h:45
void VisitAreaBoundary(Grid &g, const TIter begin, const TIter end, boost::function< bool(typename TIter::value_type)> cbBelongsToArea, boost::function< void(typename Pointer2Value< typename TIter::value_type >::type::side)> cbVisitSide)
Visits all boundary elements of the area specified through the iterators.
Definition: element_visitor_util.h:72
T value_type
Definition: sparsematrix_interface.h:2
Definition: metaprogramming_util.h:48