ug4
|
base-implementation of a selector More...
#include <selector_interface.h>
Public Types | |
enum | { DESELECTED = 0 , SELECTED = 1 } |
typedef byte | status_t |
Public Member Functions | |
bool | autoselection_enabled () |
virtual void | broadcast_selection_states (bool deselect=false, bool includeGhosts=false) |
broadcasts the current selection More... | |
virtual void | clear ()=0 |
virtual bool | contains_edges () const =0 |
returns true if the selector contains edges More... | |
virtual bool | contains_faces () const =0 |
returns true if the selector contains faces More... | |
virtual bool | contains_vertices () const =0 |
returns true if the selector contains vertices More... | |
virtual bool | contains_volumes () const =0 |
returns true if the selector contains volumes More... | |
void | deselect (GridObject *elem) |
template<class TElem > | |
void | deselect (TElem *elem) |
template<class TIterator > | |
void | deselect (TIterator iterBegin, TIterator iterEnd) |
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 | 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 | 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... | |
bool | elements_are_supported (uint shElements) const |
returns true if the given element-types are supported. More... | |
virtual void | elements_to_be_cleared (Grid *grid) |
void | enable_autoselection (bool bEnable) |
void | enable_selection_inheritance (bool bEnable) |
void | enable_strict_inheritance (bool bEnable) |
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 | 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 | 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 GridObjectCollection | get_grid_objects () const =0 |
returns a geometric object collection, containing all selected objects More... | |
template<class TElem > | |
byte | get_mark (TElem *elem) const |
returns the selection state of the specified elelent More... | |
Grid * | grid () const |
virtual void | grid_to_be_destroyed (Grid *grid) |
template<class TElem > | |
bool | is_selected (TElem *elem) const |
returns true if an element is selected More... | |
ISelector (Grid &grid, uint supportedElements=SE_ALL) | |
ISelector (uint supportedElements=SE_ALL) | |
bool | selection_inheritance_enabled () |
bool | strict_inheritance_enabled () |
template<class TElem > | |
void | unmark (TElem *elem) |
deselects an element More... | |
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 | 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 | 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 | 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 | 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 | 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... | |
virtual | ~ISelector () |
void | select (GridObject *elem, byte status) |
selects an element More... | |
void | select (GridObject *elem) |
selects an element More... | |
template<class TElem > | |
void | select (TElem *elem, byte status) |
selects an element More... | |
template<class TElem > | |
void | select (TElem *elem) |
selects an element More... | |
template<class TIterator > | |
void | select (TIterator iterBegin, TIterator iterEnd, byte status=1) |
selects an element More... | |
template<class TElem > | |
void | mark (TElem *elem) |
selects an element More... | |
template<class TElem > | |
void | mark (TElem *elem, byte status) |
selects an element More... | |
byte | get_selection_status (GridObject *elem) const |
returns the selection state of the specified elelent More... | |
byte | get_selection_status (Vertex *vrt) const |
returns the selection state of the specified elelent More... | |
byte | get_selection_status (Edge *edge) const |
returns the selection state of the specified elelent More... | |
byte | get_selection_status (Face *face) const |
returns the selection state of the specified elelent More... | |
byte | get_selection_status (Volume *vol) const |
returns the selection state of the specified elelent More... | |
Public Member Functions inherited from ug::GridObserver | |
virtual | ~GridObserver () |
Protected Types | |
typedef Grid::traits< Edge >::AttachedElementList | AttachedEdgeList |
typedef Grid::traits< Face >::AttachedElementList | AttachedFaceList |
typedef Grid::traits< Vertex >::AttachedElementList | AttachedVertexList |
typedef Grid::traits< Volume >::AttachedElementList | AttachedVolumeList |
typedef Attachment< unsigned char > | AUChar |
typedef Grid::traits< Edge >::SectionContainer | EdgeSectionContainer |
typedef Grid::traits< Face >::SectionContainer | FaceSectionContainer |
typedef Grid::traits< Vertex >::SectionContainer | VertexSectionContainer |
typedef Grid::traits< Volume >::SectionContainer | VolumeSectionContainer |
Protected Member Functions | |
virtual void | add_to_list (Edge *elem)=0 |
virtual void | add_to_list (Face *elem)=0 |
virtual void | add_to_list (Vertex *elem)=0 |
virtual void | add_to_list (Volume *elem)=0 |
void | disable_element_support (uint shElements) |
disable support for element-types. More... | |
template<class TElem > | |
void | elems_to_be_merged (Grid *grid, TElem *target, TElem *elem1, TElem *elem2) |
helper for GridObserver callbacks. More... | |
void | enable_element_support (uint shElements) |
enable support for element-types. Does not invalidate previous settings. More... | |
virtual void | erase_from_list (Edge *elem)=0 |
virtual void | erase_from_list (Face *elem)=0 |
virtual void | erase_from_list (Vertex *elem)=0 |
virtual void | erase_from_list (Volume *elem)=0 |
void | mark_deselected (Edge *elem) |
void | mark_deselected (Face *elem) |
void | mark_deselected (Vertex *elem) |
void | mark_deselected (Volume *elem) |
void | mark_selected (Edge *elem, byte status) |
void | mark_selected (Face *elem, byte status) |
void | mark_selected (Vertex *elem, byte status) |
void | mark_selected (Volume *elem, byte status) |
void | set_grid (Grid *grid) |
performs grid registration / deregistration and initialisation of the observer. More... | |
void | set_supported_elements (uint shElements) |
set the type of elements that shall be handled by the SubsetHandler. More... | |
Private Member Functions | |
template<class TIntfcCom > | |
void | broadcast_selection_states (bool deselect, bool includeGhosts, TIntfcCom &icom) |
Copy Constructor not yet implemented! More... | |
ISelector (const ISelector &sel) | |
base-implementation of a selector
A selector is a useful class, that allows the user to mark elements of a grid as selected or deselected. The selection status is maintained even if new elements are created or old ones deleted. Features like autoselection and selection_inheritance allow users to follow the creation and removal of elements in all kind of algorithms.
Derived classes like Selector and MGSelector or VertexSelector, EdgeSelector, FaceSelector and VolumeSelector keep selected elements in linked lists and allow the user to iterate over them. If a selected element is removed from the underlying grid, it is automatically removed from the element-lists of all associated selectors.
Please note that the selector has to be registered at a grid before it may be used. Derived classes may use the protected method set_grid to do so, or pass a grid directly to the constructor.
This is a base implementation that can not be instatiated. It features most cruical methods like is_selected, select, deselect etc.
autoselection and selection_inheritance can be enabled here. If autoselection is enabled, then all elements that are created while the selector is registered at a grid will automatically be selected.
If selection_inheritance is enabled, then all elements that are created while the selector is registered at a grid, and whose parents (from the same grid) are selected will be automatically selected, too. selection_inheritance is ignored if autoselection is enabled.
Support for different element-types can be enabled / disabled by derived classes using set_supported_elements, enable_element_support or disable_element_support.
Derived classes have to store the selected elements in linked lists of type ISelector::SectionContainer and should feature begin and end itertors to the sections of those lists.
ISelector communicates with derived classes via the methods add_to_list and erase_from_list.
Especially for the implementation of erase_from_list the protected member function get_iterator may be useful, which returns the iterator that is associated with the selected element.
If a derived class wants to change the selection-status of an element behind the scenes (avoids select, deselect), then it may use the protected methods mark_selected, mark_deselected.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
typedef byte ug::ISelector::status_t |
|
protected |
|
protected |
References enable_element_support(), grid(), m_bAutoselectionEnabled, m_bSelectionInheritanceEnabled, m_bStrictInheritanceEnabled, m_pGrid, m_supportedElements, ug::OT_EDGE_OBSERVER, ug::OT_FACE_OBSERVER, ug::OT_GRID_OBSERVER, ug::OT_VERTEX_OBSERVER, ug::OT_VOLUME_OBSERVER, ug::Grid::register_observer(), and ug::SE_NONE.
|
virtual |
References disable_element_support(), m_pGrid, m_supportedElements, and ug::Grid::unregister_observer().
|
inlineprivate |
|
protectedpure virtual |
Implemented in ug::MGSelector, and ug::Selector.
|
protectedpure virtual |
Implemented in ug::MGSelector, and ug::Selector.
|
protectedpure virtual |
Implemented in ug::MGSelector, and ug::Selector.
Referenced by select().
|
protectedpure virtual |
Implemented in ug::MGSelector, and ug::Selector.
|
inline |
Referenced by ug::Duplicate(), edge_created(), face_created(), ug::GenerateIcosphere(), vertex_created(), and volume_created().
|
private |
Copy Constructor not yet implemented!
References deselect(), ug::Grid::distributed_grid_manager(), ug::DistributedGridManager::grid_layout_map(), ug::INT_H_MASTER, ug::INT_H_SLAVE, ug::INT_V_MASTER, ug::INT_V_SLAVE, and m_pGrid.
|
virtual |
broadcasts the current selection
This method is only interesting for parallel algorithms. By setting 'deselect' to true, all copies of an element will be deselected if one or more copies already were deselected.
If 'deselect' is false (this is the default), the selection-states of all copies of an element will be united and applied to all copies of that element.
Set 'includeGhosts' to true, to also broadcast the selection-state to ghost-copies. Default is false.
References deselect(), m_icomEDGE, m_icomFACE, m_icomVOL, m_icomVRT, and m_pGrid.
|
pure virtual |
Implemented in ug::MGSelector, ug::MGSelector, ug::Selector, and ug::Selector.
Referenced by elements_to_be_cleared(), and set_grid().
|
pure virtual |
returns true if the selector contains edges
Implemented in ug::MGSelector, and ug::Selector.
Referenced by ug::GridWriterUGX::add_selector().
|
pure virtual |
returns true if the selector contains faces
Implemented in ug::MGSelector, and ug::Selector.
Referenced by ug::GridWriterUGX::add_selector().
|
pure virtual |
returns true if the selector contains vertices
Implemented in ug::MGSelector, and ug::Selector.
Referenced by ug::GridWriterUGX::add_selector().
|
pure virtual |
returns true if the selector contains volumes
Implemented in ug::MGSelector, and ug::Selector.
Referenced by ug::GridWriterUGX::add_selector().
|
inline |
References ug::GridObject::base_object_id(), ug::EDGE, ug::FACE, ug::VERTEX, and ug::VOLUME.
Referenced by ug::AssignVerticalMasterAndSlaveStates(), broadcast_selection_states(), ug::HangingNodeRefiner_MultiGrid::collect_objects_for_coarsen(), ug::CollectInnerVertices(), ug::CutEdgesWithPlane(), deselect(), ug::DeselectFamily(), edge_to_be_erased(), ug::ComPol_BroadcastCoarsenMarks< TLayout >::extract(), ug::ComPol_Selection< TLayout >::extract(), face_to_be_erased(), ug::HangingNodeRefiner_MultiGrid::perform_coarsening(), ug::PerformCollapses(), ug::PerformSplits(), ug::PerformSwaps(), ug::HangingNodeRefiner_MultiGrid::restrict_selection_to_coarsen_families(), ug::HangingNodeRefiner_MultiGrid::restrict_selection_to_surface_coarsen_elements(), select(), ug::SelectAreaBoundary(), ug::SeparateSubsetsByLowerDimSeparators(), vertex_to_be_erased(), and volume_to_be_erased().
|
inline |
References erase_from_list(), is_selected(), and mark_deselected().
|
inline |
References deselect().
|
protected |
disable support for element-types.
pass an or-combination of constants enumerated in SubsetHandlerElements.
References ug::Grid::detach_from_edges(), ug::Grid::detach_from_faces(), ug::Grid::detach_from_vertices(), ug::Grid::detach_from_volumes(), elements_are_supported(), m_aSelected, m_pGrid, m_supportedElements, ug::SE_EDGE, ug::SE_FACE, ug::SE_VERTEX, and ug::SE_VOLUME.
Referenced by ug::Selector::disable_element_support(), ug::MGSelector::disable_element_support(), set_grid(), set_supported_elements(), and ~ISelector().
|
virtual |
Notified whenever a new element of the given type is created in the given grid.
Creation callbacks are called in the order in which the GridObservers were registered at the given grid.
If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.
Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).
Reimplemented from ug::GridObserver.
References autoselection_enabled(), ug::GridObject::base_object_id(), ug::EDGE, elements_are_supported(), get_selection_status(), grid(), m_bStrictInheritanceEnabled, m_pGrid, mark_deselected(), ug::SE_EDGE, select(), selection_inheritance_enabled(), and UG_ASSERT.
Notified whenever an element of the given type is erased from the given grid.
Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.
if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).
Reimplemented from ug::GridObserver.
References deselect(), elements_are_supported(), grid(), m_pGrid, and ug::SE_EDGE.
|
virtual |
Notified when two elements of the same type are going to be merged.
Note that this method is invoked by Grid::objects_will_be_merged, which is called from outside the grid class. Implementors of algorithms in which objects are merged are thus responsible to call Grid::objects_will_be_merged.
This callback is called in addition to ..._created and ..._to_be_erased callbacks and should thus only be used if small adjustments have to be made during a merge.
Note that target may be identical to elem1 or elem2.
Reimplemented from ug::GridObserver.
References elems_to_be_merged(), grid(), and boost::target().
|
inline |
returns true if the given element-types are supported.
pass an or-combination of constants enumerated in SubsetHandlerElements.
References m_supportedElements.
Referenced by ug::MGSelector::add_level(), ug::Selector::disable_element_support(), disable_element_support(), ug::MGSelector::disable_element_support(), edge_created(), edge_to_be_erased(), ug::Selector::enable_element_support(), enable_element_support(), ug::MGSelector::enable_element_support(), face_created(), face_to_be_erased(), ug::GridReaderUGX::selector(), vertex_created(), vertex_to_be_erased(), volume_created(), volume_to_be_erased(), and ug::Selector::~Selector().
|
virtual |
Reimplemented from ug::GridObserver.
References clear().
|
protected |
helper for GridObserver callbacks.
References is_selected(), select(), and boost::target().
Referenced by edges_to_be_merged(), faces_to_be_merged(), vertices_to_be_merged(), and volumes_to_be_merged().
void ug::ISelector::enable_autoselection | ( | bool | bEnable | ) |
References m_bAutoselectionEnabled.
Referenced by ug::AllGatherGrid(), ug::AdaptiveRegularRefiner_MultiGrid::create_closure_elements_2d(), ug::AdaptiveRegularRefiner_MultiGrid::create_closure_elements_3d(), ug::Duplicate(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExpandFractures3d(), ug::GatherGrid(), ug::GenerateIcosphere(), ug::ResolveTriangleIntersections(), ug::AdaptiveRegularRefiner_MultiGrid::set_grid(), and ug::ArteExpandFracs3D::setSelector().
|
protected |
enable support for element-types. Does not invalidate previous settings.
pass an or-combination of constants enumerated in SubsetHandlerElements.
References ug::Grid::attach_to_edges(), ug::Grid::attach_to_faces(), ug::Grid::attach_to_vertices(), ug::Grid::attach_to_volumes(), ug::Grid::begin(), elements_are_supported(), ug::Grid::end(), m_aaSelEDGE, m_aaSelFACE, m_aaSelVOL, m_aaSelVRT, m_aSelected, m_pGrid, m_supportedElements, ug::SE_EDGE, ug::SE_FACE, ug::SE_VERTEX, ug::SE_VOLUME, and ug::SetAttachmentValues().
Referenced by ug::Selector::enable_element_support(), ug::MGSelector::enable_element_support(), ISelector(), set_grid(), and set_supported_elements().
void ug::ISelector::enable_selection_inheritance | ( | bool | bEnable | ) |
References m_bSelectionInheritanceEnabled.
Referenced by ug::AdjustEdgeLength(), ug::ArteExpandFracs3D::assignOrigFracInfos(), ug::Duplicate(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExpandFractures3d(), ug::ResolveTriangleIntersections(), ug::AdaptiveRegularRefiner_MultiGrid::set_grid(), and ug::ArteExpandFracs3D::setSelector().
void ug::ISelector::enable_strict_inheritance | ( | bool | bEnable | ) |
restricts subset inheritance so that new elements derive their selection status only from parents with the same base-type. Disabled by default. NOTE: strict inheritance only has an effect if selection inheritance is enabled.
References m_bStrictInheritanceEnabled.
Referenced by ug::ExpandFractures3d(), ug::AdaptiveRegularRefiner_MultiGrid::set_grid(), and ug::ArteExpandFracs3D::setSelector().
|
protectedpure virtual |
Implemented in ug::MGSelector, and ug::Selector.
|
protectedpure virtual |
Implemented in ug::MGSelector, and ug::Selector.
|
protectedpure virtual |
Implemented in ug::MGSelector, and ug::Selector.
Referenced by deselect().
|
protectedpure virtual |
Implemented in ug::MGSelector, and ug::Selector.
|
virtual |
Notified whenever a new element of the given type is created in the given grid.
Creation callbacks are called in the order in which the GridObservers were registered at the given grid.
If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.
Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).
Reimplemented from ug::GridObserver.
References autoselection_enabled(), ug::GridObject::base_object_id(), elements_are_supported(), ug::FACE, get_selection_status(), grid(), m_bStrictInheritanceEnabled, m_pGrid, mark_deselected(), ug::SE_FACE, select(), selection_inheritance_enabled(), and UG_ASSERT.
Notified whenever an element of the given type is erased from the given grid.
Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.
if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).
Reimplemented from ug::GridObserver.
References deselect(), elements_are_supported(), grid(), m_pGrid, and ug::SE_FACE.
|
virtual |
Notified when two elements of the same type are going to be merged.
Note that this method is invoked by Grid::objects_will_be_merged, which is called from outside the grid class. Implementors of algorithms in which objects are merged are thus responsible to call Grid::objects_will_be_merged.
This callback is called in addition to ..._created and ..._to_be_erased callbacks and should thus only be used if small adjustments have to be made during a merge.
Note that target may be identical to elem1 or elem2.
Reimplemented from ug::GridObserver.
References elems_to_be_merged(), grid(), and boost::target().
|
pure virtual |
returns a geometric object collection, containing all selected objects
Implemented in ug::MGSelector, and ug::Selector.
Referenced by ug::AssignSelectionToSubset(), ug::CollectVerticesTouchingSelection(), ug::CopySubsetIndicesToSides(), ug::GridWriterUGX::create_selector_element_node(), ug::FaceArea(), ug::GetSelectedElementIndices(), ug::SelectAssociatedElements(), and ug::SelectLinkedElements().
|
inline |
returns the selection state of the specified elelent
In this context, 'get_mark' is simply a synonym for 'get_selection_status' and simply forwards to the corresponding method.
returns the selection state of the specified elelent
References ug::SE_EDGE.
returns the selection state of the specified elelent
References ug::SE_FACE.
|
inline |
returns the selection state of the specified elelent
References ug::GridObject::base_object_id(), ug::EDGE, ug::FACE, ug::VERTEX, and ug::VOLUME.
Referenced by ug::AddTargetProcToDistInfos(), ug::AssignVerticalMasterAndSlaveStates(), ug::ComPol_AdjustType< TLayout >::collect(), ug::ComPol_BroadcastCoarsenMarks< TLayout >::collect(), ug::ComPol_Selection< TLayout >::collect(), ug::ComPol_EnableSelectionStateBits< TLayout >::collect(), ug::HangingNodeRefiner_MultiGrid::collect_objects_for_coarsen(), ug::GridWriterUGX::create_selector_element_node(), edge_created(), ug::ComPol_BroadcastCoarsenMarks< TLayout >::extract(), ug::ComPol_EnableSelectionStateBits< TLayout >::extract(), face_created(), ug::HangingNodeRefiner_MultiGrid::perform_coarsening(), ug::Refine(), ug::SaveCoarsenMarksToFile(), ug::SelectAssociatedConstrainedElements(), ug::SelectAssociatedSides(), ug::SelectChildrenOfSelectedShadowRimEdges(), ug::SelectChildrenOfSelectedShadowRimFaces(), ug::SelectChildrenOfSelectedShadowVertices(), vertex_created(), volume_created(), and ug::WriteSelectionStatesToStream().
returns the selection state of the specified elelent
References ug::SE_VERTEX.
returns the selection state of the specified elelent
References ug::SE_VOLUME.
|
inline |
Referenced by ug::AllGatherGrid(), ug::Selector::assign_grid(), ug::MGSelector::assign_grid(), ug::AssignSelectionToSubset(), ug::BroadcastGrid(), ug::CalculateCenter(), ug::CollectVerticesTouchingSelection(), ug::CopySelectedElements(), ug::CopySelection(), ug::GridWriterUGX::create_selector_element_node(), ug::CutEdgesWithPlane(), edge_created(), edge_to_be_erased(), edges_to_be_merged(), face_created(), face_to_be_erased(), ug::FaceArea(), faces_to_be_merged(), ug::GatherGrid(), ug::GetSelectedElementIndices(), ug::Selector::grid_to_be_destroyed(), grid_to_be_destroyed(), ug::MGSelector::grid_to_be_destroyed(), ISelector(), ug::MGSelector::MGSelector(), ug::ProjectionHandler::refinement_begins(), ug::SaveCoarsenMarksToFile(), ug::SelectAreaBoundary(), ug::SelectAssociated(), ug::SelectBoundaryElements(), ug::SelectCreaseEdges(), ug::SelectDomainElements(), ug::SelectEdgesByDirection(), ug::SelectElementsByIndex(), ug::SelectInnerElements(), ug::SelectInterfaceElements(), ug::SelectionFill(), ug::SelectKinkVertices(), ug::SelectLinkedElements(), ug::SelectLinkedFlatAndDegeneratedFaces(), ug::SelectLinkedFlatFaces(), ug::Selector::Selector(), ug::SelectRegion(), ug::SelectShortPolychains(), ug::SelectSmoothEdgePath(), ug::SelectSubsetEdgesByDirection(), set_grid(), ug::TranslateSelection(), vertex_created(), vertex_to_be_erased(), vertices_to_be_merged(), volume_created(), volume_to_be_erased(), and volumes_to_be_merged().
|
virtual |
Reimplemented from ug::GridObserver.
Reimplemented in ug::MGSelector, and ug::Selector.
References grid(), m_pGrid, and set_grid().
Referenced by ug::Selector::grid_to_be_destroyed(), and ug::MGSelector::grid_to_be_destroyed().
|
inline |
returns true if an element is selected
Referenced by ug::AdaptSurfaceGridToCylinder(), ug::AssignSidesToSubsets(), ug::AssignVerticalMasterAndSlaveStates(), ug::IsSelected::callback(), ug::IsNotSelected::callback(), ug::ComPol_AdjustType< TLayout >::collect(), ug::HangingNodeRefiner_MultiGrid::collect_objects_for_coarsen(), ug::CopySelectionStatus(), ug::ArteExpandFracs3D::createNewElements(), ug::CutEdgesWithPlane(), deselect(), ug::DistributeExpansionMarks3D(), elems_to_be_merged(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExpandFractures3d(), ug::AdaptiveRegularRefiner_MultiGrid::get_parents_of_marked_closure_elements(), ug::Refine(), select(), ug::SelectAreaBoundary(), ug::SelectAssociatedConstrainedElements(), ug::SelectInterfaceElements(), ug::SelectionFill(), ug::SelectLinkedElements(), ug::SelectLinkedFlatAndDegeneratedFaces(), ug::SelectLinkedFlatFaces(), ug::SelectSmoothEdgePath(), ug::SelectUnselectedRootElementsAsVMasters(), ug::SeparateSubsetsByLowerDimSeparators(), and ug::WriteLGM().
|
inline |
selects an element
In this context 'mark' is simply a synonym for 'select' and simply forwards to the corresponding 'select' method.
|
inline |
selects an element
In this context 'mark' is simply a synonym for 'select' and simply forwards to the corresponding 'select' method.
|
inlineprotected |
References ug::SE_EDGE.
|
inlineprotected |
References ug::SE_FACE.
|
inlineprotected |
References ug::SE_VERTEX.
Referenced by ug::Selector::clear(), ug::MGSelector::clear(), deselect(), edge_created(), face_created(), vertex_created(), and volume_created().
|
inlineprotected |
References ug::SE_VOLUME.
References ug::SE_EDGE.
References ug::SE_FACE.
References ug::SE_VERTEX.
Referenced by select().
References ug::SE_VOLUME.
|
inline |
selects an element
You may optionally pass a status-flag. Note that 0 is reserved for non-selected elements. status thus has to be bigger then 0.
If the element is already selected, then select only alters the status- flag of the element. It however does not change the elements position in the list of selected elements.
|
inline |
selects an element
You may optionally pass a status-flag. Note that 0 is reserved for non-selected elements. status thus has to be bigger then 0.
If the element is already selected, then select only alters the status- flag of the element. It however does not change the elements position in the list of selected elements.
References ug::GridObject::base_object_id(), ug::EDGE, ug::FACE, LOG, ug::VERTEX, and ug::VOLUME.
Referenced by ug::AdaptSurfaceGridToCylinder(), ug::AdjustEdgeLength(), ug::AdjustSelection(), ug::AssignVerticalMasterAndSlaveStates(), ug::HangingNodeRefiner_MultiGrid::collect_objects_for_coarsen(), ug::CollectAllVerticesForNG(), ug::CollectInnerVertices(), ug::CollectLines(), ug::CollectSurfaceVertices(), ug::CopySelectionStatus(), ug::ArteExpandFracs3D::countAndSelectFracBaseNums(), ug::DistributeExpansionMarks3D(), edge_created(), elems_to_be_merged(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ComPol_BroadcastCoarsenMarks< TLayout >::extract(), ug::ComPol_Selection< TLayout >::extract(), ug::ComPol_EnableSelectionStateBits< TLayout >::extract(), face_created(), ug::OverlyingSubsetFinder< TDomain >::OverlyingSubsetFinder(), ug::GridReaderUGX::read_selector_elements(), ug::ReadSelectionStatesFromStream(), ug::Refine(), ug::ProjectionHandler::refinement_begins(), ug::ResolveTriangleIntersections(), select(), ug::AdaptionSurfaceGridFunction< TDomain >::select_parents(), ug::SelectAreaBoundary(), ug::SelectAssociated(), ug::SelectAssociatedConstrainedElements(), ug::SelectAssociatedSides(), ug::SelectBoundaryElements(), ug::SelectChildrenOfSelectedShadowRimEdges(), ug::SelectChildrenOfSelectedShadowRimFaces(), ug::SelectChildrenOfSelectedShadowVertices(), ug::SelectCreaseEdges(), ug::SelectDomainElements(), ug::SelectEdgesByDirection(), ug::SelectElementsByIndex(), ug::SelectInnerElements(), ug::SelectInterfaceElements(), ug::SelectionFill(), ug::SelectKinkVertices(), ug::SelectLinkedElements(), ug::SelectLinkedFlatAndDegeneratedFaces(), ug::SelectLinkedFlatFaces(), ug::SelectParents(), ug::SelectRegion(), ug::SelectSelectedRootElementsAsVSlaves(), ug::SelectShortPolychains(), ug::SelectSmoothEdgePath(), ug::SelectSubset(), ug::SelectSubsetEdgesByDirection(), ug::SelectSubsetElements(), ug::SelectUnselectedRootElementsAsVMasters(), ug::SeparateSubsetsByLowerDimSeparators(), vertex_created(), volume_created(), ug::vtk_export_ho(), ug::WriteLGM(), and ug::ZRayTracer< TDomain >::ZRayTracer().
|
inline |
selects an element
You may optionally pass a status-flag. Note that 0 is reserved for non-selected elements. status thus has to be bigger then 0.
If the element is already selected, then select only alters the status- flag of the element. It however does not change the elements position in the list of selected elements.
|
inline |
selects an element
You may optionally pass a status-flag. Note that 0 is reserved for non-selected elements. status thus has to be bigger then 0.
If the element is already selected, then select only alters the status- flag of the element. It however does not change the elements position in the list of selected elements.
References add_to_list(), deselect(), is_selected(), and mark_selected().
|
inline |
selects an element
You may optionally pass a status-flag. Note that 0 is reserved for non-selected elements. status thus has to be bigger then 0.
If the element is already selected, then select only alters the status- flag of the element. It however does not change the elements position in the list of selected elements.
References select().
|
inline |
Referenced by ug::Duplicate(), edge_created(), face_created(), vertex_created(), and volume_created().
|
protected |
performs grid registration / deregistration and initialisation of the observer.
If you call this method with NULL, deregistration and cleanup is performed.
Please note: sine set_grid calls virtual methods it shouldn't be invoked from any constructors / destructors.
References clear(), disable_element_support(), enable_element_support(), grid(), m_pGrid, m_supportedElements, ug::OT_EDGE_OBSERVER, ug::OT_FACE_OBSERVER, ug::OT_GRID_OBSERVER, ug::OT_VERTEX_OBSERVER, ug::OT_VOLUME_OBSERVER, ug::Grid::register_observer(), ug::SE_NONE, and ug::Grid::unregister_observer().
Referenced by ug::Selector::assign_grid(), ug::MGSelector::assign_grid(), ug::MGSelector::cleanup(), and grid_to_be_destroyed().
|
protected |
set the type of elements that shall be handled by the SubsetHandler.
Pass an or-combination of constants enumerated in SubsetHandlerElements.
References disable_element_support(), enable_element_support(), and m_supportedElements.
|
inline |
|
inline |
deselects an element
In this context 'unmark' is simply a synonym for 'deselect'.
|
virtual |
Notified whenever a new element of the given type is created in the given grid.
Creation callbacks are called in the order in which the GridObservers were registered at the given grid.
If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.
Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).
Reimplemented from ug::GridObserver.
References autoselection_enabled(), ug::GridObject::base_object_id(), elements_are_supported(), get_selection_status(), grid(), m_bStrictInheritanceEnabled, m_pGrid, mark_deselected(), ug::SE_VERTEX, select(), selection_inheritance_enabled(), UG_ASSERT, and ug::VERTEX.
|
virtual |
Notified whenever an element of the given type is erased from the given grid.
Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.
if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).
Reimplemented from ug::GridObserver.
References deselect(), elements_are_supported(), grid(), m_pGrid, and ug::SE_VERTEX.
|
virtual |
Notified when two elements of the same type are going to be merged.
Note that this method is invoked by Grid::objects_will_be_merged, which is called from outside the grid class. Implementors of algorithms in which objects are merged are thus responsible to call Grid::objects_will_be_merged.
This callback is called in addition to ..._created and ..._to_be_erased callbacks and should thus only be used if small adjustments have to be made during a merge.
Note that target may be identical to elem1 or elem2.
Reimplemented from ug::GridObserver.
References elems_to_be_merged(), grid(), and boost::target().
|
virtual |
Notified whenever a new element of the given type is created in the given grid.
Creation callbacks are called in the order in which the GridObservers were registered at the given grid.
If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.
Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).
Reimplemented from ug::GridObserver.
References autoselection_enabled(), ug::GridObject::base_object_id(), elements_are_supported(), get_selection_status(), grid(), m_bStrictInheritanceEnabled, m_pGrid, mark_deselected(), ug::SE_VOLUME, select(), selection_inheritance_enabled(), UG_ASSERT, and ug::VOLUME.
|
virtual |
Notified whenever an element of the given type is erased from the given grid.
Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.
if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).
Reimplemented from ug::GridObserver.
References deselect(), elements_are_supported(), grid(), m_pGrid, and ug::SE_VOLUME.
|
virtual |
Notified when two elements of the same type are going to be merged.
Note that this method is invoked by Grid::objects_will_be_merged, which is called from outside the grid class. Implementors of algorithms in which objects are merged are thus responsible to call Grid::objects_will_be_merged.
This callback is called in addition to ..._created and ..._to_be_erased callbacks and should thus only be used if small adjustments have to be made during a merge.
Note that target may be identical to elem1 or elem2.
Reimplemented from ug::GridObserver.
References elems_to_be_merged(), grid(), and boost::target().
|
protected |
Referenced by enable_element_support().
|
protected |
Referenced by enable_element_support().
|
protected |
Referenced by enable_element_support().
|
protected |
Referenced by enable_element_support().
|
protected |
Referenced by disable_element_support(), and enable_element_support().
|
protected |
Referenced by enable_autoselection(), and ISelector().
|
protected |
Referenced by enable_selection_inheritance(), and ISelector().
|
protected |
Referenced by edge_created(), enable_strict_inheritance(), face_created(), ISelector(), vertex_created(), and volume_created().
|
protected |
Referenced by broadcast_selection_states().
|
protected |
Referenced by broadcast_selection_states().
|
protected |
Referenced by broadcast_selection_states().
|
protected |
Referenced by broadcast_selection_states().
|
protected |
Referenced by ug::MGSelector::add_level(), ug::Selector::assign_grid(), broadcast_selection_states(), ug::Selector::clear(), ug::MGSelector::clear(), disable_element_support(), edge_created(), edge_to_be_erased(), ug::Selector::enable_element_support(), enable_element_support(), ug::MGSelector::enable_element_support(), face_created(), face_to_be_erased(), grid_to_be_destroyed(), ISelector(), set_grid(), vertex_created(), vertex_to_be_erased(), volume_created(), volume_to_be_erased(), ~ISelector(), and ug::Selector::~Selector().
|
protected |
Referenced by ug::Selector::assign_grid(), ug::MGSelector::assign_grid(), ug::MGSelector::cleanup(), disable_element_support(), elements_are_supported(), enable_element_support(), ISelector(), set_grid(), ug::Selector::set_supported_elements(), set_supported_elements(), ug::MGSelector::set_supported_elements(), and ~ISelector().