33 #ifndef __H__UG_grid_util
34 #define __H__UG_grid_util
36 #include "../grid/grid.h"
37 #include "../tools/selector_grid.h"
45 template <
class TElem>
55 for(iter_t eiter = srcSel.
begin<TElem>();
56 eiter != srcSel.
end<TElem>(); ++eiter)
59 vrts.
resize(e->num_vertices());
60 for(
size_t iv = 0; iv < e->num_vertices(); ++iv)
67 template <
class TAAPosSrc,
class TAAPosDest>
69 TAAPosSrc aaPosSrc, TAAPosDest aaPosDest)
71 UG_COND_THROW(!srcSel.
grid(),
"The specified selector has to operate on a grid.");
88 aaPosDest[nv] = aaPosSrc[v];
91 CopySelectedElements<Edge>(srcSel, destGrid, aNewVrt);
92 CopySelectedElements<Face>(srcSel, destGrid, aNewVrt);
93 CopySelectedElements<Volume>(srcSel, destGrid, aNewVrt);
this class can be used if one wants to create a custom element from a set of vertices.
Definition: grid_base_objects.h:336
void set_vertex(size_t index, Vertex *vrt)
Definition: grid_base_objects.h:350
void resize(size_t newSize)
Definition: grid_base_objects.h:347
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
VertexIterator create_by_cloning(Vertex *pCloneMe, GridObject *pParent=NULL)
this method creates a new vertex, which has the same type as pCloneMe.
Definition: grid.cpp:419
void detach_from_vertices(IAttachment &attachment)
Definition: grid.h:787
void attach_to_vertices(IAttachment &attachment, bool passOnValues)
Definition: grid.h:728
Grid * grid() const
Definition: selector_interface.h:218
specialization of ISelector for a grid of class Grid.
Definition: selector_grid.h:96
geometry_traits< TElem >::iterator end()
Definition: selector_grid_impl.hpp:134
geometry_traits< TElem >::iterator begin()
Definition: selector_grid_impl.hpp:106
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
void SelectAssociatedGridObjects(TSelector &sel, ISelector::status_t status)
selects associated geometric objects of selected ones on each level.
Definition: selection_util.cpp:221
#define UG_COND_THROW(cond, msg)
UG_COND_THROW(cond, msg) : performs a UG_THROW(msg) if cond == true.
Definition: error.h:61
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
void CopySelectedElements(SmartPtr< TDomain > destDom, SmartPtr< TDomain > srcDom, Selector &sel, AVertex &aNewVrt)
Definition: vtk_export_ho.h:77
void CopySelection(Selector &srcSel, Grid &destGrid, TAAPosSrc aaPosSrc, TAAPosDest aaPosDest)
Definition: grid_util.h:68
geometry_traits< TElem >::iterator iterator
Definition: grid.h:143