33 #ifndef __H__UG__MULTI_GRID_UTIL_IMPL__
34 #define __H__UG__MULTI_GRID_UTIL_IMPL__
41 template <
class TElem>
52 surfaceViewOut.
clear();
55 for(
size_t level = 0; level < mgsh.
num_levels(); ++level){
59 for(ElemIter iter = mgsh.
begin<TElem>(si, level);
60 iter != mgsh.
end<TElem>(si, level); ++iter)
73 template <
class TSurfaceView>
80 CollectSurfaceViewElements<Vertex>(surfaceViewOut, mg, mgsh,
true);
81 CollectSurfaceViewElements<Edge>(surfaceViewOut, mg, mgsh,
false);
82 CollectSurfaceViewElements<Face>(surfaceViewOut, mg, mgsh,
false);
83 CollectSurfaceViewElements<Volume>(surfaceViewOut, mg, mgsh,
false);
86 bool assignSidesOnly =
true;
88 assignSidesOnly =
false;
90 assignSidesOnly =
false;
92 assignSidesOnly =
false;
95 AssignAssociatedSidesToSubsets<Volume>(surfaceViewOut, mgsh);
96 AssignAssociatedSidesToSubsets<Face>(surfaceViewOut, mgsh);
97 AssignAssociatedSidesToSubsets<Edge>(surfaceViewOut, mgsh);
101 UG_LOG(
"INFO in CreateSurfaceView: Performing AssignAssociatedLowerDimElemsToSubsets ");
102 UG_LOG(
"for all elements (Small Performance drawback).\n");
104 AssignAssociatedLowerDimElemsToSubsets<Volume>(surfaceViewOut, mgsh);
105 AssignAssociatedLowerDimElemsToSubsets<Face>(surfaceViewOut, mgsh);
106 AssignAssociatedLowerDimElemsToSubsets<Edge>(surfaceViewOut, mgsh);
110 template <
class TElem>
113 typedef typename TElem::grid_base_object
TBaseElem;
116 for(
size_t i = 0; i < numChildren; ++i){
127 for(
size_t i = 0; i < e->num_sides(); ++i){
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
bool option_is_enabled(uint option) const
see set_options for a description of valid parameters.
Definition: grid.cpp:721
Vertex::side * get_side(Vertex *obj, size_t side)
This method returns the i-th side of an Edge, Face or Volume.
Definition: grid.cpp:1170
Definition: subset_handler_interface.h:223
void assign_subset(TIterator iterBegin, TIterator iterEnd, int subsetIndex)
Definition: subset_handler_interface_impl.hpp:170
void clear()
Definition: subset_handler_interface.cpp:500
int num_subsets() const
returns the number of subset-infos (return value is int, since SubsetIndices are of type int)
Definition: subset_handler_interface.h:317
Definition: multi_grid.h:72
TChild * get_child(TElem *elem, size_t ind) const
returns the i-th child of the given child-type
Definition: multi_grid.h:268
bool has_children(TElem *elem) const
Definition: multi_grid.h:217
size_t num_children(TElem *elem) const
returns the number of children of the given child-type
Definition: multi_grid.h:225
Handles subsets on a per level basis.
Definition: subset_handler_multi_grid.h:60
uint num() const
returns the total number of elements
Definition: subset_handler_multi_grid_impl.hpp:202
geometry_traits< TElem >::iterator end(int subsetIndex, int level)
returns the end-iterator for the elements of type TElem in the given subset.
Definition: subset_handler_multi_grid_impl.hpp:64
uint num_levels() const
returns the number of levels
Definition: subset_handler_multi_grid.h:80
geometry_traits< TElem >::iterator begin(int subsetIndex, int level)
returns the begin-iterator for the elements of type TElem in the given subset.
Definition: subset_handler_multi_grid_impl.hpp:44
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
Definition: grid_base_object_traits.h:68
@ VOLOPT_AUTOGENERATE_EDGES
Definition: grid_constants.h:82
@ VOLOPT_AUTOGENERATE_FACES
Definition: grid_constants.h:83
@ FACEOPT_AUTOGENERATE_EDGES
Definition: grid_constants.h:71
base_type::TBaseElem TBaseElem
#define UG_LOG(msg)
Definition: log.h:367
bool IsSubSurfaceElement(MultiGrid &mg, TElem *e, bool checkSides=false)
returns true, if the element lies one level below the surface
Definition: multi_grid_util_impl.hpp:111
void CreateSurfaceView(TSurfaceView &surfaceViewOut, MultiGrid &mg, MGSubsetHandler &mgsh)
Definition: multi_grid_util_impl.hpp:74
void CollectSurfaceViewElements(ISubsetHandler &surfaceViewOut, MultiGrid &mg, MGSubsetHandler &mgsh, bool clearContainer=true)
Definition: multi_grid_util_impl.hpp:42