ug4
|
#include <subset_handler_interface.h>
Classes | |
struct | traits |
The traits class holds some important types for each element-type. More... | |
Public Member Functions | |
virtual void | assign_subset (Edge *elem, int subsetIndex)=0 |
virtual void | assign_subset (Face *elem, int subsetIndex)=0 |
virtual void | assign_subset (GridObject *elem, int subsetIndex) |
template<class TIterator > | |
void | assign_subset (TIterator iterBegin, TIterator iterEnd, int subsetIndex) |
virtual void | assign_subset (Vertex *elem, int subsetIndex)=0 |
virtual void | assign_subset (Volume *elem, int subsetIndex)=0 |
void | clear () |
void | clear_subset (int subsetIndex) |
void | clear_subsets () |
virtual bool | contains_edges (int subsetIndex) const =0 |
returns true if the subset contains edges More... | |
virtual bool | contains_faces (int subsetIndex) const =0 |
returns true if the subset contains faces More... | |
virtual bool | contains_vertices (int subsetIndex) const =0 |
collects all vertices that are in the given subset. More... | |
virtual bool | contains_volumes (int subsetIndex) const =0 |
returns true if the subset contains volumes More... | |
void | disable_element_support (uint shElements) |
disable support for element-types. 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 | 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_element_support (uint shElements) |
enable support for element-types. Does not invalidate previous settings. More... | |
void | enable_strict_inheritance (bool bEnable) |
void | enable_subset_inheritance (bool bEnable) |
void | erase_subset (int subsetIndex) |
erases the subset at the given index. Assigns -1 to all entries. Moves all other subsets 1 index up. 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 | 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... | |
int | get_default_subset_index () |
virtual GridObjectCollection | get_grid_objects_in_subset (int subsetInd) const =0 |
Returns the geometric object collection for the given subset. More... | |
int | get_subset_index (const char *name) const |
returns the index of the first subset with the given name. More... | |
int | get_subset_index (Edge *elem) const |
int | get_subset_index (Face *elem) const |
int | get_subset_index (GridObject *elem) const |
int | get_subset_index (Vertex *elem) const |
int | get_subset_index (Volume *elem) const |
const char * | get_subset_name (int subsetIndex) const |
returns the name of a subset More... | |
Grid * | grid () const |
returns a pointer to the grid on which the subset-handler works. More... | |
virtual void | grid_to_be_destroyed (Grid *grid) |
void | insert_subset (int subsetIndex) |
inserts a subset at the given index. Moves all other subsets 1 index higher. More... | |
ISubsetHandler (Grid &grid, uint supportedElements=SHE_ALL) | |
pass a grid and an or-combination of SubsetHandlerElements to supportedElements. More... | |
ISubsetHandler (uint supportedElements=SHE_ALL) | |
pass an or-combination of SubsetHandlerElements to supportedElements. More... | |
void | join_subsets (int targetSub, int sub1, int sub2, bool eraseUnusedSubs) |
Joins two subsets into a new one. Optionally erases the old subsets, if they are no longer used. More... | |
void | move_subset (int indexFrom, int indexTo) |
Moves the subset from index From to index To. Moves all subsets between indexFrom+1 and indexTo in the opposite direction. More... | |
int | num_subsets () const |
returns the number of subset-infos (return value is int, since SubsetIndices are of type int) More... | |
ISubsetHandler & | operator= (const ISubsetHandler &sh) |
assigns subsets based on the subsets in the given subset-handler More... | |
void | set_default_subset_index (int subsetIndex) |
void | set_default_subset_info (const SubsetInfo &defSI) |
sets the default subset-info. Used when initializing new subset-infos. More... | |
void | set_subset_info (int subsetIndex, const SubsetInfo &subsetInfo) |
void | set_subset_name (const char *name, int subsetIndex) |
sets the name of a subset More... | |
void | set_supported_elements (uint shElements) |
set the type of elements that shall be handled by the SubsetHandler. More... | |
bool | strict_inheritance_enabled () |
SubsetInfo & | subset_info (int subsetIndex) |
const SubsetInfo & | subset_info (int subsetIndex) const |
bool | subset_inheritance_enabled () |
void | subset_required (int index) |
if the subset with the given index does not yet exist, it will be created. More... | |
void | subset_required (int index) const |
throws an error if the given index is equal or higher than num_subsets. More... | |
void | swap_subsets (int subsetIndex1, int subsetIndex2) |
Swaps the given subsets,. 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 | ~ISubsetHandler () |
Public Member Functions inherited from ug::GridObserver | |
virtual | ~GridObserver () |
Protected Types | |
typedef AInt | ASubsetIndex |
typedef Grid::traits< Edge >::AttachedElementList | AttachedEdgeList |
typedef Grid::traits< Face >::AttachedElementList | AttachedFaceList |
typedef Grid::traits< Vertex >::AttachedElementList | AttachedVertexList |
enable subset-attachment support More... | |
typedef Grid::traits< Volume >::AttachedElementList | AttachedVolumeList |
typedef Grid::traits< Edge >::SectionContainer | EdgeSectionContainer |
typedef Grid::traits< Face >::SectionContainer | FaceSectionContainer |
typedef std::vector< SubsetInfo > | SubsetInfoVec |
typedef Grid::traits< Vertex >::SectionContainer | VertexSectionContainer |
typedef Grid::traits< Volume >::SectionContainer | VolumeSectionContainer |
Protected Member Functions | |
virtual void | add_required_subset_lists (int maxIndex)=0 |
add a subset if required - so that the subset with maxIndex exists. More... | |
void | alter_subset_index (Edge *e, int subsetIndex) |
void | alter_subset_index (Face *f, int subsetIndex) |
void | alter_subset_index (Vertex *v, int subsetIndex) |
void | alter_subset_index (Volume *v, int subsetIndex) |
void | assign_subset_handler (const ISubsetHandler &sh) |
selects elements based on the selection in the srcHandler More... | |
virtual void | change_subset_indices (int indOld, int indNew)=0 |
virtual void | clear_subset_lists (int index)=0 |
void | create_required_subsets (int index) |
creates all required infos (and pipes) up to the given index. More... | |
template<class TElem > | |
void | elems_to_be_merged (Grid *grid, TElem *target, TElem *elem1, TElem *elem2) |
helper for GridObserver callbacks. More... | |
virtual void | erase_subset_lists ()=0 |
virtual void | erase_subset_lists (int index)=0 |
erase the subset-lists but do not touch the subset-indices. More... | |
virtual void | join_subset_lists (int target, int src1, int src2)=0 |
join the subset-lists but do not touch the subset-indices. More... | |
virtual void | move_subset_lists (int indexFrom, int indexTo)=0 |
move the subset-lists but do not touch the subset-indices. More... | |
void | reset_subset_indices (uint shElements=SHE_ALL) |
sets the subset-indices of all elements of m_pGrid to -1. More... | |
void | set_grid (Grid *grid) |
set the grid on which the subset-handler shall work. More... | |
void | subset_assigned (Edge *e, int subsetIndex) |
void | subset_assigned (Face *f, int subsetIndex) |
void | subset_assigned (Vertex *v, int subsetIndex) |
void | subset_assigned (Volume *v, int subsetIndex) |
virtual void | swap_subset_lists (int ind1, int ind2)=0 |
swap the subset-lists but do not touch the subset-indices. More... | |
Private Member Functions | |
ISubsetHandler (const ISubsetHandler &sh) | |
this method is called by ISubsetHandler when attachment_support has been enabled. More... | |
A derived class has to implement the following public methods: virtual void assign_subset(Vertex* elem, int subsetIndex) virtual void assign_subset(Edge* elem, int subsetIndex) virtual void assign_subset(Face* elem, int subsetIndex) virtual void assign_subset(Volume* elem, int subsetIndex)
In those methods Derived classes have to store the objects that are selected for a subset in a ISubsetHandler::SectionContainer. Note that multiple SectionContainers per subset may be used.
A SubsetHandler also supports subset-attachments. That means that you can attach data to the elements of a subset. Use attach_to_vertices, attach_to_edges, ... to attach data to the elements of the subset. use ISubsetHandler::VertexAttachmentAccessor, ... to access the attached data. Please note that you may only use a subset-attachment-accessor with elements that are contained in the subset for which the accessor has been created.
Subset-attachments currently do not support pass-on behaviours.
|
protected |
|
protected |
|
protected |
|
protected |
enable subset-attachment support
if subset-attachments are enabled you may attach data to the elements of a subset. This is useful if you want to store different data in the elements of different subsets. returns true if subset-attachments are enabled. attach with unspecified default value. Pass either Vertex, Edge, Face or Volume as TGeomObjClass. attach with specified default value Pass either Vertex, Edge, Face or Volume as TGeomObjClass. Pass either Vertex, Edge, Face or Volume as TGeomObjClass. returns the attachment data container for elements of type TGeomObj for the given subset. Use the data-container with care! You should never clear or resize it.
Valid types for TGeomObj are Vertex, Edge, Face and Volume. call it like this (let sh be an instance of ISubsetHandler): sh.get_attachment_data_container<Vertex>(aSomeAttachment, someSubsetIndex);
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
pass an or-combination of SubsetHandlerElements to supportedElements.
supportedElements define the elements on which the SubsetHandler works. Default is SHE_ALL (all element-types).
References ug::SubsetInfo::color, m_bStrictInheritanceEnabled, m_bSubsetInheritanceEnabled, m_defaultSubsetIndex, m_defaultSubsetInfo, m_pGrid, m_supportedElements, ug::SubsetInfo::materialIndex, ug::SubsetInfo::name, ug::SS_NONE, and ug::SubsetInfo::subsetState.
pass a grid and an or-combination of SubsetHandlerElements to supportedElements.
supportedElements define the elements on which the SubsetHandler works. Default is SHE_ALL (all element-types).
References ug::SubsetInfo::color, enable_element_support(), grid(), m_bStrictInheritanceEnabled, m_bSubsetInheritanceEnabled, m_defaultSubsetIndex, m_defaultSubsetInfo, m_pGrid, m_supportedElements, ug::SubsetInfo::materialIndex, ug::SubsetInfo::name, 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::SHE_NONE, ug::SS_NONE, and ug::SubsetInfo::subsetState.
|
virtual |
The destructor automatically unregisters the subset-handler from the grid. on deregistration erase_subset_lists of the derived class will be called.
References disable_element_support(), m_pGrid, m_subsetInfos, m_supportedElements, and ug::Grid::unregister_observer().
|
inlineprivate |
this method is called by ISubsetHandler when attachment_support has been enabled.
derived classes have to implement this method. during this method they have to call register_at_pipe for all elements that are contained in one of the subsets. WARNING: This method is crucial for the attachment system. You should never call it yourself. this method should be called during
|
protectedpure virtual |
add a subset if required - so that the subset with maxIndex exists.
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by create_required_subsets().
|
inlineprotected |
alters the subset index only. Suited as a helper for methods like change_subset_indices or reset_subset_indices. WARNING: This method only alters the index but does not actually move the element to another subset. Use assign_subset instead for this task.
|
inlineprotected |
alters the subset index only. Suited as a helper for methods like change_subset_indices or reset_subset_indices. WARNING: This method only alters the index but does not actually move the element to another subset. Use assign_subset instead for this task.
|
inlineprotected |
alters the subset index only. Suited as a helper for methods like change_subset_indices or reset_subset_indices. WARNING: This method only alters the index but does not actually move the element to another subset. Use assign_subset instead for this task.
Referenced by ug::GridSubsetHandler::change_elem_subset_indices(), ug::MultiGridSubsetHandler::change_elem_subset_indices(), ug::GridSubsetHandler::clear_subset_elements(), and ug::MultiGridSubsetHandler::clear_subset_elements().
|
inlineprotected |
alters the subset index only. Suited as a helper for methods like change_subset_indices or reset_subset_indices. WARNING: This method only alters the index but does not actually move the element to another subset. Use assign_subset instead for this task.
|
pure virtual |
The implementation in a derived class should store the element in a list and call subset_assigned with the iterators position and the subset-index. The iterator can later be retrieved with get_list_iterator(...). The index can be retrieved with get_subset_index(...).
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
|
pure virtual |
The implementation in a derived class should store the element in a list and call subset_assigned with the iterators position and the subset-index. The iterator can later be retrieved with get_list_iterator(...). The index can be retrieved with get_subset_index(...).
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
|
virtual |
Forwards the call to the assign_subset method for the specific type (e.g. Vertex, Edge, Face, Volume).
References assign_subset(), ug::GridObject::base_object_id(), ug::EDGE, ug::FACE, UG_THROW, ug::VERTEX, and ug::VOLUME.
void ug::ISubsetHandler::assign_subset | ( | TIterator | iterBegin, |
TIterator | iterEnd, | ||
int | subsetIndex | ||
) |
Referenced by assign_subset(), ug::AssignAssociatedVerticesToSubset(), ug::AssignGridToSubset(), ug::AssignInnerAndBoundarySubsets(), ug::AssignRegionToSubset(), ug::AssignSelectionToSubset(), ug::AssignSidesToSubsets(), ug::AssignSubsetsByElementType(), ug::CollectSurfaceViewElements(), ug::ColorControlVolume(), ug::ColorSubControlVolume(), ug::ColorSubControlVolumeFaces(), ug::Partitioner_DynamicBisection< TElem, dim >::control_bisection(), ug::Partitioner_DynamicBisection< TElem, dim >::copy_partitions_to_children(), ug::CopyGrid(), ug::CopyGridElements(), ug::CopyGridLevel(), ug::CopyGridLevelElements(), ug::CopySubsetFromHigherDimNbr(), ug::CopySubsetIndices(), ug::CopySubsetIndicesToSides(), ug::FileReaderSWC::create_grid(), ug::CreateSCV(), edge_created(), edge_to_be_erased(), elems_to_be_merged(), ug::ComPol_Subset< TLayout >::extract(), ug::ExtrudeLayers(), ug::ExtrudeLayersMixed(), face_created(), face_to_be_erased(), ug::ImportGridFromLGM(), ug::ImportGridFromNG(), ug::ImportGridFromTETGEN(), ug::LoadGrid3d_IMPL(), ug::LoadGridFrom2DF(), ug::LoadGridFromART(), ug::LoadGridFromMSH(), ug::LoadGridFromOBJ(), ug::LoadGridFromSMESH(), ug::LoadGridFromSTL(), ug::MarkCorners(), ug::MarkCreaseEdges(), ug::MergeGrids(), ug::PerformTetrahedralization(), ug::SubsetHandlerSerializer::read_data(), ug::GridReaderUGX::read_subset_handler_elements(), ug::ReadSubsetIndicesFromStream(), ug::GridReaderVTU::subset_handler(), vertex_created(), vertex_to_be_erased(), volume_created(), and volume_to_be_erased().
|
pure virtual |
The implementation in a derived class should store the element in a list and call subset_assigned with the iterators position and the subset-index. The iterator can later be retrieved with get_list_iterator(...). The index can be retrieved with get_subset_index(...).
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
|
pure virtual |
The implementation in a derived class should store the element in a list and call subset_assigned with the iterators position and the subset-index. The iterator can later be retrieved with get_list_iterator(...). The index can be retrieved with get_subset_index(...).
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
|
protected |
selects elements based on the selection in the srcHandler
WARNING: This method calls virtual functions. Be careful when using it in a constructor.
References ug::Grid::begin(), ug::CopySubsetIndices(), elements_are_supported(), enable_subset_inheritance(), ug::Grid::end(), grid(), m_bSubsetInheritanceEnabled, m_defaultSubsetIndex, m_defaultSubsetInfo, m_pGrid, m_supportedElements, num_subsets(), set_default_subset_index(), set_default_subset_info(), set_subset_info(), set_supported_elements(), ug::SHE_EDGE, ug::SHE_FACE, ug::SHE_VERTEX, ug::SHE_VOLUME, subset_info(), and subset_required().
Referenced by ug::GridSubsetHandler::GridSubsetHandler(), ug::MultiGridSubsetHandler::MultiGridSubsetHandler(), and operator=().
|
protectedpure virtual |
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by clear_subset(), erase_subset(), join_subsets(), move_subset(), and swap_subsets().
void ug::ISubsetHandler::clear | ( | ) |
References erase_subset_lists(), m_subsetInfos, and reset_subset_indices().
Referenced by ug::CollectSurfaceViewElements(), operator=(), ug::Partitioner_DynamicBisection< TElem, dim >::partition(), and set_grid().
void ug::ISubsetHandler::clear_subset | ( | int | subsetIndex | ) |
References change_subset_indices(), clear_subset_lists(), m_subsetInfos, and num_subsets().
Referenced by clear_subsets().
|
protectedpure virtual |
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by clear_subset(), and elements_to_be_cleared().
void ug::ISubsetHandler::clear_subsets | ( | ) |
References clear_subset(), and num_subsets().
|
pure virtual |
returns true if the subset contains edges
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by ug::GridWriterUGX::add_subset_handler(), ug::EraseEmptySubsets(), and ug::GetFirstFreeSubset().
|
pure virtual |
returns true if the subset contains faces
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by ug::GridWriterUGX::add_subset_handler(), ug::EraseEmptySubsets(), and ug::GetFirstFreeSubset().
|
pure virtual |
collects all vertices that are in the given subset.
Please note: This method should only be used, if the begin and end methods of derived classes are not available. collects all edges that are in the given subset. Please note: This method should only be used, if the begin and end methods of derived classes are not available. collects all faces that are in the given subset. Please note: This method should only be used, if the begin and end methods of derived classes are not available. collects all volumes that are in the given subset. Please note: This method should only be used, if the begin and end methods of derived classes are not available. returns true if the subset contains vertices
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by ug::GridWriterUGX::add_subset_handler(), ug::EraseEmptySubsets(), and ug::GetFirstFreeSubset().
|
pure virtual |
returns true if the subset contains volumes
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by ug::GridWriterUGX::add_subset_handler(), ug::EraseEmptySubsets(), and ug::GetFirstFreeSubset().
|
protected |
creates all required infos (and pipes) up to the given index.
References add_required_subset_lists(), m_defaultSubsetInfo, and m_subsetInfos.
Referenced by subset_required().
void ug::ISubsetHandler::disable_element_support | ( | uint | shElements | ) |
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_aSubsetIndex, m_pGrid, m_supportedElements, ug::SHE_EDGE, ug::SHE_FACE, ug::SHE_VERTEX, and ug::SHE_VOLUME.
Referenced by set_grid(), set_supported_elements(), and ~ISubsetHandler().
|
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).
TODO: see vertex_created
Reimplemented from ug::GridObserver.
References assign_subset(), ug::GridObject::base_object_id(), ug::EDGE, elements_are_supported(), get_subset_index(), grid(), m_aaSubsetIndexEDGE, m_bStrictInheritanceEnabled, m_bSubsetInheritanceEnabled, m_defaultSubsetIndex, m_pGrid, and ug::SHE_EDGE.
|
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*).
TODO: see vertex_created
Reimplemented from ug::GridObserver.
References assign_subset(), elements_are_supported(), grid(), m_aaSubsetIndexEDGE, m_pGrid, and ug::SHE_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 elements_are_supported(), elems_to_be_merged(), grid(), ug::SHE_EDGE, and boost::target().
bool ug::ISubsetHandler::elements_are_supported | ( | uint | shElements | ) | const |
returns true if the given element-types are supported.
pass an or-combination of constants enumerated in SubsetHandlerElements.
References m_supportedElements.
Referenced by ug::GridSubsetHandler::add_required_subset_lists(), ug::GridSubsetHandler::assign_grid(), ug::MultiGridSubsetHandler::assign_grid(), ug::GridSubsetHandler::assign_subset(), ug::MultiGridSubsetHandler::assign_subset(), assign_subset_handler(), ug::GridSubsetHandler::change_subset_indices(), ug::MultiGridSubsetHandler::change_subset_indices(), ug::GridSubsetHandler::detach_data(), ug::MultiGridSubsetHandler::detach_data(), disable_element_support(), edge_created(), edge_to_be_erased(), edges_to_be_merged(), enable_element_support(), face_created(), face_to_be_erased(), faces_to_be_merged(), get_subset_index(), ug::MultiGridSubsetHandler::new_subset(), reset_subset_indices(), ug::GridReaderUGX::subset_handler(), 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.
References clear_subset_lists(), and num_subsets().
|
protected |
helper for GridObserver callbacks.
References assign_subset(), get_subset_index(), and boost::target().
Referenced by edges_to_be_merged(), faces_to_be_merged(), vertices_to_be_merged(), and volumes_to_be_merged().
void ug::ISubsetHandler::enable_element_support | ( | uint | shElements | ) |
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(), elements_are_supported(), m_aaSubsetIndexEDGE, m_aaSubsetIndexFACE, m_aaSubsetIndexVOL, m_aaSubsetIndexVRT, m_aSubsetIndex, m_pGrid, m_supportedElements, reset_subset_indices(), ug::SHE_EDGE, ug::SHE_FACE, ug::SHE_VERTEX, and ug::SHE_VOLUME.
Referenced by ISubsetHandler(), set_grid(), and set_supported_elements().
void ug::ISubsetHandler::enable_strict_inheritance | ( | bool | bEnable | ) |
restricts subset inheritance so that new elements derive their subset index only from parents with the same base-type. Disabled by default. NOTE: strict inheritance only has an effect if subset inheritance is enabled.
References m_bStrictInheritanceEnabled.
void ug::ISubsetHandler::enable_subset_inheritance | ( | bool | bEnable | ) |
if enabled, newly created elements derive their subset-index from their parents. Enabled by default. If enabled, the default subset index will be ignored if a parent is specified on element creation.
References m_bSubsetInheritanceEnabled.
Referenced by assign_subset_handler(), ug::ExtrudeCylinder(), and ug::MultiGrid::init().
void ug::ISubsetHandler::erase_subset | ( | int | subsetIndex | ) |
erases the subset at the given index. Assigns -1 to all entries. Moves all other subsets 1 index up.
changes subset-indices of other subsets.
References change_subset_indices(), erase_subset_lists(), m_subsetInfos, num_subsets(), and UG_THROW.
Referenced by ug::EraseEmptySubsets(), ug::ExtrudeLayers(), and join_subsets().
|
protectedpure virtual |
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by clear(), and erase_subset().
|
protectedpure virtual |
erase the subset-lists but do not touch the subset-indices.
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
|
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).
TODO: see vertex_created
Reimplemented from ug::GridObserver.
References assign_subset(), ug::GridObject::base_object_id(), elements_are_supported(), ug::FACE, get_subset_index(), grid(), m_aaSubsetIndexFACE, m_bStrictInheritanceEnabled, m_bSubsetInheritanceEnabled, m_defaultSubsetIndex, m_pGrid, and ug::SHE_FACE.
|
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*).
TODO: see vertex_created
Reimplemented from ug::GridObserver.
References assign_subset(), elements_are_supported(), grid(), m_aaSubsetIndexFACE, m_pGrid, and ug::SHE_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 elements_are_supported(), elems_to_be_merged(), grid(), ug::SHE_FACE, and boost::target().
|
inline |
Referenced by ug::ExtrudeCylinder(), ug::LoadGridFromDUMP(), ug::MeshLayerBoundaries(), and ug::MeshLayers().
|
pure virtual |
Returns the geometric object collection for the given subset.
Note that the GOC may contain multiple levels.
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by ug::GridWriterUGX::create_subset_element_node(), ug::FaceArea(), ug::FindSubsetGroups(), ug::ProjectionHandler::refinement_begins(), ug::SaveGridToNCDF(), ug::SelectSubset(), and ug::SelectSubsetElements().
int ug::ISubsetHandler::get_subset_index | ( | const char * | name | ) | const |
returns the index of the first subset with the given name.
If no subset with the given name exists, -1 is returned.
This method takes O(NumSubsets) time.
References name, ug::SubsetInfo::name, num_subsets(), and subset_info().
|
inline |
References elements_are_supported(), m_aaSubsetIndexEDGE, and ug::SHE_EDGE.
|
inline |
References elements_are_supported(), m_aaSubsetIndexFACE, and ug::SHE_FACE.
int ug::ISubsetHandler::get_subset_index | ( | GridObject * | elem | ) | const |
References ug::GridObject::base_object_id(), ug::EDGE, ug::FACE, ug::VERTEX, and ug::VOLUME.
Referenced by ug::AdjustEdgeLength(), ug::AdjustSubsetsForLgmNg(), ug::ApplySmoothManifoldPosToTopLevelAveragingScheme(), ug::ApplySmoothManifoldPosToTopLevelButterflyScheme(), ug::ApplySmoothManifoldPosToTopLevelLoopScheme(), ug::ApplySmoothVolumePosToTopLevel(), ug::GridSubsetHandler::assign_subset_impl(), ug::MultiGridSubsetHandler::assign_subset_impl(), ug::AssignAssociatedEdgesToSubsets(), ug::AssignAssociatedFacesToSubsets(), ug::AssignAssociatedVerticesToSubsets(), ug::AssignCreaseVertices(), ug::AssignFaceInterfaceEdgesToSubsets(), ug::assignFaceSubsetToClosedFace(), ug::AssignFixedVertices(), ug::AssignInnerAndBoundarySubsets(), ug::AssignRegionToSubset(), ug::AssignSidesToSubsets(), ug::AssignVolumeInterfaceFacesToSubsets(), ug::CalculateConstrainedSmoothVolumePosInTopLevel(), ug::CalculateNumManifoldEdgesVertexAttachmentInParentLevel(), ug::CalculateNumManifoldFacesVertexAttachmentInTopLevel(), ug::CalculateSmoothCreaseManifoldPosInParentLevelLoopScheme(), ug::CalculateSmoothManifoldPosInParentLevelButterflyScheme(), ug::CalculateSmoothManifoldPosInParentLevelLoopScheme(), ug::CalculateSmoothManifoldPosInTopLevelAveragingScheme(), ug::CalculateSmoothVolumePosInTopLevel(), ug::IsInSubset::callback(), ug::IsNotInSubset::callback(), ug::PeriodicBoundaryManager::check_elements_periodicity(), ug::CheckValences(), ug::ComPol_Subset< TLayout >::collect(), ug::AssemblingTuner< TAlgebra >::collect_selected_elements(), ug::CollectLines(), ug::CollectSurfaceVertices(), ug::ColorControlVolume(), ug::computeDiamondPointXCrossType(), ug::ComputeLocalSubsetDimensions(), ug::Partitioner_DynamicBisection< TElem, dim >::copy_partitions_to_children(), ug::CopyGrid(), ug::CopyGridElements(), ug::CopyGridLevel(), ug::CopyGridLevelElements(), ug::CopySubsetFromHigherDimNbr(), ug::CopySubsetIndices(), ug::CopySubsetIndicesToSides(), ug::ArteExpandFracs3D::countAndSelectFracBaseNums(), ug::ArteExpandFracs3D::createNewElements(), ug::createNewFacesForExtXCrossFracs(), edge_created(), elems_to_be_merged(), ug::GridWriterVTU::end_cell_data(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExpandFractures3d(), ug::expandSingleFractureAtGivenSide(), ug::expandSingleFractureAtGivenSide< VecVertexOfFaceInfo >(), ug::ExportGridToSMESH(), ug::ExportGridToSWC(), ug::ExportGridToTIKZ(), ug::ExportGridToUG_2D(), ug::ComPol_Subset< TLayout >::extract(), ug::ExtrudeLayers(), face_created(), ug::FindSubsetGroups(), ug::ArteExpandFracs3D::generateVertexInfos(), ug::MultiGrid::get_level(), ug::GetFirstRegularVertex(), ug::GetRightLeftUnitIndex(), ug::ProjectionHandler::handle_new_vertex(), ug::InitLinearManifoldSubsetHandler(), ug::IntegralNormalComponentOnManifoldGeneral(), ug::GlobalFracturedMediaRefiner::is_fracture_element(), ug::MarkAlongSurface(), ug::MarkFixedCreaseVertices(), ug::MarkForAdaption_ElementsTouchingSubset(), ug::MarkForAdaption_ElementsTouchingSubsets(), ug::MarkForRefinement_SubsetInterfaceElements(), ug::MarkSubsets(), ug::MergeGrids(), ug::NbrIsInSubset(), ug::PartitionMultiGridLevel_MetisKway(), ug::PartitionMultiGridLevel_ParmetisKway(), ug::Partitioner_DynamicBisection< TElem, dim >::perform_bisection(), ug::GridSubsetHandler::perform_self_tests(), ug::PerformRetetrahedralization(), ug::PerformTetrahedralization(), ug::ClusterElementStacks< elem_t, vector_t >::post_process(), ug::SmoothPartitionBounds< elem_t >::post_process(), ug::ProjectionHandler::refinement_begins(), ug::SaveGridTo2DF(), ug::SaveGridToART(), ug::SaveGridToELE(), ug::SelectInterfaceElements(), ug::ProjectionHandler::set_projector(), ug::SplitIrregularManifoldSubset(), ug::SplitIrregularPolyChain(), ug::TryCollapse(), ug::FV1Geometry_gen< TElem, TWorldDim, false >::update_boundary_faces(), ug::DimFV1Geometry< TDim, TWorldDim >::update_boundary_faces(), ug::FV1IBGeometry< TElem, TWorldDim >::update_boundary_faces(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::CRFVGeometry< TElem, TWorldDim >::update_boundary_faces(), ug::FVGeometry< TOrder, TElem, TWorldDim, TQuadOrder >::update_boundary_faces(), ug::DimFVGeometry< TWorldDim, TDim >::update_boundary_faces(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces(), vertex_created(), volume_created(), ug::InterSubsetPartitionWeighting::weigh(), ug::ProtectSubsetPartitionWeighting::weigh(), ug::VTKOutput< TDim >::write_cell_subsets(), ug::SubsetHandlerSerializer::write_data(), ug::WriteNG(), and ug::WriteSubsetIndicesToStream().
|
inline |
References elements_are_supported(), m_aaSubsetIndexVRT, and ug::SHE_VERTEX.
|
inline |
References elements_are_supported(), m_aaSubsetIndexVOL, and ug::SHE_VOLUME.
const char * ug::ISubsetHandler::get_subset_name | ( | int | subsetIndex | ) | const |
returns the name of a subset
References num_subsets(), and UG_THROW.
Referenced by ug::PeriodicBoundaryManager::check_elements_periodicity(), ug::ExpandFractures2dArte(), ug::ExportGridToSWC(), ug::ExportGridToTIKZ(), and ug::VTKOutput< TDim >::write_cell_subset_names().
Grid * ug::ISubsetHandler::grid | ( | ) | const |
returns a pointer to the grid on which the subset-handler works.
returns NULL if no grid is assigned.
References m_pGrid.
Referenced by ug::GridSubsetHandler::assign_grid(), assign_subset_handler(), ug::AssignGridToSubset(), ug::AssignSelectionToSubset(), ug::AssignSidesToSubsets(), ug::AssignSubsetsByElementType(), ug::ColorControlVolume(), ug::ColorSubControlVolume(), ug::ColorSubControlVolumeFaces(), ug::ComputeLocalSubsetDimensions(), ug::CopySubsetFromHigherDimNbr(), ug::CopySubsetIndicesToSides(), ug::GridWriterUGX::create_subset_element_node(), ug::CreateGridOfControlVolumes(), ug::CreateSCV(), ug::CreateSCVF(), ug::DistributeDomain(), edge_created(), edge_to_be_erased(), edges_to_be_merged(), face_created(), face_to_be_erased(), faces_to_be_merged(), ug::FindSubsetGroups(), ug::GridSubsetHandler::grid_to_be_destroyed(), grid_to_be_destroyed(), ug::MultiGridSubsetHandler::grid_to_be_destroyed(), ug::GridSubsetHandler::GridSubsetHandler(), ISubsetHandler(), ug::MarkForRefinement_SubsetInterfaceElements(), ug::PartitionElements_RegularGrid(), ug::SavePartitionMapToFile(), set_grid(), ug::SplitIrregularManifoldSubset(), ug::SplitIrregularPolyChain(), ug::HFV1ManifoldGeometry< TElem, TWorldDim >::update(), ug::HCRFVGeometry< TElem, TWorldDim >::update(), ug::HFV1Geometry< TElem, TWorldDim >::update(), ug::DimHFV1Geometry< TDim, TWorldDim >::update(), ug::DimFV1Geometry< TDim, TWorldDim >::update_boundary_faces(), ug::FV1IBGeometry< TElem, TWorldDim >::update_boundary_faces(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::CRFVGeometry< TElem, TWorldDim >::update_boundary_faces(), ug::FVGeometry< TOrder, TElem, TWorldDim, TQuadOrder >::update_boundary_faces(), ug::DimFVGeometry< TWorldDim, TDim >::update_boundary_faces(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_hanging(), vertex_created(), vertex_to_be_erased(), vertices_to_be_merged(), volume_created(), volume_to_be_erased(), volumes_to_be_merged(), and ug::ProtectSubsetPartitionWeighting::weigh().
|
virtual |
Reimplemented from ug::GridObserver.
Reimplemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
References grid(), m_pGrid, and set_grid().
Referenced by ug::GridSubsetHandler::grid_to_be_destroyed(), and ug::MultiGridSubsetHandler::grid_to_be_destroyed().
void ug::ISubsetHandler::insert_subset | ( | int | subsetIndex | ) |
inserts a subset at the given index. Moves all other subsets 1 index higher.
changes subset-indices of other subsets.
References move_subset(), num_subsets(), and subset_required().
|
protectedpure virtual |
join the subset-lists but do not touch the subset-indices.
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by join_subsets().
void ug::ISubsetHandler::join_subsets | ( | int | targetSub, |
int | sub1, | ||
int | sub2, | ||
bool | eraseUnusedSubs | ||
) |
Joins two subsets into a new one. Optionally erases the old subsets, if they are no longer used.
References change_subset_indices(), erase_subset(), join_subset_lists(), num_subsets(), subset_required(), and UG_THROW.
void ug::ISubsetHandler::move_subset | ( | int | indexFrom, |
int | indexTo | ||
) |
Moves the subset from index From to index To. Moves all subsets between indexFrom+1 and indexTo in the opposite direction.
changes subset indices of other subsets.
References change_subset_indices(), m_subsetInfos, move_subset_lists(), num_subsets(), subset_required(), and UG_THROW.
Referenced by insert_subset(), and ug::MakeSubsetsConsecutive().
|
protectedpure virtual |
move the subset-lists but do not touch the subset-indices.
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by move_subset().
|
inline |
returns the number of subset-infos (return value is int, since SubsetIndices are of type int)
Referenced by ug::GridWriterUGX::add_subset_handler(), ug::AdjustSubsetsForLgmNg(), assign_subset_handler(), ug::AssignCreaseVertices(), ug::AssignDefaultSubsetColors(), ug::AssignFaceInterfaceEdgesToSubsets(), ug::ArteExpandFracs3D::assignOrigFracInfos(), ug::AssignSidesToSubsets(), ug::AssignSubsetColorsBlueToGreen(), ug::AssignSubsetColorsRedToGreen(), ug::AssignSubsetsBySurfaceViewState(), ug::AssignVolumeInterfaceFacesToSubsets(), clear_subset(), clear_subsets(), ug::CollectSurfaceViewElements(), ug::CopyGrid(), ug::CopyGridLevel(), ug::CopySubsetFromHigherDimNbr(), ug::CreateGridOfControlVolumes(), ug::CreateGridOfSubControlVolumeFaces(), ug::CreateGridOfSubControlVolumes(), ug::CreateSurfaceView(), ug::determineOrderOfFaces(), ug::DimensionOfSubsets(), ug::DistributeGrid(), elements_to_be_cleared(), ug::GridWriterVTU::end_cell_data(), erase_subset(), ug::EraseEmptySubsets(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExpandFractures3d(), ug::expandSingleFractureAtGivenSide(), ug::ExportGridToSWC(), ug::ExportGridToTIKZ(), ug::ExportGridToUG(), ug::ExportGridToUG_2D(), ug::ExtrudeLayers(), ug::FillDistInfos(), ug::FindSubsetGroups(), get_subset_index(), get_subset_name(), ug::GetFirstFreeSubset(), ug::GetMaxSubsetIndex(), ug::ArteExpandFracs3D::initialize(), insert_subset(), join_subsets(), ug::MultiGrid::level_required(), ug::MakeSubsetsConsecutive(), ug::MarkFixedCreaseVertices(), ug::MarkSubsets(), ug::MergeGrids(), move_subset(), ug::MultiGrid::num_levels(), ug::Partitioner_DynamicBisection< TElem, dim >::partition(), ug::PerformRetetrahedralization(), ug::VTKOutput< TDim >::print(), ug::ProjectionHandler::refinement_begins(), ug::SaveGridToNCDF(), ug::SaveGridToOBJ(), ug::SavePartitionMapToFile(), ug::SeparateSubsetsByLowerDimSeparators(), ug::SerializeSubsetHandler(), subset_info(), subset_required(), swap_subsets(), ug::MultiGrid::top_level(), ug::VTKOutput< TDim >::write_cell_subset_names(), ug::SubsetHandlerSerializer::write_info(), ug::WriteLGM(), and ug::WriteNG().
ISubsetHandler & ug::ISubsetHandler::operator= | ( | const ISubsetHandler & | sh | ) |
assigns subsets based on the subsets in the given subset-handler
Elements of this handler will be assigned to subsets based on their order in the underlying grids. The underlying grid of this handler will not be changed. This is particularly useful if you just copied a grid and if you now want to copy the subsets in the associated subset-handlers.
Please note, that attachments are not copied in the current version.
References assign_subset_handler(), and clear().
Referenced by ug::GridSubsetHandler::operator=().
sets the subset-indices of all elements of m_pGrid to -1.
Use with care! Only indices are affected. The elements are not removed from any lists. pass an or-combination of constants enumerated in SubsetHandlerElements.
References elements_are_supported(), m_aaSubsetIndexEDGE, m_aaSubsetIndexFACE, m_aaSubsetIndexVOL, m_aaSubsetIndexVRT, m_pGrid, ug::SHE_EDGE, ug::SHE_FACE, ug::SHE_VERTEX, and ug::SHE_VOLUME.
Referenced by clear(), and enable_element_support().
void ug::ISubsetHandler::set_default_subset_index | ( | int | subsetIndex | ) |
new elements will be automatically assigned to this subset. set this to a negative value to avoid automatic assignment (-1 by default). only used if subset_inheritance is disabled or if no parent is specified.
References m_defaultSubsetIndex.
Referenced by assign_subset_handler(), ug::ExtrudeCylinder(), ug::LoadGridFromDUMP(), ug::MeshLayerBoundaries(), and ug::MeshLayers().
void ug::ISubsetHandler::set_default_subset_info | ( | const SubsetInfo & | defSI | ) |
sets the default subset-info. Used when initializing new subset-infos.
References m_defaultSubsetInfo.
Referenced by assign_subset_handler().
|
protected |
set the grid on which the subset-handler shall work.
The subset-handler can only work on one grid at a time. It is crucial that assign_grid methods of derived classes call this method.
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::SHE_NONE, and ug::Grid::unregister_observer().
Referenced by ug::GridSubsetHandler::assign_grid(), ug::MultiGridSubsetHandler::assign_grid(), and grid_to_be_destroyed().
void ug::ISubsetHandler::set_subset_info | ( | int | subsetIndex, |
const SubsetInfo & | subsetInfo | ||
) |
if the subset at subsetIndex does not yet exist, it will be created.
References m_subsetInfos, and subset_required().
Referenced by assign_subset_handler(), ug::LoadGridFromOBJ(), and ug::GridReaderUGX::subset_handler().
void ug::ISubsetHandler::set_subset_name | ( | const char * | name, |
int | subsetIndex | ||
) |
sets the name of a subset
References name, ug::SubsetInfo::name, subset_info(), and subset_required().
Referenced by ug::FileReaderSWC::create_grid(), and ug::ExpandFractures2dArte().
void ug::ISubsetHandler::set_supported_elements | ( | uint | shElements | ) |
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.
Referenced by assign_subset_handler().
|
inline |
|
inlineprotected |
References m_aaSubsetIndexEDGE.
|
inlineprotected |
References m_aaSubsetIndexFACE.
|
inlineprotected |
References m_aaSubsetIndexVRT.
Referenced by ug::GridSubsetHandler::assign_subset_impl(), and ug::MultiGridSubsetHandler::assign_subset_impl().
|
inlineprotected |
References m_aaSubsetIndexVOL.
SubsetInfo & ug::ISubsetHandler::subset_info | ( | int | subsetIndex | ) |
if the subset at subsetIndex does not yet exist, it will be created.
References m_subsetInfos, subset_required(), and UG_THROW.
Referenced by ug::GridWriterUGX::add_subset_attributes(), assign_subset_handler(), ug::AssignDefaultSubsetColors(), ug::AssignSubsetColorsBlueToGreen(), ug::AssignSubsetColorsRedToGreen(), ug::AssignSubsetsByElementType(), ug::AssignSubsetsByInterfaceType(), ug::AssignSubsetsByLevel(), ug::AssignSubsetsBySurfaceViewState(), ug::CopyGrid(), ug::CopyGridLevel(), ug::DeserializeSubsetHandler(), ug::DimensionOfSubset(), ug::GridWriterVTU::end_cell_data(), ug::ExportGridToUG_2D(), get_subset_index(), ug::LoadGridFromOBJ(), ug::MergeGrids(), ug::SubsetHandlerSerializer::read_info(), ug::DelaunayDebugSaver::save(), ug::GlobalFracturedMediaRefiner::save_marks_to_file(), ug::GlobalMultiGridRefiner::save_marks_to_file(), ug::HangingNodeRefinerBase< TSelector >::save_marks_to_file(), ug::SaveCoarsenMarksToFile(), ug::SaveGridToOBJ(), ug::SeparateRegions(), ug::SerializeSubsetHandler(), set_subset_name(), ug::GridReaderVTU::subset_handler(), ug::GridReaderUGX::subset_handler(), ug::SubsetHandlerSerializer::write_info(), and ug::WriteLGM().
const SubsetInfo & ug::ISubsetHandler::subset_info | ( | int | subsetIndex | ) | const |
Be careful: queried subset has to exist! Check with num_subsets()
References m_subsetInfos, num_subsets(), and UG_THROW.
|
inline |
Referenced by ug::ExtrudeCylinder().
|
inline |
if the subset with the given index does not yet exist, it will be created.
All subsets in between num_subsets and index will be created, too.
References create_required_subsets(), and m_subsetInfos.
Referenced by assign_subset_handler(), ug::GridSubsetHandler::assign_subset_impl(), ug::MultiGridSubsetHandler::assign_subset_impl(), ug::MultiGrid::create_levels(), ug::MultiGridSubsetHandler::get_grid_objects(), ug::GridSubsetHandler::get_grid_objects_in_subset(), ug::MultiGridSubsetHandler::get_grid_objects_in_subset(), insert_subset(), join_subsets(), move_subset(), set_subset_info(), set_subset_name(), and subset_info().
|
inline |
throws an error if the given index is equal or higher than num_subsets.
References num_subsets(), and UG_THROW.
|
protectedpure virtual |
swap the subset-lists but do not touch the subset-indices.
Implemented in ug::MultiGridSubsetHandler, and ug::GridSubsetHandler.
Referenced by swap_subsets().
void ug::ISubsetHandler::swap_subsets | ( | int | subsetIndex1, |
int | subsetIndex2 | ||
) |
Swaps the given subsets,.
References change_subset_indices(), m_subsetInfos, num_subsets(), swap_subset_lists(), and UG_THROW.
|
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 assign_subset(), ug::GridObject::base_object_id(), elements_are_supported(), get_subset_index(), grid(), m_aaSubsetIndexVRT, m_bStrictInheritanceEnabled, m_bSubsetInheritanceEnabled, m_defaultSubsetIndex, m_pGrid, ug::SHE_VERTEX, 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*).
TODO: see vertex_created
Reimplemented from ug::GridObserver.
References assign_subset(), elements_are_supported(), grid(), m_aaSubsetIndexVRT, m_pGrid, and ug::SHE_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 elements_are_supported(), elems_to_be_merged(), grid(), ug::SHE_VERTEX, 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).
TODO: see vertex_created
Reimplemented from ug::GridObserver.
References assign_subset(), ug::GridObject::base_object_id(), elements_are_supported(), get_subset_index(), grid(), m_aaSubsetIndexVOL, m_bStrictInheritanceEnabled, m_bSubsetInheritanceEnabled, m_defaultSubsetIndex, m_pGrid, ug::SHE_VOLUME, 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*).
TODO: see vertex_created
Reimplemented from ug::GridObserver.
References assign_subset(), elements_are_supported(), grid(), m_aaSubsetIndexVOL, m_pGrid, and ug::SHE_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 elements_are_supported(), elems_to_be_merged(), grid(), ug::SHE_VOLUME, and boost::target().
|
protected |
Referenced by edge_created(), edge_to_be_erased(), enable_element_support(), get_subset_index(), reset_subset_indices(), and subset_assigned().
|
protected |
Referenced by enable_element_support(), face_created(), face_to_be_erased(), get_subset_index(), reset_subset_indices(), and subset_assigned().
|
protected |
|
protected |
|
protected |
Referenced by disable_element_support(), and enable_element_support().
|
protected |
Referenced by edge_created(), enable_strict_inheritance(), face_created(), ISubsetHandler(), vertex_created(), and volume_created().
|
protected |
|
protected |
|
protected |
Referenced by assign_subset_handler(), create_required_subsets(), ISubsetHandler(), and set_default_subset_info().
|
protected |
Referenced by ug::GridSubsetHandler::add_required_subset_lists(), ug::GridSubsetHandler::assign_grid(), ug::MultiGridSubsetHandler::assign_grid(), assign_subset_handler(), ug::GridSubsetHandler::assign_subset_impl(), ug::MultiGridSubsetHandler::assign_subset_impl(), ug::GridSubsetHandler::change_subset_indices(), ug::MultiGridSubsetHandler::change_subset_indices(), ug::MultiGridSubsetHandler::cleanup(), ug::GridSubsetHandler::clear_subset_elements(), ug::MultiGridSubsetHandler::clear_subset_elements(), ug::GridSubsetHandler::clear_subset_lists(), ug::MultiGridSubsetHandler::clear_subset_lists(), ug::GridSubsetHandler::detach_data(), ug::MultiGridSubsetHandler::detach_data(), disable_element_support(), edge_created(), edge_to_be_erased(), enable_element_support(), face_created(), face_to_be_erased(), grid(), ug::GridSubsetHandler::grid_to_be_destroyed(), grid_to_be_destroyed(), ug::MultiGridSubsetHandler::grid_to_be_destroyed(), ISubsetHandler(), ug::MultiGridSubsetHandler::new_subset(), reset_subset_indices(), set_grid(), vertex_created(), vertex_to_be_erased(), volume_created(), volume_to_be_erased(), ug::GridSubsetHandler::~GridSubsetHandler(), ~ISubsetHandler(), and ug::MultiGridSubsetHandler::~MultiGridSubsetHandler().
|
protected |
|
protected |