ug4
|
Base class for a hanging-node refiner. More...
#include <hanging_node_refiner_base.h>
Public Types | |
enum | HNodeRefMarks { HNRM_TO_NORMAL = 1 << 5 , HNRM_TO_CONSTRAINED = 1 << 6 , HNRM_TO_CONSTRAINING = 1 << 7 , HNRM_MAX } |
typedef TSelector | selector_t |
Public Member Functions | |
void | add_ref_mark_adjuster (SPIRefMarkAdjuster adjuster) |
Add a refmark adjuster, which will be called while marks are adjusted during refinement / coarsening. More... | |
virtual void | clear_marks () |
clears all marks. Default implementation is empty More... | |
virtual void | grid_to_be_destroyed (Grid *grid) |
HangingNodeRefinerBase (SPRefinementProjector projector=SPNULL) | |
template<class TIterator > | |
void | mark (const TIterator &iterBegin, const TIterator &iterEnd, RefinementMark refMark=RM_REFINE) |
marks all elements between iterBegin and iterEnd. More... | |
virtual bool | mark (Edge *e, RefinementMark refMark=RM_REFINE) |
virtual bool | mark (Face *f, RefinementMark refMark=RM_REFINE) |
virtual bool | mark (GridObject *o, RefinementMark refMark=RM_REFINE) |
marks the specified geometric object More... | |
virtual bool | mark (Vertex *v, RefinementMark refMark=RM_REFINE) |
Marks an element for refinement. Default implementation is empty. More... | |
virtual bool | mark (Volume *v, RefinementMark refMark=RM_REFINE) |
virtual void | mark_neighborhood (size_t numIterations, RefinementMark refMark, bool sideNbrsOnly) |
Marks the neighborhood of the current selection. More... | |
template<class TElem > | |
bool | marked_adaptive (TElem *elem) const |
template<class TElem > | |
bool | marked_coarsen (TElem *elem) const |
bool | marked_refine (Edge *elem) const |
template<class TElem > | |
bool | marked_refine (TElem *elem) const |
template<class TElem > | |
bool | marked_regular (TElem *elem) const |
virtual bool | save_marks_to_file (const char *filename) |
Writes the associated grid and marks to a file. Pure virtual. More... | |
virtual | ~HangingNodeRefinerBase () |
void | enable_node_dependency_order_1 (bool bEnable) |
enables or disables node-dependency-order-1. More... | |
bool | node_dependency_order_1_enabled () |
enables or disables node-dependency-order-1. More... | |
virtual bool | mark (Vertex *v, RefinementMark refMark=RM_REFINE) |
Marks a element for refinement. More... | |
virtual bool | mark (Edge *e, RefinementMark refMark=RM_REFINE) |
Marks a element for refinement. More... | |
virtual bool | mark (Face *f, RefinementMark refMark=RM_REFINE) |
Marks a element for refinement. More... | |
virtual bool | mark (Volume *v, RefinementMark refMark=RM_REFINE) |
Marks a element for refinement. More... | |
virtual RefinementMark | get_mark (Vertex *v) const |
Returns the mark of a given element. More... | |
virtual RefinementMark | get_mark (Edge *e) const |
Returns the mark of a given element. More... | |
virtual RefinementMark | get_mark (Face *f) const |
Returns the mark of a given element. More... | |
virtual RefinementMark | get_mark (Volume *v) const |
Returns the mark of a given element. More... | |
Public Member Functions inherited from ug::IRefiner | |
virtual bool | adaptivity_supported () const =0 |
returns whether the refiner is able to perform adaptive refinement More... | |
bool | coarsen () |
Performs coarsening on the elements marked RM_COARSEN. More... | |
virtual bool | coarsening_supported () const =0 |
returns true, if the refiner supports coarsening. More... | |
bool | debugging_enabled () const |
void | enable_debugging (bool enable) |
virtual Grid * | get_associated_grid ()=0 |
DEPRECIATED! Use grid(). Has to return the associated grid. Pure virtual. More... | |
int | get_local_edge_mark (Face *f, Edge *e) const |
returns the local mark of the specified edge of the given face More... | |
int | get_local_edge_mark (Volume *vol, Edge *e) const |
returns the local mark of the specified edge of the given volume More... | |
int | get_local_face_mark (Volume *vol, Face *f) const |
returns the local mark of the specified face of the given volume More... | |
virtual RefinementMark | get_mark (GridObject *o) const |
returns the mark of the specified geometric object More... | |
virtual Grid * | grid ()=0 |
Returns the grid associated with the refiner. More... | |
IRefiner (SPRefinementProjector projector=SPNULL) | |
virtual bool | local_marks_supported () const |
returns true, if the refiner supports local marks. More... | |
template<class TIterator > | |
void | mark (const TIterator &iterBegin, const TIterator &iterEnd, RefinementMark refMark=RM_REFINE) |
marks all elements between iterBegin and iterEnd. More... | |
virtual bool | mark (GridObject *o, RefinementMark refMark=RM_REFINE) |
marks the specified geometric object More... | |
void | mark_neighborhood (size_t numIterations) |
marks the neighborhood of currently marked elements. More... | |
template<class TElem > | |
bool | marked_closure (TElem *elem) const |
template<class TElem > | |
bool | marked_full (TElem *elem) const |
template<class TElem > | |
bool | marked_local (TElem *elem) const |
size_t | num_marked_edges () |
returns the number of (globally) marked edges on all levels of the hierarchy More... | |
size_t | num_marked_edges (std::vector< int > &numMarkedEdgesOut) |
returns the number of (globally) marked edges on all levels of the hierarchy More... | |
size_t | num_marked_elements () |
returns the number of (globally) marked grid-objects of highest dimension More... | |
size_t | num_marked_elements (std::vector< int > &numMarkedElemsOut) |
returns the number of (globally) marked grid-objects of highest dimension More... | |
size_t | num_marked_faces () |
returns the number of (globally) marked faces on all levels of the hierarchy More... | |
size_t | num_marked_faces (std::vector< int > &numMarkedFacesOut) |
returns the number of (globally) marked faces on all levels of the hierarchy More... | |
size_t | num_marked_volumes () |
returns the number of (globally) marked volumes on all levels of the hierarchy More... | |
size_t | num_marked_volumes (std::vector< int > &numMarkedVolsOut) |
returns the number of (globally) marked volumes on all levels of the hierarchy More... | |
SPRefinementProjector | projector () |
void | refine () |
Performs refinement on the marked elements. More... | |
void | set_adjusted_marks_debug_filename (const char *filename) |
sets a filename to which adjusted marks are saved during refinement / coarsening More... | |
void | set_projector (SPRefinementProjector projector) |
virtual | ~IRefiner () |
virtual void | mark_local (Face *e, int mark) |
Marks a face or volume for local refinement. More... | |
virtual void | mark_local (Volume *e, int mark) |
Marks a face or volume for local refinement. More... | |
virtual int | get_local_mark (Face *e) const |
returns the local mark of the specified face or volume. More... | |
virtual int | get_local_mark (Volume *e) const |
returns the local mark of the specified face or volume. More... | |
void | adaption_begins () |
notifies all listeners of the associated message-hub, that adaption begins / ends. More... | |
void | adaption_ends () |
notifies all listeners of the associated message-hub, that adaption begins / ends. More... | |
Public Member Functions inherited from ug::GridObserver | |
virtual void | elements_to_be_cleared (Grid *grid) |
virtual | ~GridObserver () |
virtual void | vertex_created (Grid *grid, Vertex *vrt, GridObject *pParent=NULL, bool replacesParent=false) |
Notified whenever a new element of the given type is created in the given grid. More... | |
virtual void | edge_created (Grid *grid, Edge *e, GridObject *pParent=NULL, bool replacesParent=false) |
Notified whenever a new element of the given type is created in the given grid. More... | |
virtual void | face_created (Grid *grid, Face *f, GridObject *pParent=NULL, bool replacesParent=false) |
Notified whenever a new element of the given type is created in the given grid. More... | |
virtual void | volume_created (Grid *grid, Volume *vol, GridObject *pParent=NULL, bool replacesParent=false) |
Notified whenever a new element of the given type is created in the given grid. More... | |
virtual void | vertex_to_be_erased (Grid *grid, Vertex *vrt, Vertex *replacedBy=NULL) |
Notified whenever an element of the given type is erased from the given grid. More... | |
virtual void | edge_to_be_erased (Grid *grid, Edge *e, Edge *replacedBy=NULL) |
Notified whenever an element of the given type is erased from the given grid. More... | |
virtual void | face_to_be_erased (Grid *grid, Face *f, Face *replacedBy=NULL) |
Notified whenever an element of the given type is erased from the given grid. More... | |
virtual void | volume_to_be_erased (Grid *grid, Volume *vol, Volume *replacedBy=NULL) |
Notified whenever an element of the given type is erased from the given grid. More... | |
virtual void | vertices_to_be_merged (Grid *grid, Vertex *target, Vertex *elem1, Vertex *elem2) |
Notified when two elements of the same type are going to be merged. More... | |
virtual void | edges_to_be_merged (Grid *grid, Edge *target, Edge *elem1, Edge *elem2) |
Notified when two elements of the same type are going to be merged. More... | |
virtual void | faces_to_be_merged (Grid *grid, Face *target, Face *elem1, Face *elem2) |
Notified when two elements of the same type are going to be merged. More... | |
virtual void | volumes_to_be_merged (Grid *grid, Volume *target, Volume *elem1, Volume *elem2) |
Notified when two elements of the same type are going to be merged. More... | |
Protected Types | |
typedef TSelector::template traits< Edge >::iterator | sel_edge_iter |
typedef TSelector::template traits< Face >::iterator | sel_face_iter |
typedef TSelector::template traits< Volume >::iterator | sel_vol_iter |
typedef TSelector::template traits< Vertex >::iterator | sel_vrt_iter |
Protected Member Functions | |
template<class TElem > | |
void | add_hmark (TElem *elem, HNodeRefMarks mark) |
bool | adjusting_ref_marks () const |
virtual void | assign_hnode_marks () |
virtual void | collect_objects_for_refine () |
marks unmarked elements that have to be refined due to marked neighbors. More... | |
virtual bool | continue_collect_objects_for_refine (bool continueRequired) |
virtual Vertex * | get_center_vertex (Edge *e)=0 |
Returns the vertex associated with the edge. More... | |
virtual Vertex * | get_center_vertex (Face *f)=0 |
Returns the vertex associated with the face. More... | |
TSelector & | get_refmark_selector () |
returns the selector which is internally used to mark elements. More... | |
bool | is_marked (Edge *e) |
bool | is_marked (Face *f) |
bool | is_marked (Vertex *v) |
bool | is_marked (Volume *v) |
template<class TElem > | |
bool | marked_to_constrained (TElem *elem) const |
template<class TElem > | |
bool | marked_to_constraining (TElem *elem) const |
template<class TElem > | |
bool | marked_to_normal (TElem *elem) const |
void | perform_refinement () |
performs refinement on the marked elements. More... | |
virtual void | post_refine () |
virtual void | pre_refine () |
virtual bool | refinement_is_allowed (Edge *elem) |
a callback that allows to deny refinement of special edges More... | |
virtual bool | refinement_is_allowed (Face *elem) |
a callback that allows to deny refinement of special faces More... | |
virtual bool | refinement_is_allowed (Vertex *elem) |
a callback that allows to deny refinement of special vertices More... | |
virtual bool | refinement_is_allowed (Volume *elem) |
a callback that allows to deny refinement of special volumes More... | |
template<class TElem > | |
bool | remove_coarsen_marks () |
removes coarsen marks from the selection More... | |
template<class TElem > | |
void | remove_hmark (TElem *elem, uint mark) |
virtual void | set_center_vertex (Edge *e, Vertex *v)=0 |
Associates a vertex with the edge (pure virtual). More... | |
virtual void | set_center_vertex (Face *f, Vertex *v)=0 |
Associates a vertex with the face (pure virtual). More... | |
void | set_grid (typename TSelector::grid_type *grid) |
performs registration and deregistration at a grid. More... | |
virtual void | process_constrained_vertex (ConstrainedVertex *cdv) |
called to refine the specified element. More... | |
virtual void | process_constrained_edge (ConstrainedEdge *cde) |
called to refine the specified element. More... | |
virtual void | process_constraining_edge (ConstrainingEdge *cge) |
called to refine the specified element. More... | |
virtual void | refine_edge_with_normal_vertex (Edge *e, Vertex **newCornerVrts=NULL) |
called to refine the specified element. More... | |
virtual void | refine_edge_with_hanging_vertex (Edge *e, Vertex **newCornerVrts=NULL) |
called to refine the specified element. More... | |
virtual void | process_constrained_face (ConstrainedFace *cdf) |
called to refine the specified element. More... | |
virtual void | process_constraining_face (ConstrainingFace *cgf) |
called to refine the specified element. More... | |
virtual void | refine_face_with_normal_vertex (Face *f, Vertex **newCornerVrts=NULL) |
called to refine the specified element. More... | |
virtual void | refine_face_with_hanging_vertex (Face *f, Vertex **newCornerVrts=NULL) |
called to refine the specified element. More... | |
virtual void | refine_volume_with_normal_vertex (Volume *v, Vertex **newVolumeVrts=NULL) |
called to refine the specified element. More... | |
Protected Member Functions inherited from ug::IRefiner | |
virtual void | num_marked_edges_local (std::vector< int > &numMarkedEdgesOut)=0 |
returns the number of locally marked edges on all levels of the hierarchy More... | |
virtual void | num_marked_faces_local (std::vector< int > &numMarkedFacesOut)=0 |
returns the number of locally marked faces on all levels of the hierarchy More... | |
virtual void | num_marked_volumes_local (std::vector< int > &numMarkedVolsOut)=0 |
returns the number of locally marked volumes on all levels of the hierarchy More... | |
virtual bool | perform_coarsening () |
Called by coarsen(). Derived classes sould implement their coarsen algorithm here. More... | |
void | set_message_hub (SPMessageHub msgHub) |
sets the message hub. More... | |
Protected Attributes | |
std::vector< SPIRefMarkAdjuster > | m_refMarkAdjusters |
TSelector | m_selMarkedElements |
Protected Attributes inherited from ug::IRefiner | |
bool | m_adaptionIsActive |
std::string | m_adjustedMarksDebugFilename |
bool | m_debuggingEnabled |
SPMessageHub | m_messageHub |
int | m_msgIdAdaption |
SPRefinementProjector | m_projector |
Private Member Functions | |
HangingNodeRefinerBase (const HangingNodeRefinerBase &) | |
private copy constructor to avoid copy construction More... | |
Private Attributes | |
bool | m_adjustingRefMarks |
true during collect_objects_for_refine More... | |
std::vector< Edge * > | m_newlyMarkedRefEdges |
std::vector< Face * > | m_newlyMarkedRefFaces |
std::vector< Volume * > | m_newlyMarkedRefVols |
std::vector< Vertex * > | m_newlyMarkedRefVrts |
bool | m_nodeDependencyOrder1 |
Grid * | m_pGrid |
Base class for a hanging-node refiner.
A hanging node refiner allows to adaptively refine grid elements by inserting hanging nodes at points where T-junctions would occur (ug::HangingVertex). If further refinement is performed, the refiner automatically takes care to adjust the refined area, so that no more than 1 hanging vertex resides on any edge.
Each edge on which a hanging node lies is replaced by a ug::ConstrainingEdge. Child-edges of a constraining edge have the type ug::ConstrainedEdge.
If volumes exist, the refiner may also create elements of type ug::ConstrainingTriangle or ug::ConstrainingQuadrilateral, as well as ug::ConstrainedTriangle and ug::ConstrainedQuadrilateral.
Use the mark methods to mark elements which shall be refined. A call to refine will then perform the refinement and clear all marks.
Please note: If you're using a hanging node refiner, you have to be careful to not destroy the connections between hanging-vertices, and constrained / constraining objects.
Specializations of this class exist to support hanging node refinement on flat and on hierarchical grids.
Note that you may set a refinement callback, which will be responsible to calculate new positions of newly created vertices. By default a linear refinement callback is created for one of the standard position attachments (ug::aPosition, ug::aPosition2, ug::aPosition1 - whichever is present).
This class can't be instantiated directly. Use one of its specializations instead.
For Developers: Note that HangingNodeRefinerBase stores flags together with the refinement marks. Precisely the value 128 is used to flag whether an element has to be refined using hanging-node-rules.
|
protected |
|
protected |
|
protected |
|
protected |
typedef TSelector ug::HangingNodeRefinerBase< TSelector >::selector_t |
enum ug::HangingNodeRefinerBase::HNodeRefMarks |
ug::HangingNodeRefinerBase< TSelector >::HangingNodeRefinerBase | ( | SPRefinementProjector | projector = SPNULL | ) |
|
virtual |
|
private |
private copy constructor to avoid copy construction
|
protected |
|
inline |
Add a refmark adjuster, which will be called while marks are adjusted during refinement / coarsening.
References ug::HangingNodeRefinerBase< TSelector >::m_refMarkAdjusters.
Referenced by ug::AddHorizontalAnisotropyAdjuster(), ug::AddShadowCopyAdjuster(), and ug::HangingNodeRefinerBase< TSelector >::HangingNodeRefinerBase().
|
inlineprotected |
|
protectedvirtual |
This callback is called during execution of the refine() method after collect_objects_for_refine has returned. It is responsible to mark elements for hnode refinement. That means all elements on which a hanging node or constrained children shall be created have to be marked using mark_for_hnode_refinement during this method. The default implementation performs this marking for all local elements. Make sure to not mark any new elements for refinement during this method.
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::ParallelHangingNodeRefiner_MultiGrid.
References ug::Grid::associated_elements_sorted(), ug::CollectAssociated(), ug::ConstrainingEdge::constrained_edge(), ug::ConstrainingFace::constrained_edge(), ug::ConstrainingFace::constrained_face(), ug::ConstrainingEdge::constrained_vertex(), ug::ConstrainingFace::constrained_vertex(), ug::Volume::get_edge_index_from_vertices(), ug::GetEdgeIndex(), ug::GetVertexIndex(), ug::LIB_GRID, ug::Grid::num(), ug::ConstrainingEdge::num_constrained_edges(), ug::ConstrainingFace::num_constrained_edges(), ug::ConstrainingFace::num_constrained_faces(), ug::ConstrainingEdge::num_constrained_vertices(), ug::ConstrainingFace::num_constrained_vertices(), ug::FaceVertices::num_vertices(), ug::PointerConstArray< TPtr >::reserve(), ug::PointerConstArray< TPtr >::size(), UG_ASSERT, UG_DLOG, UG_THROW, and ug::FaceVertices::vertices().
|
virtual |
clears all marks. Default implementation is empty
Reimplemented from ug::IRefiner.
|
protectedvirtual |
marks unmarked elements that have to be refined due to marked neighbors.
all elements that have to be refined will be written to the passed queues. Note that this will most likely be more elements than just the marked ones.
This method is virtual to allow derivates to mark additional elements as required. Normally a a derived class will first call the method of its this class and the perform its own operations.
Reimplemented in ug::HangingNodeRefiner_Grid.
References HNODE_PROFILE_FUNC, ug::LIB_GRID, UG_DLOG, and UG_LOG.
|
inlineprotectedvirtual |
after each iteration in collet_objects_for_refine, this method determines whether the iteration shall be continued. Important for parallel refiners. The default implementation simply returns the specified value. This is fine for serial environments.
Reimplemented in ug::ParallelHangingNodeRefiner_MultiGrid.
void ug::HangingNodeRefinerBase< TSelector >::enable_node_dependency_order_1 | ( | bool | bEnable | ) |
enables or disables node-dependency-order-1.
If enabled, hanging nodes may only depend on non-hanging nodes. An edge containing a hanging node thus will not have a hanging-node as a corner vertex.
Enabled by default.
|
protectedpure virtual |
Returns the vertex associated with the edge.
pure virtual method. Has to return the center vertex which was set to the edge via set_center_vertex. If no vertex was set, NULL has to be returned.
Implemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
|
protectedpure virtual |
Returns the vertex associated with the face.
pure virtual method. Has to return the center vertex which was set to the face via set_center_vertex. If no vertex was set, NULL has to be returned.
Implemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
|
virtual |
Returns the mark of a given element.
Reimplemented from ug::IRefiner.
References ug::RM_CLOSURE, ug::RM_COARSEN, ug::RM_DUMMY, ug::RM_LOCAL, and ug::RM_REFINE.
|
virtual |
Returns the mark of a given element.
Reimplemented from ug::IRefiner.
References ug::RM_CLOSURE, ug::RM_COARSEN, ug::RM_DUMMY, ug::RM_LOCAL, and ug::RM_REFINE.
|
virtual |
Returns the mark of a given element.
Reimplemented from ug::IRefiner.
References ug::RM_CLOSURE, ug::RM_COARSEN, ug::RM_DUMMY, ug::RM_LOCAL, and ug::RM_REFINE.
|
virtual |
Returns the mark of a given element.
Reimplemented from ug::IRefiner.
References ug::RM_CLOSURE, ug::RM_COARSEN, ug::RM_DUMMY, ug::RM_LOCAL, and ug::RM_REFINE.
|
inlineprotected |
returns the selector which is internally used to mark elements.
Be sure to use it carefully!
References ug::HangingNodeRefinerBase< TSelector >::m_selMarkedElements.
|
virtual |
Reimplemented from ug::GridObserver.
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
virtual |
Marks a element for refinement.
Reimplemented from ug::IRefiner.
Reimplemented in ug::HangingNodeRefiner_Grid.
|
inline |
|
virtual |
Marks a element for refinement.
Reimplemented from ug::IRefiner.
Reimplemented in ug::HangingNodeRefiner_Grid.
References ug::RM_CLOSURE, ug::RM_DUMMY, ug::RM_LOCAL, and ug::RM_REFINE.
bool ug::IRefiner::mark |
|
inline |
Marks an element for refinement. Default implementation is empty.
|
virtual |
Marks a element for refinement.
Reimplemented from ug::IRefiner.
Reimplemented in ug::HangingNodeRefiner_Grid.
|
inline |
|
virtual |
Marks a element for refinement.
Reimplemented from ug::IRefiner.
Reimplemented in ug::HangingNodeRefiner_Grid.
References ug::RM_CLOSURE, ug::RM_DUMMY, ug::RM_LOCAL, and ug::RM_REFINE.
|
virtual |
Marks the neighborhood of the current selection.
Reimplemented from ug::IRefiner.
References ug::Grid::num_volumes(), and pcl::OneProcTrue().
|
inline |
References ug::HangingNodeRefinerBase< TSelector >::m_selMarkedElements, ug::RM_CLOSURE, and ug::RM_LOCAL.
Referenced by ug::HangingNodeRefinerBase< TSelector >::marked_regular().
|
inline |
|
inline |
References ug::HangingNodeRefinerBase< TSelector >::m_selMarkedElements, and ug::RM_REFINE.
Referenced by ug::HangingNodeRefinerBase< TSelector >::marked_regular().
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
enables or disables node-dependency-order-1.
If enabled, hanging nodes may only depend on non-hanging nodes. An edge containing a hanging node thus will not have a hanging-node as a corner vertex.
Enabled by default.
References ug::HangingNodeRefinerBase< TSelector >::m_nodeDependencyOrder1.
|
protectedvirtual |
performs refinement on the marked elements.
The grid's message hub is informed using a "GridAdaption" message, passing an instance of GridMessage_Adapation, with values GMAT_HNODE_REFINEMENT_BEGINS and GMAT_HNODE_REFINEMENT_ENDS. See lib_grid/lib_grid_messages.h for more details.
as defined in lib_grid/
automatically extends the refinement to avoid multiple hanging nodes on a single edge or face.
refine calls several virtual methods, which allow to influence the refinement process. Most notably the methods
are called in the given order. During element refinement further virtual methods are called, which perform the actual element refinement.
Implements ug::IRefiner.
References ug::Grid::enable_options(), ug::GMAT_HNODE_REFINEMENT_BEGINS, ug::GMAT_HNODE_REFINEMENT_ENDS, ug::GRIDOPT_AUTOGENERATE_SIDES, HNODE_PROFILE_BEGIN, HNODE_PROFILE_END, ug::LIB_GRID, LOG, ug::Grid::option_is_enabled(), ug::RM_REFINE, and UG_DLOG.
|
inlineprotectedvirtual |
called by refine after refinement is done.
Reimplemented in ug::HangingNodeRefiner_Grid, and ug::ParallelHangingNodeRefiner_MultiGrid.
|
inlineprotectedvirtual |
called by refine after collect_objects_for_refine and before actual refinement begins.
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::ParallelHangingNodeRefiner_MultiGrid.
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
References ug::ConstrainingEdge::clear_constrained_edges(), ug::ConstrainingFace::clear_constrained_edges(), ug::Grid::create_and_replace(), ug::EDGE, ug::FACE, ug::ConstrainedEdge::get_constraining_object(), ug::ConstrainedEdge::get_parent_base_object_id(), and UG_ASSERT.
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
References ug::ConstrainingFace::clear_constrained_faces(), ug::Grid::create_and_replace(), ug::FACE, ug::ConstrainedFace::get_constraining_object(), ug::ConstrainedFace::get_parent_base_object_id(), ug::FaceVertices::num_vertices(), and UG_ASSERT.
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
References ug::ConstrainingEdge::clear_constrained_vertices(), ug::ConstrainingFace::clear_constrained_vertices(), ug::Grid::create_and_replace(), ug::EDGE, ug::FACE, ug::ConstrainedVertex::get_constraining_object(), ug::ConstrainedVertex::get_parent_base_object_id(), and UG_ASSERT.
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
Reimplemented in ug::HangingNodeRefiner_Grid.
References ug::Grid::create_and_replace(), ug::FaceVertices::num_vertices(), and UG_ASSERT.
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
Reimplemented in ug::HangingNodeRefiner_MultiGrid.
References ug::ConstrainingEdge::add_constrained_object(), ug::Grid::create(), ug::Grid::create_and_replace(), ug::ConstrainedEdge::set_constraining_object(), ug::ConstrainingEdge::type_match(), UG_ASSERT, and ug::EdgeVertices::vertex().
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
References ug::Grid::create(), ug::Grid::create_by_cloning(), ug::Edge::refine(), ug::Grid::register_element(), and UG_ASSERT.
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
Reimplemented in ug::HangingNodeRefiner_MultiGrid.
References ug::ConstrainingFace::add_constrained_object(), ug::Grid::create(), ug::Grid::create_and_replace(), ug::Grid::get_edge(), ug::MAX_FACE_VERTICES, ug::Face::num_edges(), ug::FaceVertices::num_vertices(), ug::CustomQuadrilateral< ConcreteQuadrilateralType, BaseClass, RefTriType, RefQuadType >::refine(), ug::Grid::register_element(), ug::RM_REFINE, ug::ConstrainedVertex::set_constraining_object(), ug::ConstrainedEdge::set_constraining_object(), ug::ConstrainedFace::set_constraining_object(), ug::ConstrainedVertex::set_local_coordinates(), UG_ASSERT, UG_COND_THROW, and ug::FaceVertices::vertex().
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
References ug::Grid::create_by_cloning(), ug::ElementDebugInfo(), ug::Grid::get_edge(), ug::MAX_FACE_VERTICES, ug::Face::num_edges(), ug::FaceVertices::num_vertices(), ug::Face::refine(), ug::Grid::register_element(), ug::RM_REFINE, ug::FaceDescriptor::set_vertex(), and UG_ASSERT.
|
protectedvirtual |
called to refine the specified element.
Refines the element. Corner vertices of the newly created element can be specified through newCornerVrts. newCornerVrts = NULL (default) means, that the corner vertices of the original element shall be taken.
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
References ug::Grid::create_by_cloning(), ug::Grid::get_edge(), ug::Grid::get_face(), ug::GetGridObjectCenter(), ug::Volume::num_edges(), ug::Volume::num_faces(), ug::FaceVertices::num_vertices(), ug::VolumeVertices::num_vertices(), ug::Volume::refine(), ug::Grid::register_element(), ug::VolumeDescriptor::set_vertex(), UG_ASSERT, UG_COND_THROW, and ug::VolumeVertices::vertex().
|
inlineprotectedvirtual |
a callback that allows to deny refinement of special edges
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::ParallelHangingNodeRefiner_MultiGrid.
|
inlineprotectedvirtual |
a callback that allows to deny refinement of special faces
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::ParallelHangingNodeRefiner_MultiGrid.
|
inlineprotectedvirtual |
a callback that allows to deny refinement of special vertices
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::ParallelHangingNodeRefiner_MultiGrid.
|
inlineprotectedvirtual |
a callback that allows to deny refinement of special volumes
Reimplemented in ug::HangingNodeRefiner_MultiGrid, and ug::ParallelHangingNodeRefiner_MultiGrid.
|
protected |
removes coarsen marks from the selection
Note that derived classes are not informed about those deselections!
References ug::RM_COARSEN.
|
protected |
|
virtual |
Writes the associated grid and marks to a file. Pure virtual.
Elements should be assigned to subsets depending on their current refinement-mark.
Implements ug::IRefiner.
References ug::GridSubsetHandler::assign_subset(), ug::AssignGridToSubset(), ug::AssignSubsetColors(), ug::Grid::edges_begin(), ug::Grid::edges_end(), ug::EraseEmptySubsets(), ug::Grid::faces_begin(), ug::Grid::faces_end(), ug::LIB_GRID, ug::SubsetInfo::name, ug::RM_ANISOTROPIC, ug::RM_CLOSURE, ug::RM_COARSEN, ug::RM_COPY, ug::RM_DUMMY, ug::RM_FULL, ug::RM_LOCAL, ug::RM_NONE, ug::RM_REFINE, ug::SaveGridHierarchyTransformed(), ug::SaveGridToFile(), ug::ISubsetHandler::subset_info(), UG_DLOG, UG_THROW, ug::Grid::vertices_begin(), ug::Grid::vertices_end(), ug::Grid::volumes_begin(), and ug::Grid::volumes_end().
|
protectedpure virtual |
Associates a vertex with the edge (pure virtual).
Implemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
|
protectedpure virtual |
Associates a vertex with the face (pure virtual).
Implemented in ug::HangingNodeRefiner_MultiGrid, and ug::HangingNodeRefiner_Grid.
|
protected |
performs registration and deregistration at a grid.
Sets a grid and performs registration at the given grid. The associated selector is also initialised with the given grid. It is cruical to call this method or everything will fail.
call set_grid(NULL) to unregister the observer from a grid.
Please note that this method is not declared virtual, since it is called during construction and destruction.
References ug::OT_GRID_OBSERVER.
|
private |
true during collect_objects_for_refine
Referenced by ug::HangingNodeRefinerBase< TSelector >::adjusting_ref_marks().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
Referenced by ug::HangingNodeRefinerBase< TSelector >::get_refmark_selector(), ug::HangingNodeRefinerBase< TSelector >::is_marked(), ug::HangingNodeRefinerBase< TSelector >::marked_adaptive(), ug::HangingNodeRefinerBase< TSelector >::marked_coarsen(), ug::HangingNodeRefinerBase< TSelector >::marked_refine(), ug::HangingNodeRefinerBase< TSelector >::marked_to_constrained(), ug::HangingNodeRefinerBase< TSelector >::marked_to_constraining(), and ug::HangingNodeRefinerBase< TSelector >::marked_to_normal().