38 #ifndef __H__LIBGRID__SELECTOR_GRID__
39 #define __H__LIBGRID__SELECTOR_GRID__
102 template <
class TElem>
115 void assign_grid(
Grid& grid);
116 void assign_grid(
Grid* grid);
123 void set_supported_elements(
uint shElements);
129 void enable_element_support(
uint shElements);
135 void disable_element_support(
uint shElements);
137 virtual void clear();
139 template <
class TElem>
142 template <
class TElem>
143 inline size_t num()
const;
145 inline size_t num()
const;
148 inline bool empty()
const;
150 template <
class TElem>
151 inline bool empty()
const;
154 template <
class TElem>
158 template <
class TElem>
163 template <
class TElem>
167 template <
class TElem>
184 template <
class TElem> TElem* front();
189 template <
class TElem> TElem* back();
197 virtual void grid_to_be_destroyed(
Grid* grid);
202 inline size_t num_levels()
const;
205 inline uint num(
size_t)
const;
207 template <
class TElem>
inline size_t num(
size_t)
const;
211 inline bool empty(
size_t)
const;
213 template <
class TElem>
214 inline bool empty(
size_t)
const;
218 template <
class TElem>
224 template <
class TElem>
254 virtual void add_to_list(
Vertex* elem);
255 virtual void add_to_list(
Edge* elem);
256 virtual void add_to_list(
Face* elem);
257 virtual void add_to_list(
Volume* elem);
259 virtual void erase_from_list(
Vertex* elem);
260 virtual void erase_from_list(
Edge* elem);
261 virtual void erase_from_list(
Face* elem);
262 virtual void erase_from_list(
Volume* elem);
268 inline VertexSectionContainer::iterator
271 assert(is_selected(o) &&
"object not selected.");
272 return section_container<Vertex>().get_container().get_iterator(o);
275 inline EdgeSectionContainer::iterator
278 assert(is_selected(o) &&
"object not selected");
279 return section_container<Edge>().get_container().get_iterator(o);
282 inline FaceSectionContainer::iterator
285 assert(is_selected(o) &&
"object not selected");
286 return section_container<Face>().get_container().get_iterator(o);
289 inline VolumeSectionContainer::iterator
292 assert(is_selected(o) &&
"object not selected");
293 return section_container<Volume>().get_container().get_iterator(o);
298 template <
class TElem>
inline
303 template <
class TElem>
inline
305 section_container()
const;
307 template <
class TElem>
308 inline int get_section_index()
const;
Base-class for edges.
Definition: grid_base_objects.h:397
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
a helper class that holds a collection of possibly unconnected geometric-objects.
Definition: grid_object_collection.h:96
base-implementation of a selector
Definition: selector_interface.h:126
Grid::traits< Face >::SectionContainer FaceSectionContainer
Definition: selector_interface.h:325
Grid::traits< Edge >::AttachedElementList AttachedEdgeList
Definition: selector_interface.h:319
Grid::traits< Vertex >::AttachedElementList AttachedVertexList
Definition: selector_interface.h:318
Grid::traits< Edge >::SectionContainer EdgeSectionContainer
Definition: selector_interface.h:324
Grid::traits< Face >::AttachedElementList AttachedFaceList
Definition: selector_interface.h:320
Grid::traits< Vertex >::SectionContainer VertexSectionContainer
Definition: selector_interface.h:323
Grid::traits< Volume >::SectionContainer VolumeSectionContainer
Definition: selector_interface.h:326
Grid::traits< Volume >::AttachedElementList AttachedVolumeList
Definition: selector_interface.h:321
specialization of ISelector for a grid of class Grid.
Definition: selector_grid.h:96
Selector(const Selector &sel)
Definition: selector_grid.h:311
Grid grid_type
Definition: selector_grid.h:99
EdgeSectionContainer::iterator get_iterator(Edge *o)
returns the iterator at which the given element lies in the section container
Definition: selector_grid.h:276
virtual bool contains_faces() const
returns true if the selector contains faces
Definition: selector_grid.h:235
VertexIterator vertices_end()
Definition: selector_grid.h:173
FaceSectionContainer m_faces
Definition: selector_grid.h:316
VolumeSectionContainer::iterator get_iterator(Volume *o)
returns the iterator at which the given element lies in the section container
Definition: selector_grid.h:290
FaceSectionContainer::iterator get_iterator(Face *o)
returns the iterator at which the given element lies in the section container
Definition: selector_grid.h:283
virtual bool contains_edges() const
returns true if the selector contains edges
Definition: selector_grid.h:232
VertexSectionContainer::iterator get_iterator(Vertex *o)
returns the iterator at which the given element lies in the section container
Definition: selector_grid.h:269
virtual bool contains_vertices() const
returns true if the selector contains vertices
Definition: selector_grid.h:229
EdgeSectionContainer m_edges
Definition: selector_grid.h:315
VolumeIterator volumes_end()
Definition: selector_grid.h:179
VolumeIterator volumes_begin()
Definition: selector_grid.h:178
VolumeSectionContainer m_volumes
Definition: selector_grid.h:317
VertexIterator vertices_begin()
Definition: selector_grid.h:172
EdgeIterator edges_end()
Definition: selector_grid.h:175
EdgeIterator edges_begin()
Definition: selector_grid.h:174
FaceIterator faces_end()
Definition: selector_grid.h:177
ISelector BaseClass
Definition: selector_grid.h:98
virtual bool contains_volumes() const
returns true if the selector contains volumes
Definition: selector_grid.h:238
VertexSectionContainer m_vertices
Copy Constructor not yet implemented!
Definition: selector_grid.h:311
FaceIterator faces_begin()
Definition: selector_grid.h:176
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
Definition: grid_base_object_traits.h:68
#define UG_API
Definition: ug_config.h:65
unsigned int uint
Definition: types.h:114
ElementStorage< Vertex >::SectionContainer::iterator VertexIterator
This Iterator will be used as base-class for iterators of specialized geometric objects.
Definition: grid_base_object_traits.h:73
ElementStorage< Face >::SectionContainer::iterator FaceIterator
Definition: grid_base_object_traits.h:79
ElementStorage< Edge >::SectionContainer::iterator EdgeIterator
Definition: grid_base_object_traits.h:76
ElementStorage< Volume >::SectionContainer::iterator VolumeIterator
Definition: grid_base_object_traits.h:82
The traits class holds some important types for each element-type.
Definition: selector_grid.h:103
geometry_traits< TElem >::const_iterator const_level_iterator
Definition: selector_grid.h:107
geometry_traits< TElem >::iterator iterator
Definition: selector_grid.h:104
geometry_traits< TElem >::const_iterator const_iterator
Definition: selector_grid.h:105
geometry_traits< TElem >::iterator level_iterator
Definition: selector_grid.h:106