33 #ifndef __H__UG__HANGING_NODE_REFINER_BASE__
34 #define __H__UG__HANGING_NODE_REFINER_BASE__
90 template <
class TSelector>
141 size_t numIterations,
160 template <
class TElem>
167 template <
class TElem>
174 template <
class TElem>
180 template <
class TElem>
192 typedef typename TSelector::template traits<Vertex>::iterator
sel_vrt_iter;
195 typedef typename TSelector::template traits<Volume>::iterator
sel_vol_iter;
258 {
return continueRequired;}
287 Vertex** newCornerVrts = NULL);
289 Vertex** newCornerVrts = NULL);
294 Vertex** newCornerVrts = NULL);
296 Vertex** newCornerVrts = NULL);
299 Vertex** newVolumeVrts = NULL);
337 template <
class TElem>
340 template <
class TElem>
343 template <
class TElem>
346 template <
class TElem>
349 template <
class TElem>
354 template <
class TElem>
This edge is a sub-edge of a.
Definition: grid_objects_1d.h:146
This class stores the constraining object.
Definition: grid_objects_2d.h:383
A vertex appearing on edges or faces.
Definition: grid_objects_0d.h:110
contains elements of type
Definition: grid_objects_1d.h:279
This class is used to store constrained geometric objects.
Definition: grid_objects_2d.h:562
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
Definition: grid_observer.h:80
Base class for a hanging-node refiner.
Definition: hanging_node_refiner_base.h:92
bool remove_coarsen_marks()
removes coarsen marks from the selection
Definition: hanging_node_refiner_base.cpp:993
virtual bool mark(Vertex *v, RefinementMark refMark=RM_REFINE)
Marks an element for refinement. Default implementation is empty.
Definition: refiner_interface.h:103
virtual void collect_objects_for_refine()
marks unmarked elements that have to be refined due to marked neighbors.
Definition: hanging_node_refiner_base.cpp:1012
TSelector::template traits< Face >::iterator sel_face_iter
Definition: hanging_node_refiner_base.h:194
bool marked_to_constrained(TElem *elem) const
Definition: hanging_node_refiner_base.h:341
std::vector< Volume * > m_newlyMarkedRefVols
Definition: hanging_node_refiner_base.h:376
virtual ~HangingNodeRefinerBase()
Definition: hanging_node_refiner_base.cpp:85
bool adjusting_ref_marks() const
Definition: hanging_node_refiner_base.h:361
virtual void grid_to_be_destroyed(Grid *grid)
Definition: hanging_node_refiner_base.cpp:115
virtual void process_constraining_edge(ConstrainingEdge *cge)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1474
virtual void process_constrained_face(ConstrainedFace *cdf)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1887
std::vector< Vertex * > m_newlyMarkedRefVrts
Definition: hanging_node_refiner_base.h:373
bool marked_refine(TElem *elem) const
Definition: hanging_node_refiner_base.h:161
virtual void refine_face_with_hanging_vertex(Face *f, Vertex **newCornerVrts=NULL)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1674
Grid * m_pGrid
Definition: hanging_node_refiner_base.h:372
virtual bool refinement_is_allowed(Face *elem)
a callback that allows to deny refinement of special faces
Definition: hanging_node_refiner_base.h:227
bool is_marked(Face *f)
Definition: hanging_node_refiner_base.h:321
bool is_marked(Vertex *v)
Definition: hanging_node_refiner_base.h:306
bool m_adjustingRefMarks
true during collect_objects_for_refine
Definition: hanging_node_refiner_base.h:386
HangingNodeRefinerBase(SPRefinementProjector projector=SPNULL)
Definition: hanging_node_refiner_base.cpp:66
bool marked_refine(Edge *elem) const
Definition: hanging_node_refiner_base.h:154
virtual bool refinement_is_allowed(Volume *elem)
a callback that allows to deny refinement of special volumes
Definition: hanging_node_refiner_base.h:229
void perform_refinement()
performs refinement on the marked elements.
Definition: hanging_node_refiner_base.cpp:643
void add_hmark(TElem *elem, HNodeRefMarks mark)
Definition: hanging_node_refiner_base.cpp:1332
TSelector::template traits< Volume >::iterator sel_vol_iter
Definition: hanging_node_refiner_base.h:195
virtual void mark_neighborhood(size_t numIterations, RefinementMark refMark, bool sideNbrsOnly)
Marks the neighborhood of the current selection.
Definition: hanging_node_refiner_base.cpp:196
virtual void pre_refine()
Definition: hanging_node_refiner_base.h:271
virtual void refine_face_with_normal_vertex(Face *f, Vertex **newCornerVrts=NULL)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1595
virtual void post_refine()
Definition: hanging_node_refiner_base.h:274
virtual void refine_edge_with_hanging_vertex(Edge *e, Vertex **newCornerVrts=NULL)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1551
TSelector m_selMarkedElements
Definition: hanging_node_refiner_base.h:368
virtual RefinementMark get_mark(Vertex *v) const
Returns the mark of a given element.
Definition: hanging_node_refiner_base.cpp:474
TSelector::template traits< Edge >::iterator sel_edge_iter
Definition: hanging_node_refiner_base.h:193
std::vector< Face * > m_newlyMarkedRefFaces
Definition: hanging_node_refiner_base.h:375
void set_grid(typename TSelector::grid_type *grid)
performs registration and deregistration at a grid.
Definition: hanging_node_refiner_base.cpp:95
virtual void set_center_vertex(Edge *e, Vertex *v)=0
Associates a vertex with the edge (pure virtual).
bool marked_adaptive(TElem *elem) const
Definition: hanging_node_refiner_base.h:168
bool is_marked(Edge *e)
Definition: hanging_node_refiner_base.h:309
virtual void process_constraining_face(ConstrainingFace *cgf)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1921
TSelector::template traits< Vertex >::iterator sel_vrt_iter
Definition: hanging_node_refiner_base.h:192
std::vector< Edge * > m_newlyMarkedRefEdges
Definition: hanging_node_refiner_base.h:374
virtual Vertex * get_center_vertex(Edge *e)=0
Returns the vertex associated with the edge.
virtual Vertex * get_center_vertex(Face *f)=0
Returns the vertex associated with the face.
bool is_marked(Volume *v)
Definition: hanging_node_refiner_base.h:333
virtual void refine_edge_with_normal_vertex(Edge *e, Vertex **newCornerVrts=NULL)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1520
bool node_dependency_order_1_enabled()
enables or disables node-dependency-order-1.
Definition: hanging_node_refiner_base.h:121
virtual void process_constrained_vertex(ConstrainedVertex *cdv)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1393
bool marked_regular(TElem *elem) const
Definition: hanging_node_refiner_base.h:175
virtual bool refinement_is_allowed(Edge *elem)
a callback that allows to deny refinement of special edges
Definition: hanging_node_refiner_base.h:225
bool m_nodeDependencyOrder1
Definition: hanging_node_refiner_base.h:384
virtual void set_center_vertex(Face *f, Vertex *v)=0
Associates a vertex with the face (pure virtual).
virtual bool refinement_is_allowed(Vertex *elem)
a callback that allows to deny refinement of special vertices
Definition: hanging_node_refiner_base.h:223
virtual void refine_volume_with_normal_vertex(Volume *v, Vertex **newVolumeVrts=NULL)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:2004
TSelector selector_t
Definition: hanging_node_refiner_base.h:96
TSelector & get_refmark_selector()
returns the selector which is internally used to mark elements.
Definition: hanging_node_refiner_base.h:359
HNodeRefMarks
Definition: hanging_node_refiner_base.h:100
@ HNRM_MAX
Definition: hanging_node_refiner_base.h:104
@ HNRM_TO_CONSTRAINED
Definition: hanging_node_refiner_base.h:102
@ HNRM_TO_NORMAL
Definition: hanging_node_refiner_base.h:101
@ HNRM_TO_CONSTRAINING
Definition: hanging_node_refiner_base.h:103
bool marked_to_constraining(TElem *elem) const
Definition: hanging_node_refiner_base.h:344
virtual void process_constrained_edge(ConstrainedEdge *cde)
called to refine the specified element.
Definition: hanging_node_refiner_base.cpp:1439
virtual bool save_marks_to_file(const char *filename)
Writes the associated grid and marks to a file. Pure virtual.
Definition: hanging_node_refiner_base.cpp:507
virtual void assign_hnode_marks()
Definition: hanging_node_refiner_base.cpp:1092
bool marked_coarsen(TElem *elem) const
Definition: hanging_node_refiner_base.h:181
void enable_node_dependency_order_1(bool bEnable)
enables or disables node-dependency-order-1.
Definition: hanging_node_refiner_base.cpp:634
std::vector< SPIRefMarkAdjuster > m_refMarkAdjusters
Definition: hanging_node_refiner_base.h:369
void remove_hmark(TElem *elem, uint mark)
Definition: hanging_node_refiner_base.cpp:1362
void add_ref_mark_adjuster(SPIRefMarkAdjuster adjuster)
Add a refmark adjuster, which will be called while marks are adjusted during refinement / coarsening.
Definition: hanging_node_refiner_base.h:125
virtual void clear_marks()
clears all marks. Default implementation is empty
Definition: hanging_node_refiner_base.cpp:121
bool marked_to_normal(TElem *elem) const
Definition: hanging_node_refiner_base.h:338
virtual bool continue_collect_objects_for_refine(bool continueRequired)
Definition: hanging_node_refiner_base.h:257
The refiner interface allows to mark elements for refinement and to call refine.
Definition: refiner_interface.h:67
virtual bool mark(Vertex *v, RefinementMark refMark=RM_REFINE)
Marks an element for refinement. Default implementation is empty.
Definition: refiner_interface.h:103
virtual Grid * grid()=0
Returns the grid associated with the refiner.
SPRefinementProjector projector()
Definition: refiner_interface.h:78
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
RefinementMark
refinement-marks allow to specify how an element shall be processed during refinement.
Definition: refiner_interface.h:48
@ RM_COARSEN
the element is coarsened (only valid for adaptive multi-grid refinement)
Definition: refiner_interface.h:56
@ RM_REFINE
DEPRECATED. Use RM_FULL instead.
Definition: refiner_interface.h:55
@ RM_CLOSURE
Refines elements according to associated marked edges.
Definition: refiner_interface.h:50
@ RM_LOCAL
Refines elements according to a local refinement mark (use 'mark_local')
Definition: refiner_interface.h:53
@ RM_FULL
Fully refines an element and all associated sides and edges.
Definition: refiner_interface.h:54
const NullSmartPtr SPNULL
The equivalent to NULL for smart pointers.
Definition: smart_pointer.h:90
unsigned int uint
Definition: types.h:114