38 #ifndef __H__LIBGRID__SELECTOR_GRID_IMPL__
39 #define __H__LIBGRID__SELECTOR_GRID_IMPL__
46 template <
class TElem>
53 template <
class TElem>
60 for(iter = begin<TElem>(); iter != end<TElem>(); ++iter)
64 const int sInd = get_section_index<TElem>();
66 section_container<TElem>().clear();
68 section_container<TElem>().clear_section(sInd);
72 template <
class TElem>
76 const int sInd = get_section_index<TElem>();
78 return section_container<TElem>().num_elements();
80 return section_container<TElem>().num_elements(sInd);
86 return num<Vertex>() + num<Edge>() + num<Face>() + num<Volume>();
96 template <
class TElem>
100 return num<TElem>() == 0;
104 template <
class TElem>
108 const int sInd = get_section_index<TElem>();
110 return iterator_cast<typename geometry_traits<TElem>::iterator>(
111 section_container<TElem>().begin());
113 return iterator_cast<typename geometry_traits<TElem>::iterator>(
114 section_container<TElem>().section_begin(sInd));
118 template <
class TElem>
122 const int sInd = get_section_index<TElem>();
124 return iterator_cast<typename geometry_traits<TElem>::const_iterator>(
125 section_container<TElem>().begin());
127 return iterator_cast<typename geometry_traits<TElem>::const_iterator>(
128 section_container<TElem>().section_begin(sInd));
132 template <
class TElem>
136 const int sInd = get_section_index<TElem>();
138 return iterator_cast<typename geometry_traits<TElem>::iterator>(
139 section_container<TElem>().end());
141 return iterator_cast<typename geometry_traits<TElem>::iterator>(
142 section_container<TElem>().section_end(sInd));
146 template <
class TElem>
150 const int sInd = get_section_index<TElem>();
152 return iterator_cast<typename geometry_traits<TElem>::const_iterator>(
153 section_container<TElem>().end());
155 return iterator_cast<typename geometry_traits<TElem>::const_iterator>(
156 section_container<TElem>().section_end(sInd));
159 template <
class TElem>
163 const int sInd = get_section_index<TElem>();
164 return static_cast<TElem*
>(section_container<TElem>().front(sInd));
167 template <
class TElem>
171 const int sInd = get_section_index<TElem>();
172 return static_cast<TElem*
>(section_container<TElem>().back(sInd));
191 template <
class TElem>
204 template <
class TElem>
208 return empty<TElem>();
211 template <
class TElem>
215 return begin<TElem>();
220 template <
class TElem>
227 template <
class TElem>
237 template <
class TElem>
void mark_deselected(Vertex *elem)
Definition: selector_interface.h:368
Grid * m_pGrid
Definition: selector_interface.h:388
Grid::traits< TElem >::SectionContainer & section_container()
returns the section container for the given type, subset and level
Definition: selector_grid_impl.hpp:230
geometry_traits< TElem >::iterator end()
Definition: selector_grid_impl.hpp:134
bool empty() const
Definition: selector_grid_impl.hpp:91
TElem * front()
returns the first selected element of the given type.
Definition: selector_grid_impl.hpp:161
virtual void clear()
Definition: selector_grid.cpp:155
FaceSectionContainer m_faces
Definition: selector_grid.h:316
int get_section_index() const
Definition: selector_grid_impl.hpp:48
EdgeSectionContainer m_edges
Definition: selector_grid.h:315
TElem * back()
returns the last selected element of the given type.
Definition: selector_grid_impl.hpp:169
size_t num() const
Definition: selector_grid_impl.hpp:74
VolumeSectionContainer m_volumes
Definition: selector_grid.h:317
geometry_traits< TElem >::iterator begin()
Definition: selector_grid_impl.hpp:106
size_t num_levels() const
always returns 1
Definition: selector_grid_impl.hpp:180
VertexSectionContainer m_vertices
Copy Constructor not yet implemented!
Definition: selector_grid.h:311
Definition: grid_base_object_traits.h:68
unsigned int uint
Definition: types.h:114
Helper class to access the correct element storage from its element type.
Definition: element_storage.h:210