33 #ifndef __H__UG__LIB_GRID__TOOLS__SURFACE_VIEW__
34 #define __H__UG__LIB_GRID__TOOLS__SURFACE_VIEW__
110 bool adaptiveMG =
true);
124 template <
class TGeomObj>
129 template <
class TElem>
134 template <
class TGeomObj>
135 inline bool is_ghost(TGeomObj* obj)
const;
141 template <
class TGeomObj>
149 template <
class TGeomObj>
161 template <
class TElem>
165 template <
typename TElem,
typename TBaseElem>
169 bool clearContainer =
true)
const;
172 template <
class TElem>
class SurfaceViewElementIterator;
173 template <
class TElem>
class ConstSurfaceViewElementIterator;
176 template <
class TElem>
209 template <
class TGeomObj>
235 template <
class TElem>
271 template <
class TGeomObj>
297 template <
class TElem>
305 template <
class TElem>
309 template <
class TElem>
313 template <
class TElem>
317 template <
class TElem>
321 template <
class TElem>
325 template <
class TElem>
329 template <
class TElem>
333 template <
class TElem>
344 template <
class TElem>
348 template <
class TElem>
355 template <
class TElem,
class TS
ide>
359 template <
class TElem>
363 template <
class TElem>
366 template <
class TElem>
369 template <
class TElem>
Definition: smart_pointer.h:296
manages the layouts and interfaces which are associated with a distributed grid.
Definition: distributed_grid.h:88
Definition: grid_level.h:42
Accesses attachements in different element types at the same time.
Definition: attachment_util.h:56
Definition: multi_grid.h:72
Const iterator to traverse the surface of a multi-grid hierarchy.
Definition: surface_view.h:237
void increment()
returns next valid iterator
Definition: surface_view_impl.hpp:308
int m_toSI
Definition: surface_view.h:288
bool operator==(const this_type &iter) const
Definition: surface_view.h:261
geometry_traits< TElem >::const_iterator m_iterEndSection
Definition: surface_view.h:293
bool increment_section()
returns begin-iterator of next non-empty section, returns false if not available
Definition: surface_view_impl.hpp:275
const SurfaceView * m_pSurfView
Definition: surface_view.h:284
ConstSurfaceViewElementIterator< TElem > this_type
Definition: surface_view.h:244
int m_si
Definition: surface_view.h:289
int m_fromSI
Definition: surface_view.h:287
geometry_traits< TElem >::const_iterator m_elemIter
Definition: surface_view.h:292
this_type operator++()
Definition: surface_view.h:258
SurfaceState m_validStates
Definition: surface_view.h:286
ConstSurfaceViewElementIterator()
Definition: surface_view_impl.hpp:212
bool equal(ConstSurfaceViewElementIterator< TElem > const &other) const
returns if this iterator equals another
Definition: surface_view_impl.hpp:268
bool is_contained(TGeomObj *obj) const
returns if valid element, i.e. contained in iterator loop
Definition: surface_view_impl.hpp:337
GridLevel m_gl
Definition: surface_view.h:285
TValue operator*()
Definition: surface_view.h:264
int m_topLvl
Definition: surface_view.h:290
bool operator!=(const this_type &iter) const
Definition: surface_view.h:262
TElem * TValue
Definition: surface_view.h:246
TValue dereference() const
dereference
Definition: surface_view_impl.hpp:329
int m_lvl
Definition: surface_view.h:291
Iterator to traverse the surface of a multi-grid hierarchy.
Definition: surface_view.h:178
geometry_traits< TElem >::iterator m_iterEndSection
Definition: surface_view.h:231
SurfaceViewElementIterator< TElem > this_type
Definition: surface_view.h:183
TElem * TValue
Definition: surface_view.h:184
bool operator!=(const this_type &iter) const
Definition: surface_view.h:200
bool is_contained(TGeomObj *obj) const
returns if valid element, i.e. contained in iterator loop
Definition: surface_view_impl.hpp:168
int m_lvl
Definition: surface_view.h:229
bool equal(SurfaceViewElementIterator< TElem > const &other) const
returns if this iterator equals another
Definition: surface_view_impl.hpp:100
geometry_traits< TElem >::iterator m_elemIter
Definition: surface_view.h:230
SurfaceState m_validStates
Definition: surface_view.h:224
int m_fromSI
Definition: surface_view.h:225
void increment()
returns next valid iterator
Definition: surface_view_impl.hpp:140
SurfaceView * m_pSurfView
Definition: surface_view.h:222
TValue dereference() const
dereference
Definition: surface_view_impl.hpp:160
bool increment_section()
returns begin-iterator of next non-empty section, returns false if not available
Definition: surface_view_impl.hpp:107
SurfaceViewElementIterator()
Definition: surface_view_impl.hpp:85
int m_topLvl
Definition: surface_view.h:228
bool operator==(const this_type &iter) const
Definition: surface_view.h:199
GridLevel m_gl
Definition: surface_view.h:223
TValue operator*()
Definition: surface_view.h:202
this_type operator++()
Definition: surface_view.h:196
int m_toSI
Definition: surface_view.h:226
int m_si
Definition: surface_view.h:227
Represents the surface view of a multi-grid hierarchy.
Definition: surface_view.h:61
SurfaceState surface_state(TElem *elem) const
returns an or combination of current surface states
Definition: surface_view.h:162
traits< TElem >::iterator end(int si, const GridLevel &gl, SurfaceState validStates)
Definition: surface_view_impl.hpp:372
bool is_shadowing(TGeomObj *obj) const
returns true if the given element is a shadowing element
Definition: surface_view_impl.hpp:515
SurfaceState & surface_state(TElem *elem)
Definition: surface_view.h:367
SurfaceView(SmartPtr< MGSubsetHandler > spMGSH, bool adaptiveMG=true)
Definition: surface_view.cpp:317
Attachment< SurfaceState > ASurfaceState
Definition: surface_view.h:106
bool is_adaptive() const
returns if multigrid is adaptive
Definition: surface_view_impl.hpp:436
void mark_sides_as_surface_or_shadow(TElem *elem, byte surfaceState=MG_SURFACE_PURE)
recursively marks sides and sides of sides as surface or shadow
Definition: surface_view.cpp:200
bool is_contained(TGeomObj *obj, const GridLevel &gl, SurfaceState validStates=ALL) const
returns if the element is contained in the surface view
Definition: surface_view_impl.hpp:442
bool m_adaptiveMG
Definition: surface_view.h:374
bool is_shadowed(TGeomObj *obj) const
returns if the element is shadowed and thus not contained in the surface view
Definition: surface_view_impl.hpp:509
~SurfaceView()
Definition: surface_view.cpp:332
void mark_shadowing(bool markSides=false)
Definition: surface_view.cpp:245
SmartPtr< MGSubsetHandler > m_spMGSH
Definition: surface_view.h:373
bool is_local_surface_view_element(TElem *elem)
returns true if the element is a surface element locally
Definition: surface_view.cpp:112
DistributedGridManager * m_distGridMgr
Definition: surface_view.h:376
ASurfaceState m_aSurfState
Definition: surface_view.h:377
MultiGrid * m_pMG
Definition: surface_view.h:375
void refresh_surface_states()
refresh_surface_states must be called after a grid change
Definition: surface_view.cpp:123
SurfaceConstants
Definition: surface_view.h:72
@ MG_SURFACE_PURE
surface, i.e., without children (inner)
Definition: surface_view.h:75
@ MG_SHADOW_RIM
all rim-shadows
Definition: surface_view.h:82
@ MG_ALL_BUT_SHADOW_COPY
surface + rim-non-copy-shadows
Definition: surface_view.h:85
@ SHADOW_PURE
pseudo-state
Definition: surface_view.h:92
@ MG_SHADOW_PURE
full-covered (inner)
Definition: surface_view.h:74
@ MG_SHADOW
all shadows
Definition: surface_view.h:83
@ SHADOW_RIM
Definition: surface_view.h:98
@ SHADOW_RIM_NONCOPY
Definition: surface_view.h:96
@ ALL_BUT_SHADOW_COPY
Definition: surface_view.h:101
@ SURFACE
Definition: surface_view.h:100
@ SURFACE_RIM
Definition: surface_view.h:94
@ TREAT_TOP_LVL_SHADOWS_AS_SURFACE_PURE
Definition: surface_view.h:89
@ MG_SURFACE_RIM
surface, i.e., without children (at rim)
Definition: surface_view.h:76
@ ALL
Definition: surface_view.h:102
@ MG_SHADOW_RIM_NONCOPY
covered (at rim) with non-identical child(ren)
Definition: surface_view.h:78
@ SHADOW_RIM_COPY
Definition: surface_view.h:95
@ SHADOW
Definition: surface_view.h:99
@ MG_SHADOW_RIM_COPY
covered (at rim) with identical child
Definition: surface_view.h:77
@ MG_ALL
all (except pure-shadow)
Definition: surface_view.h:86
@ MG_SURFACE
all surface
Definition: surface_view.h:84
@ SURFACE_PURE
Definition: surface_view.h:93
SmartPtr< MGSubsetHandler > subset_handler()
returns underlying subset handler
Definition: surface_view_impl.hpp:426
MultiElementAttachmentAccessor< ASurfaceState > m_aaSurfState
Definition: surface_view.h:378
SurfaceState surface_state(TElem *elem, const GridLevel &gl) const
returns the surface states, when considered as part of grid level
bool is_vmaster(TElem *elem) const
Definition: surface_view_impl.hpp:521
traits< TElem >::iterator begin(int si, const GridLevel &gl, SurfaceState validStates)
Definition: surface_view_impl.hpp:364
Flag< SurfaceConstants, byte, SS_NONE > SurfaceState
Definition: surface_view.h:105
void adjust_parallel_surface_states()
adjusts surface states in a parallel environment
Definition: surface_view.cpp:289
void collect_associated(std::vector< TBaseElem * > &vAssElem, TElem *elem, const GridLevel &gl, bool clearContainer=true) const
returns the adjacent elements w.r.t. the grid level
Definition: surface_view_impl.hpp:532
bool is_ghost(TGeomObj *obj) const
returns if the element is ghost
Definition: surface_view_impl.hpp:499
Definition: grid_base_object_traits.h:68
Definition: surface_view.h:298
ConstSurfaceViewElementIterator< TElem > const_iterator
Definition: surface_view.h:300
SurfaceViewElementIterator< TElem > iterator
Definition: surface_view.h:299