ug4
|
Partitions elements of a grid into several subsets. More...
#include <subset_handler_grid.h>
Classes | |
struct | Subset |
Public Member Functions | |
void | assign_grid (Grid &grid) |
void | assign_grid (Grid *grid) |
void | assign_subset (Edge *elem, int subsetIndex) |
assigns an edge to a subset. More... | |
virtual void | assign_subset (Edge *elem, int subsetIndex)=0 |
void | assign_subset (Face *elem, int subsetIndex) |
assigns a face to a subset. More... | |
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) |
void | assign_subset (Vertex *elem, int subsetIndex) |
assigns a vertex to a subset. More... | |
virtual void | assign_subset (Vertex *elem, int subsetIndex)=0 |
void | assign_subset (Volume *elem, int subsetIndex) |
assigns a volume to a subset. More... | |
virtual void | assign_subset (Volume *elem, int subsetIndex)=0 |
template<class TElem > | |
geometry_traits< TElem >::iterator | begin (int subsetIndex) |
returns the begin-iterator for the elements of type TElem in the given subset. More... | |
template<class TElem > | |
geometry_traits< TElem >::const_iterator | begin (int subsetIndex) const |
returns the begin-iterator for the elements of type TElem in the given subset. More... | |
template<class TElem > | |
geometry_traits< TElem >::const_iterator | begin (int subsetIndex, size_t) const |
returns the begin-iterator for the elements of type TElem in the given subset. More... | |
template<class TElem > | |
void | clear_subset_elements (int subsetIndex) |
removes all elements of type TElem from the specified subset. More... | |
virtual bool | contains_edges (int subsetIndex) const |
returns true if the subset contains edges More... | |
virtual bool | contains_faces (int subsetIndex) const |
returns true if the subset contains faces More... | |
virtual bool | contains_vertices (int subsetIndex) const |
collects all vertices that are in the given subset. More... | |
virtual bool | contains_volumes (int subsetIndex) const |
returns true if the subset contains volumes More... | |
template<class TElem > | |
bool | empty () const |
returns true if the subset-handler contains no elements of the given type. More... | |
bool | empty () const |
returns true if the subset-handler contains no elements at all. More... | |
template<class TElem > | |
bool | empty (int subsetIndex) const |
bool | empty (int subsetIndex) const |
returns true if the subset-handler contains no elements at all. More... | |
template<class TElem > | |
geometry_traits< TElem >::iterator | end (int subsetIndex) |
returns the end-iterator for the elements of type TElem in the given subset. More... | |
template<class TElem > | |
geometry_traits< TElem >::const_iterator | end (int subsetIndex) const |
returns the end-iterator for the elements of type TElem in the given subset. More... | |
template<class TElem > | |
geometry_traits< TElem >::const_iterator | end (int subsetIndex, size_t) const |
returns the end-iterator for the elements of type TElem in the given subset. More... | |
GridObjectCollection | get_grid_objects () const |
virtual GridObjectCollection | get_grid_objects_in_subset (int subsetIndex) const |
Returns the geometric object collection for the given subset. More... | |
virtual void | grid_to_be_destroyed (Grid *grid) |
perform cleanup More... | |
GridSubsetHandler (const GridSubsetHandler &sh) | |
GridSubsetHandler (Grid &grid, uint supportedElements=SHE_ALL) | |
GridSubsetHandler (uint supportedElements=SHE_ALL) | |
template<class TElem > | |
uint | num () const |
returns the total number of elements More... | |
template<class TElem > | |
uint | num (int subsetIndex) const |
returns the number of elements in the given subset More... | |
template<class TElem > | |
uint | num (int subsetIndex, size_t) const |
returns the number of elements in the given subset More... | |
template<class TElem > | |
uint | num_elements (int subsetIndex) const |
returns the number of elements in the given subset More... | |
template<class TElem > | |
uint | num_elements (int subsetIndex, size_t) const |
returns the number of elements in the given subset More... | |
uint | num_levels () const |
returns number of levels (always 1) More... | |
GridSubsetHandler & | operator= (const GridSubsetHandler &sh) |
GridSubsetHandler & | operator= (const ISubsetHandler &sh) |
template<class TElem > | |
bool | perform_self_tests () |
only for debug purposes More... | |
~GridSubsetHandler () | |
Public Member Functions inherited from ug::ISubsetHandler | |
virtual void | assign_subset (GridObject *elem, int subsetIndex) |
template<class TIterator > | |
void | assign_subset (TIterator iterBegin, TIterator iterEnd, int subsetIndex) |
void | clear () |
void | clear_subset (int subsetIndex) |
void | clear_subsets () |
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 () |
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... | |
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 Member Functions | |
void | add_required_subset_lists (int maxIndex) |
add a subset More... | |
template<class TElem > | |
void | assign_subset_impl (TElem *elem, int subsetIndex) |
this method is called by ISubsetHandler when attachment_support has been enabled. More... | |
template<class TElem > | |
void | change_elem_subset_indices (int indOld, int indNew) |
helper for change_subset_indices More... | |
virtual void | change_subset_indices (int indOld, int indNew) |
changes the subset-indices of all elements int the subset. More... | |
void | cleanup () |
helper for collect_subset_elements More... | |
virtual void | clear_subset_lists (int index) |
clears the element lists in the given subset. Does not alter any indices. More... | |
void | detach_data () |
detaches all attached data. More... | |
virtual void | erase_subset_lists () |
erases the subsets. Doesn't alter any indices. More... | |
void | erase_subset_lists (int index) |
erases the subset but does not touch the subset-indices. More... | |
void | erase_subset_lists_impl () |
non-virtual implementation of erase_subset_lists. Callable from destructor More... | |
void | join_subset_lists (int target, int src1, int src2) |
join the subset-lists but do not touch the subset-indices. More... | |
void | move_subset_lists (int indexFrom, int indexTo) |
moves the subset but does not touch the subset-indices. More... | |
uint | num_subsets_in_list () const |
returns the number of subsets in the local list More... | |
template<class TElem > | |
Grid::traits< TElem >::SectionContainer & | section_container (int si) |
returns the section container for the given type, subset and level More... | |
template<class TElem > | |
const Grid::traits< TElem >::SectionContainer & | section_container (int si) const |
returns the const section container for the given type, subset and level More... | |
void | swap_subset_lists (int ind1, int ind2) |
swaps the subsets but does not touch the subset-indices. More... | |
VertexSectionContainer::iterator | get_list_iterator (Vertex *o) |
returns the iterator at which the given element lies in the section container More... | |
EdgeSectionContainer::iterator | get_list_iterator (Edge *o) |
returns the iterator at which the given element lies in the section container More... | |
FaceSectionContainer::iterator | get_list_iterator (Face *o) |
returns the iterator at which the given element lies in the section container More... | |
VolumeSectionContainer::iterator | get_list_iterator (Volume *o) |
returns the iterator at which the given element lies in the section container More... | |
Protected Member Functions inherited from ug::ISubsetHandler | |
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... | |
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... | |
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) |
Partitions elements of a grid into several subsets.
The user can iterate over elements of grid subset-wise.
|
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 |
References assign_grid(), and ug::ISubsetHandler::grid().
ug::GridSubsetHandler::GridSubsetHandler | ( | const GridSubsetHandler & | sh | ) |
WARNING: Don't call the copy-constructor from derived classes, Since it calls virtual methods.
References assign_grid(), ug::ISubsetHandler::assign_subset_handler(), and ug::ISubsetHandler::grid().
ug::GridSubsetHandler::~GridSubsetHandler | ( | ) |
References detach_data(), erase_subset_lists_impl(), and ug::ISubsetHandler::m_pGrid.
|
protectedvirtual |
add a subset
Implements ug::ISubsetHandler.
References ug::ISubsetHandler::elements_are_supported(), ug::Grid::get_attachment_pipe(), ug::SectionContainer< TValue, TContainer >::get_container(), m_aSharedEntryEDGE, m_aSharedEntryFACE, m_aSharedEntryVOL, m_aSharedEntryVRT, ug::GridSubsetHandler::Subset::m_edges, ug::GridSubsetHandler::Subset::m_faces, ug::ISubsetHandler::m_pGrid, m_subsets, ug::GridSubsetHandler::Subset::m_vertices, ug::GridSubsetHandler::Subset::m_volumes, ug::AttachedElementList< TAttachmentPipe >::set_pipe(), ug::SHE_EDGE, ug::SHE_FACE, ug::SHE_VERTEX, and ug::SHE_VOLUME.
void ug::GridSubsetHandler::assign_grid | ( | Grid & | grid | ) |
References assign_grid(), and ug::ISubsetHandler::grid().
void ug::GridSubsetHandler::assign_grid | ( | Grid * | grid | ) |
References ug::Grid::attach_to_edges(), ug::Grid::attach_to_faces(), ug::Grid::attach_to_vertices(), ug::Grid::attach_to_volumes(), cleanup(), ug::ISubsetHandler::elements_are_supported(), ug::ISubsetHandler::grid(), m_aSharedEntryEDGE, m_aSharedEntryFACE, m_aSharedEntryVOL, m_aSharedEntryVRT, ug::ISubsetHandler::m_pGrid, ug::ISubsetHandler::set_grid(), ug::SHE_EDGE, ug::SHE_FACE, ug::SHE_VERTEX, and ug::SHE_VOLUME.
Referenced by assign_grid(), GridSubsetHandler(), ug::MultiGrid::init(), and ug::LoadGridFromART().
|
virtual |
assigns an edge to a subset.
If the subset doesn't already exist, it will be created.
Implements ug::ISubsetHandler.
References assign_subset_impl(), ug::ISubsetHandler::elements_are_supported(), and ug::SHE_EDGE.
virtual void ug::ISubsetHandler::assign_subset |
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(...).
|
virtual |
assigns a face to a subset.
If the subset doesn't already exist, it will be created.
Implements ug::ISubsetHandler.
References assign_subset_impl(), ug::ISubsetHandler::elements_are_supported(), and ug::SHE_FACE.
virtual void ug::ISubsetHandler::assign_subset |
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(...).
void ug::ISubsetHandler::assign_subset |
void ug::ISubsetHandler::assign_subset | ( | class TIterator | ) |
|
virtual |
assigns a vertex to a subset.
If the subset doesn't already exist, it will be created.
Implements ug::ISubsetHandler.
References assign_subset_impl(), ug::ISubsetHandler::elements_are_supported(), and ug::SHE_VERTEX.
Referenced by ug::AdjustSubsetsForLgmNg(), ug::AssignCreaseVertices(), ug::AssignFaceInterfaceEdgesToSubsets(), ug::assignFaceSubsetToClosedFace(), ug::AssignFixedVertices(), ug::AssignSubsetsByInterfaceType(), ug::AssignSubsetsByLevel(), ug::AssignSubsetsByQuality(), ug::AssignSubsetsBySurfaceViewState(), ug::AssignTetrahedronAttributesByAspectRatio(), ug::AssignVolumeInterfaceFacesToSubsets(), ug::CheckValences(), ug::computeDiamondPointXCrossType(), ug::MultiGrid::create(), ug::MultiGrid::create_by_cloning(), ug::createDiamondFacesXCrossType(), ug::ArteExpandFracs3D::createNewElements(), ug::createNewFacesForExtXCrossFracs(), ug::determineOrderOfFaces(), ug::MultiGrid::element_created(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExpandFractures3d(), ug::expandSingleFractureAtGivenSide(), ug::expandSingleFractureAtGivenSide< VecVertexOfFaceInfo >(), ug::ExtrudeCylinder(), ug::MarkFixedCreaseVertices(), ug::Partitioner_DynamicBisection< TElem, dim >::partition(), ug::PartitionDomain_MetisKWay(), ug::PartitionElements_RegularGrid(), ug::PartitionGrid_MetisKway(), ug::PartitionMultiGrid_MetisKway(), ug::PartitionMultiGridLevel_MetisKway(), ug::PartitionMultiGridLevel_ParmetisKway(), ug::Partitioner_DynamicBisection< TElem, dim >::perform_bisection(), ug::PerformRetetrahedralization(), ug::ClusterElementStacks< elem_t, vector_t >::post_process(), ug::SmoothPartitionBounds< elem_t >::post_process(), 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::SavePartitionMapToFile(), ug::SeparateFaceSubsetsByNormal(), ug::SeparateSubsetsByLowerDimSeparators(), ug::SplitIrregularManifoldSubset(), ug::SplitIrregularPolyChain(), and ug::TriangleFill_SweepLine().
virtual void ug::ISubsetHandler::assign_subset |
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(...).
|
virtual |
assigns a volume to a subset.
If the subset doesn't already exist, it will be created.
Implements ug::ISubsetHandler.
References assign_subset_impl(), ug::ISubsetHandler::elements_are_supported(), and ug::SHE_VOLUME.
virtual void ug::ISubsetHandler::assign_subset |
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(...).
|
inlineprotected |
this method is called by ISubsetHandler when attachment_support has been enabled.
a helper method for the public assign_subset methods.
References get_list_iterator(), ug::ISubsetHandler::get_subset_index(), ug::ISubsetHandler::m_pGrid, ug::ISubsetHandler::subset_assigned(), and ug::ISubsetHandler::subset_required().
Referenced by assign_subset().
geometry_traits< TElem >::iterator ug::GridSubsetHandler::begin | ( | int | subsetIndex | ) |
returns the begin-iterator for the elements of type TElem in the given subset.
e.g. begin<Triangle>(0)
References num_subsets_in_list().
Referenced by ug::AdjustSubsetsForLgmNg(), ug::AssignCreaseVertices(), ug::AssignFaceInterfaceEdgesToSubsets(), ug::AssignFixedVertices(), ug::AssignVolumeInterfaceFacesToSubsets(), ug::MultiGrid::begin(), ug::ArteExpandFracs3D::countAndSelectFracBaseNums(), ug::DistributeExpansionMarks3D(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExportGridToUG(), ug::ExportGridToUG_2D(), ug::ArteExpandFracs3D::generateVertexInfos(), ug::MarkFixedCreaseVertices(), ug::SavePartitionMapToFile(), ug::SeparateFaceSubsetsByNormal(), ug::SplitIrregularManifoldSubset(), ug::SplitIrregularPolyChain(), ug::WriteLGM(), and ug::WriteNG().
geometry_traits< TElem >::const_iterator ug::GridSubsetHandler::begin | ( | int | subsetIndex | ) | const |
returns the begin-iterator for the elements of type TElem in the given subset.
e.g. begin<Triangle>(0)
References num_subsets_in_list().
|
inline |
returns the begin-iterator for the elements of type TElem in the given subset.
only for compatibility reasons with MGSubsetHandler. second argument is ignored. use i.e. as follows: begin<Triangle>(0, 0)
|
protected |
helper for change_subset_indices
References ug::ISubsetHandler::alter_subset_index().
|
protectedvirtual |
changes the subset-indices of all elements int the subset.
WARNING: subsets are not automatically changed accordingly. After termination Subset-Indices and Subset-Infos/iterators are asynchronous. Make sure to change subset-infos and iterators accordingly.
Implements ug::ISubsetHandler.
References ug::ISubsetHandler::elements_are_supported(), ug::ISubsetHandler::m_pGrid, ug::SHE_EDGE, ug::SHE_FACE, ug::SHE_VERTEX, and ug::SHE_VOLUME.
|
protected |
helper for collect_subset_elements
removes attachments
References detach_data(), and erase_subset_lists_impl().
Referenced by assign_grid(), and grid_to_be_destroyed().
void ug::GridSubsetHandler::clear_subset_elements | ( | int | subsetIndex | ) |
removes all elements of type TElem from the specified subset.
References ug::ISubsetHandler::alter_subset_index(), ug::SectionContainer< TValue, TContainer >::erase(), ug::ISubsetHandler::m_pGrid, and num_subsets_in_list().
|
protectedvirtual |
clears the element lists in the given subset. Does not alter any indices.
Implements ug::ISubsetHandler.
References ug::ISubsetHandler::m_pGrid.
|
inlinevirtual |
returns true if the subset contains edges
Implements ug::ISubsetHandler.
|
inlinevirtual |
returns true if the subset contains faces
Implements ug::ISubsetHandler.
|
inlinevirtual |
collects all vertices that are in the given subset.
Please consider using begin and end methods instead. If subset -1 is specified, the method has compexity O(n), where n is the number of vertices in the underlying grid.
Implements ug::ISubsetHandler.
|
inlinevirtual |
returns true if the subset contains volumes
Implements ug::ISubsetHandler.
|
protected |
detaches all attached data.
References ug::Grid::detach_from_edges(), ug::Grid::detach_from_faces(), ug::Grid::detach_from_vertices(), ug::Grid::detach_from_volumes(), ug::ISubsetHandler::elements_are_supported(), m_aSharedEntryEDGE, m_aSharedEntryFACE, m_aSharedEntryVOL, m_aSharedEntryVRT, ug::ISubsetHandler::m_pGrid, ug::SHE_EDGE, ug::SHE_FACE, ug::SHE_VERTEX, and ug::SHE_VOLUME.
Referenced by cleanup(), and ~GridSubsetHandler().
|
inline |
returns true if the subset-handler contains no elements of the given type.
Referenced by ug::ExportGridToUG_2D(), ug::PartitionDomain_MetisKWay(), ug::PartitionDomain_RegularGrid(), and ug::SplitIrregularManifoldSubset().
|
inline |
returns true if the subset-handler contains no elements at all.
|
inline |
|
inline |
returns true if the subset-handler contains no elements at all.
geometry_traits< TElem >::iterator ug::GridSubsetHandler::end | ( | int | subsetIndex | ) |
returns the end-iterator for the elements of type TElem in the given subset.
e.g. end<Triangle>(0)
References num_subsets_in_list().
Referenced by ug::AdjustSubsetsForLgmNg(), ug::AssignCreaseVertices(), ug::AssignFaceInterfaceEdgesToSubsets(), ug::AssignFixedVertices(), ug::AssignVolumeInterfaceFacesToSubsets(), ug::ArteExpandFracs3D::countAndSelectFracBaseNums(), ug::DistributeExpansionMarks3D(), ug::MultiGrid::end(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExportGridToUG(), ug::ExportGridToUG_2D(), ug::ArteExpandFracs3D::generateVertexInfos(), ug::MarkFixedCreaseVertices(), ug::SavePartitionMapToFile(), ug::SeparateFaceSubsetsByNormal(), ug::SplitIrregularManifoldSubset(), ug::SplitIrregularPolyChain(), ug::WriteLGM(), and ug::WriteNG().
geometry_traits< TElem >::const_iterator ug::GridSubsetHandler::end | ( | int | subsetIndex | ) | const |
returns the end-iterator for the elements of type TElem in the given subset.
e.g. end<Triangle>(0)
References num_subsets_in_list().
|
inline |
returns the end-iterator for the elements of type TElem in the given subset.
only for compatibility reasons with MGSubsetHandler. second argument is ignored. use i.e. as follows: end<Triangle>(0, 0)
|
protectedvirtual |
erases the subsets. Doesn't alter any indices.
Implements ug::ISubsetHandler.
References erase_subset_lists_impl().
|
protectedvirtual |
erases the subset but does not touch the subset-indices.
Implements ug::ISubsetHandler.
References m_subsets, and num_subsets_in_list().
|
protected |
non-virtual implementation of erase_subset_lists. Callable from destructor
References m_subsets.
Referenced by cleanup(), erase_subset_lists(), and ~GridSubsetHandler().
GridObjectCollection ug::GridSubsetHandler::get_grid_objects | ( | ) | const |
References ug::GridObjectCollection::add_level(), m_subsets, and num_subsets_in_list().
Referenced by ug::MultiGrid::get_grid_objects(), and ug::PrintGridElementNumbers().
|
virtual |
Returns the geometric object collection for the given subset.
Note that the GOC may contain multiple levels.
Implements ug::ISubsetHandler.
References m_subsets, num_subsets_in_list(), and ug::ISubsetHandler::subset_required().
Referenced by ug::MultiGrid::get_grid_objects().
|
inlineprotected |
returns the iterator at which the given element lies in the section container
This method may only be called if the element is in a subset != -1.
|
inlineprotected |
returns the iterator at which the given element lies in the section container
This method may only be called if the element is in a subset != -1.
|
inlineprotected |
returns the iterator at which the given element lies in the section container
This method may only be called if the element is in a subset != -1.
Referenced by assign_subset_impl().
|
inlineprotected |
returns the iterator at which the given element lies in the section container
This method may only be called if the element is in a subset != -1.
|
virtual |
perform cleanup
Reimplemented from ug::ISubsetHandler.
References cleanup(), ug::ISubsetHandler::grid(), ug::ISubsetHandler::grid_to_be_destroyed(), and ug::ISubsetHandler::m_pGrid.
|
protectedvirtual |
join the subset-lists but do not touch the subset-indices.
Implements ug::ISubsetHandler.
References ug::GridSubsetHandler::Subset::m_edges, ug::GridSubsetHandler::Subset::m_faces, m_subsets, ug::GridSubsetHandler::Subset::m_vertices, ug::GridSubsetHandler::Subset::m_volumes, boost::target(), and ug::SectionContainer< TValue, TContainer >::transfer_elements().
|
protectedvirtual |
moves the subset but does not touch the subset-indices.
Implements ug::ISubsetHandler.
References m_subsets.
uint ug::GridSubsetHandler::num |
returns the total number of elements
References num_subsets_in_list().
Referenced by ug::AdjustSubsetsForLgmNg(), ug::ExportGridToUG(), ug::ExportGridToUG_2D(), ug::MarkFixedCreaseVertices(), ug::MultiGrid::num(), ug::PerformRetetrahedralization(), ug::SplitIrregularManifoldSubset(), ug::SplitIrregularPolyChain(), and ug::SubsetIsRegularGrid().
uint ug::GridSubsetHandler::num | ( | int | subsetIndex | ) | const |
returns the number of elements in the given subset
References num_subsets_in_list().
|
inline |
returns the number of elements in the given subset
only for compatibility reasons with MGSubsetHandler. second argument is ignored.
uint ug::GridSubsetHandler::num_elements | ( | int | subsetIndex | ) | const |
returns the number of elements in the given subset
References num_subsets_in_list().
Referenced by ug::AssignFaceInterfaceEdgesToSubsets(), ug::AssignVolumeInterfaceFacesToSubsets(), ug::GetMaxSubsetIndex(), and ug::MakeSubsetsConsecutive().
|
inline |
returns the number of elements in the given subset
only for compatibility reasons with MGSubsetHandler. second argument is ignored.
|
inline |
returns number of levels (always 1)
only for compatibility reasons with MGSubsetHandler.
|
inlineprotected |
returns the number of subsets in the local list
Referenced by begin(), clear_subset_elements(), end(), erase_subset_lists(), get_grid_objects(), get_grid_objects_in_subset(), num(), num_elements(), and perform_self_tests().
GridSubsetHandler & ug::GridSubsetHandler::operator= | ( | const GridSubsetHandler & | sh | ) |
References ug::ISubsetHandler::operator=().
GridSubsetHandler & ug::GridSubsetHandler::operator= | ( | const ISubsetHandler & | sh | ) |
References ug::ISubsetHandler::operator=().
bool ug::GridSubsetHandler::perform_self_tests |
only for debug purposes
References ug::ISubsetHandler::get_subset_index(), LOG, and num_subsets_in_list().
|
inlineprotected |
returns the section container for the given type, subset and level
References ug::GridSubsetHandler::Subset::m_edges, ug::GridSubsetHandler::Subset::m_faces, m_subsets, ug::GridSubsetHandler::Subset::m_vertices, and ug::GridSubsetHandler::Subset::m_volumes.
Referenced by section_container().
|
inlineprotected |
returns the const section container for the given type, subset and level
References ug::GridSubsetHandler::Subset::m_edges, ug::GridSubsetHandler::Subset::m_faces, m_subsets, ug::GridSubsetHandler::Subset::m_vertices, ug::GridSubsetHandler::Subset::m_volumes, and section_container().
|
protectedvirtual |
swaps the subsets but does not touch the subset-indices.
Implements ug::ISubsetHandler.
References m_subsets.
|
protected |
Referenced by add_required_subset_lists(), assign_grid(), and detach_data().
|
protected |
Referenced by add_required_subset_lists(), assign_grid(), and detach_data().
|
protected |
Referenced by add_required_subset_lists(), assign_grid(), and detach_data().
|
protected |
Referenced by add_required_subset_lists(), assign_grid(), and detach_data().
|
protected |