ug4
neighborhood util

Enumerations

enum  ug::NeighborhoodType {
  ug::NHT_DEFAULT = 0 , ug::NHT_VERTEX_NEIGHBORS = 1 , ug::NHT_EDGE_NEIGHBORS = 1<<1 , ug::NHT_FACE_NEIGHBORS = 1<<2 ,
  ug::NHT_VOLUME_NEIGHBORS = 1<<3 , ug::NHT_ALL
}
 Constants to specify a neighborhood. More...
 

Functions

void ug::CollectAssociated (std::vector< Edge * > &vEdgesOut, Grid &grid, GridObject *obj, bool clearContainer=true)
 
void ug::CollectAssociated (std::vector< Face * > &vFacesOut, Grid &grid, Face *vol, bool clearContainer=true)
 Collects all faces. (Returns the face itself) More...
 
void ug::CollectAssociated (std::vector< Face * > &vFacesOut, Grid &grid, GridObject *obj, bool clearContainer=true)
 
void ug::CollectAssociated (std::vector< Face * > &vFacesOut, Grid &grid, Vertex *vrt, bool clearContainer=true)
 
UG_API void ug::CollectAssociated (std::vector< Vertex * > &vVertexOut, Grid &grid, GridObject *obj, bool clearContainer=true)
 
void ug::CollectAssociated (std::vector< Volume * > &vVolumesOut, Grid &grid, GridObject *obj, bool clearContainer=true)
 
void ug::CollectAssociated (std::vector< Volume * > &vVolumesOut, Grid &grid, Vertex *vrt, bool clearContainer=true)
 
void ug::CollectAssociated (std::vector< Volume * > &vVolumesOut, Grid &grid, Volume *vol, bool clearContainer=true)
 Collects all volumes. (Returns the volume itself) More...
 
UG_API void ug::CollectEdgesSorted (std::vector< Edge * > &vEdgesOut, Grid &grid, Edge *e, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given edge in the order defined by the reference elements. More...
 
UG_API void ug::CollectEdgesSorted (std::vector< Edge * > &vEdgesOut, Grid &grid, Face *f, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given face in the order defined by the reference elements. More...
 
void ug::CollectEdgesSorted (std::vector< Edge * > &vEdgesOut, Grid &grid, GridObject *obj, bool clearContainer=true)
 
UG_API void ug::CollectEdgesSorted (std::vector< Edge * > &vEdgesOut, Grid &grid, Vertex *v, bool clearContainer=true)
 Collects all edges of a vertex, thus, none. More...
 
UG_API void ug::CollectEdgesSorted (std::vector< Edge * > &vEdgesOut, Grid &grid, Volume *v, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given volume in the order defined by the reference elements. More...
 
UG_API void ug::CollectFaces (std::vector< Face * > &vFacesOut, Grid &grid, Face *v, bool clearContainer=true)
 Collects all faces. (Returns the face itself) More...
 
void ug::CollectFaces (std::vector< Face * > &vFacesOut, Grid &grid, Vertex *vrt, bool clearContainer)
 Collects all faces that exist in the given grid which contain the given vertex. More...
 
UG_API void ug::CollectFacesSorted (std::vector< Face * > &vFacesOut, Grid &grid, Edge *e, bool clearContainer=true)
 Collects all face that exist in the given grid are part of the given edge in the order defined by the reference elements. More...
 
UG_API void ug::CollectFacesSorted (std::vector< Face * > &vFacesOut, Grid &grid, Face *f, bool clearContainer=true)
 Collects all face that exist in the given grid are part of the given face in the order defined by the reference elements. More...
 
void ug::CollectFacesSorted (std::vector< Face * > &vFacesOut, Grid &grid, GridObject *obj, bool clearContainer=true)
 
UG_API void ug::CollectFacesSorted (std::vector< Face * > &vFacesOut, Grid &grid, Vertex *v, bool clearContainer=true)
 Collects all Faces of a Vertex, thus, none. More...
 
UG_API void ug::CollectFacesSorted (std::vector< Face * > &vFacesOut, Grid &grid, Volume *v, bool clearContainer=true)
 Collects all face that exist in the given grid are part of the given volume in the order defined by the reference elements. More...
 
void ug::CollectNeighborhood (std::vector< Face * > &facesOut, Grid &grid, Vertex *vrt, size_t range, bool clearContainer=true)
 Collects all neighbors in a given neighborhood of a vertex. More...
 
void ug::CollectNeighbors (std::vector< Edge * > &vNeighborsOut, Edge *e, Grid &grid, NeighborhoodType nbhType=NHT_VERTEX_NEIGHBORS)
 collects all edges that are connected to the given one. More...
 
void ug::CollectNeighbors (std::vector< Face * > &vNeighborsOut, Face *f, Grid &grid, NeighborhoodType nbhType=NHT_EDGE_NEIGHBORS)
 collects all faces that are connected to the given one. More...
 
void ug::CollectNeighbors (std::vector< Vertex * > &vNeighborsOut, Grid &grid, Vertex *vrt, uint nbhType=NHT_EDGE_NEIGHBORS, Grid::edge_traits::callback considerEdge=ConsiderAll(), Grid::face_traits::callback considerFace=ConsiderAll(), Grid::volume_traits::callback considerVol=ConsiderAll())
 Collects all vertices that are connected by elements of the specified type. More...
 
void ug::CollectNeighbors (std::vector< Volume * > &vNeighboursOut, Volume *v, Grid &grid, NeighborhoodType nbhType=NHT_FACE_NEIGHBORS)
 collects all volumes that are connected to the given one. More...
 
UG_API void ug::CollectVertices (std::vector< Vertex * > &vVertexOut, Grid &grid, GridObject *obj, bool clearContainer=true)
 
void ug::CollectVolumes (std::vector< Volume * > &vVolumesOut, Grid &grid, Vertex *vrt, bool clearContainer=true)
 Collects all volumes that exist in the given grid which contain the given vertex. More...
 
UG_API void ug::CollectVolumes (std::vector< Volume * > &vVolumesOut, Grid &grid, Volume *v, bool clearContainer=true)
 Collects all volumes. (Returns the volume itself) More...
 
void ug::CollectVertices (std::vector< Vertex * > &vVertexOut, Grid &grid, Vertex *v, bool clearContainer)
 Collects all vertices. More...
 
UG_API void ug::CollectAssociated (std::vector< Vertex * > &vVertexOut, Grid &grid, Vertex *v, bool clearContainer=true)
 Collects all vertices. More...
 
void ug::CollectVertices (std::vector< Vertex * > &vVertexOut, Grid &grid, Edge *e, bool clearContainer)
 Collects all vertices. More...
 
UG_API void ug::CollectAssociated (std::vector< Vertex * > &vVertexOut, Grid &grid, Edge *e, bool clearContainer=true)
 Collects all vertices. More...
 
void ug::CollectVertices (std::vector< Vertex * > &vVertexOut, Grid &grid, Face *f, bool clearContainer)
 Collects all vertices. More...
 
UG_API void ug::CollectAssociated (std::vector< Vertex * > &vVertexOut, Grid &grid, Face *f, bool clearContainer=true)
 Collects all vertices. More...
 
void ug::CollectVertices (std::vector< Vertex * > &vVertexOut, Grid &grid, Volume *v, bool clearContainer)
 Collects all vertices. More...
 
void ug::CollectAssociated (std::vector< Vertex * > &vVertexOut, Grid &grid, Volume *v, bool clearContainer=true)
 Collects all vertices. More...
 
size_t ug::NumVertices (Edge *elem)
 Returns the number of vertices of the given geometric object. More...
 
size_t ug::NumVertices (Face *elem)
 Returns the number of vertices of the given geometric object. More...
 
size_t ug::NumVertices (Volume *elem)
 Returns the number of vertices of the given geometric object. More...
 
void ug::CollectEdges (std::vector< Edge * > &vEdgesOut, Grid &grid, Vertex *vrt, bool clearContainer)
 Collects all edges which exist in the given grid and which are part of the given vertex. More...
 
void ug::CollectAssociated (std::vector< Edge * > &vEdgesOut, Grid &grid, Vertex *vrt, bool clearContainer=true)
 Collects all edges which exist in the given grid and which are part of the given vertex. More...
 
UG_API void ug::CollectEdges (std::vector< Edge * > &vEdgesOut, Grid &grid, Edge *e, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given edge. More...
 
void ug::CollectAssociated (std::vector< Edge * > &vEdgesOut, Grid &grid, Edge *e, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given edge. More...
 
UG_API void ug::CollectEdges (std::vector< Edge * > &vEdgesOut, Grid &grid, Face *f, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given face. More...
 
void ug::CollectAssociated (std::vector< Edge * > &vEdgesOut, Grid &grid, Face *f, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given face. More...
 
UG_API void ug::CollectEdges (std::vector< Edge * > &vEdgesOut, Grid &grid, Volume *v, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given volume. More...
 
void ug::CollectAssociated (std::vector< Edge * > &vEdgesOut, Grid &grid, Volume *v, bool clearContainer=true)
 Collects all edges that exist in the given grid are part of the given volume. More...
 
void ug::CollectFaces (std::vector< Face * > &vFacesOut, Grid &grid, Edge *e, bool clearContainer)
 Collects all faces that exist in the given grid which contain the given edge. More...
 
void ug::CollectAssociated (std::vector< Face * > &vFacesOut, Grid &grid, Edge *e, bool clearContainer=true)
 Collects all faces that exist in the given grid which contain the given edge. More...
 
UG_API void ug::CollectFaces (std::vector< Face * > &vFacesOut, Grid &grid, Volume *v, bool clearContainer=true)
 Collects all faces that exist in the given grid are part of the given volume. More...
 
void ug::CollectAssociated (std::vector< Face * > &vFacesOut, Grid &grid, Volume *v, bool clearContainer=true)
 Collects all faces that exist in the given grid are part of the given volume. More...
 
void ug::CollectVolumes (std::vector< Volume * > &vVolumesOut, Grid &grid, Edge *e, bool clearContainer)
 Collects all volumes that exist in the given grid which contain the given edge. More...
 
void ug::CollectAssociated (std::vector< Volume * > &vVolumesOut, Grid &grid, Edge *e, bool clearContainer=true)
 Collects all volumes that exist in the given grid which contain the given edge. More...
 
void ug::CollectVolumes (std::vector< Volume * > &vVolumesOut, Grid &grid, Face *f, bool clearContainer, bool ignoreAssociatedVolumes)
 Collects all volumes that exist in the given grid which contain the given face. More...
 
void ug::CollectAssociated (std::vector< Volume * > &vVolumesOut, Grid &grid, Face *f, bool clearContainer=true, bool ignoreAssociatedVolumes=false)
 Collects all volumes that exist in the given grid which contain the given face. More...
 
void ug::CollectVolumes (std::vector< Volume * > &vVolumesOut, Grid &grid, FaceDescriptor &fd, bool clearContainer)
 Collects all volumes that exist in the given grid which contain the given face. More...
 
void ug::CollectAssociated (std::vector< Volume * > &vVolumesOut, Grid &grid, FaceDescriptor &fd, bool clearContainer=true)
 Collects all volumes that exist in the given grid which contain the given face. More...
 

Detailed Description

Methods to access the neighborhood of geometric objects

Enumeration Type Documentation

◆ NeighborhoodType

Constants to specify a neighborhood.

Use arbitrary or combinations.

Enumerator
NHT_DEFAULT 
NHT_VERTEX_NEIGHBORS 
NHT_EDGE_NEIGHBORS 
NHT_FACE_NEIGHBORS 
NHT_VOLUME_NEIGHBORS 
NHT_ALL 

Function Documentation

◆ CollectAssociated() [1/21]

void ug::CollectAssociated ( std::vector< Edge * > &  vEdgesOut,
Grid grid,
Edge e,
bool  clearContainer = true 
)
inline

Collects all edges that exist in the given grid are part of the given edge.

This function simply returns the edge itself. It is added for completeness, such that the function can be used in template code.

Collects all edges that exist in the given grid are part of the given edge.

References ug::CollectEdges().

◆ CollectAssociated() [2/21]

void ug::CollectAssociated ( std::vector< Edge * > &  vEdgesOut,
Grid grid,
Face f,
bool  clearContainer = true 
)
inline

Collects all edges that exist in the given grid are part of the given face.

if FACEOPT_STORE_ASSOCIATED_EDGES is enabled then the algorithm uses associated_edges_begin(f), associated_edges_end(f) in order to find the edges. If not, GetEdge is used. This possibly involves auto-enabling of VRTOPT_STORE_ASSOCIATED_EDGES. The second option performs worse!

Collects all edges that exist in the given grid are part of the given face.

References ug::CollectEdges().

◆ CollectAssociated() [3/21]

void ug::CollectAssociated ( std::vector< Edge * > &  vEdgesOut,
Grid grid,
GridObject obj,
bool  clearContainer = true 
)
inline

◆ CollectAssociated() [4/21]

void ug::CollectAssociated ( std::vector< Edge * > &  vEdgesOut,
Grid grid,
Vertex vrt,
bool  clearContainer = true 
)
inline

Collects all edges which exist in the given grid and which are part of the given vertex.

Collects all edges that exist in the given grid are part of the given edge.

References ug::CollectEdges().

◆ CollectAssociated() [5/21]

void ug::CollectAssociated ( std::vector< Edge * > &  vEdgesOut,
Grid grid,
Volume v,
bool  clearContainer = true 
)
inline

Collects all edges that exist in the given grid are part of the given volume.

if VOLOPT_STORE_ASSOCIATED_EDGES is enabled then the algorithm uses associated_edges_begin(v), associated_edges_end(v) in order to find the edges. If not, GetEdge is used. This possibly involves auto-enabling of VRTOPT_STORE_ASSOCIATED_EDGES. The second option performs worse!

References ug::CollectEdges().

◆ CollectAssociated() [6/21]

void ug::CollectAssociated ( std::vector< Face * > &  vFacesOut,
Grid grid,
Edge e,
bool  clearContainer = true 
)
inline

Collects all faces that exist in the given grid which contain the given edge.

if EDGEOPT_STORE_ASSOCIATED_FACES is enabled then the algorithm uses associated_faces_begin(e), associated_faces_end(e) in order to find the faces. if not the algorithm iterates over all faces associated with one of the edges end-points and returns each face which contains the edge.

References ug::CollectFaces().

◆ CollectAssociated() [7/21]

void ug::CollectAssociated ( std::vector< Face * > &  vFacesOut,
Grid grid,
Face vol,
bool  clearContainer = true 
)
inline

Collects all faces. (Returns the face itself)

References ug::CollectFaces().

◆ CollectAssociated() [8/21]

void ug::CollectAssociated ( std::vector< Face * > &  vFacesOut,
Grid grid,
GridObject obj,
bool  clearContainer = true 
)
inline

◆ CollectAssociated() [9/21]

void ug::CollectAssociated ( std::vector< Face * > &  vFacesOut,
Grid grid,
Vertex vrt,
bool  clearContainer = true 
)
inline

References ug::CollectFaces().

◆ CollectAssociated() [10/21]

void ug::CollectAssociated ( std::vector< Face * > &  vFacesOut,
Grid grid,
Volume v,
bool  clearContainer = true 
)
inline

Collects all faces that exist in the given grid are part of the given volume.

if VOLOPT_STORE_ASSOCIATED_VOLUMES is enabled then the algorithm uses associated_faces_begin(v), associated_faces_end(v) in order to find the faces. If not, GetFace is used. This possibly involves auto-enabling of VRTOPT_STORE_ASSOCIATED_FACES. The second option performs worse!

References ug::CollectFaces().

◆ CollectAssociated() [11/21]

void ug::CollectAssociated ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
Edge e,
bool  clearContainer = true 
)
inline

Collects all vertices.

Collects all vertices that are part of the given edge.

This function returns a std::vector of pointers to all vertices, that are part of the given edge.

References ug::CollectVertices().

◆ CollectAssociated() [12/21]

void ug::CollectAssociated ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
Face f,
bool  clearContainer = true 
)
inline

Collects all vertices.

Collects all vertices that are part of the given face.

This function returns a std::vector of pointers to all vertices, that are part of the given face.

References ug::CollectVertices().

◆ CollectAssociated() [13/21]

void ug::CollectAssociated ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
GridObject obj,
bool  clearContainer = true 
)
inline

References ug::GridObject::base_object_id(), ug::EDGE, ug::FACE, ug::VERTEX, and ug::VOLUME.

Referenced by ug::GlobalFracturedMediaRefiner::assign_elem_and_side_marks(), ug::HangingNodeRefinerBase< TSelector >::assign_hnode_marks(), ug::AssignAssociatedSidesToSubsets(), ug::AssignSidesToSubsets(), ug::CalculateAspectRatio(), ug::CalculateBoundaryVertexNormal2D(), ug::CalculateBoundaryVertexNormal3D(), ug::CalculateHexahedronAspectRatio(), ug::CalculateSmoothCreaseManifoldPosInParentLevelLoopScheme(), ug::CalculateSmoothManifoldPosInParentLevelButterflyScheme(), ug::CalculateSmoothManifoldPosInParentLevelLoopScheme(), ug::CalculateTetrahedronAspectRatio(), ug::CalculateTetrahedronRootMeanSquareFaceArea(), ug::grid_unit_tests::CheckAssociatedEdgesOfVolumes(), ug::grid_unit_tests::CheckAssociatedVolumesOfEdges(), ug::SurfaceView::collect_associated(), ug::FracturedMediaRefiner< TGrid, TAPosition >::collect_objects_for_refine(), ug::CollectAssociated(), ug::CollectAssociatedSides(), ug::DistributeExpansionMarks3D(), ug::DistributedGridManager::end_element_deletion(), ug::GetFirstRegularVertex(), ug::MakeDelaunay(), ug::GlobalFracturedMediaRefiner::mark_sides_of_marked_top_level_elements(), ug::MarkForAdaption_VerticesInCube(), ug::MarkForAdaption_VerticesInSphereMaxLvl(), ug::MinimizeEdgeLength_SwapsOnly(), ug::PartitionElements_RegularGrid(), ug::PerformCollapses(), ug::QualityGridGeneration(), ug::GlobalFracturedMediaRefiner::save_marks_to_file(), ug::SelectAreaBoundary(), ug::SelectAssociated(), ug::SelectInterfaceElements(), ug::SelectionFill(), ug::SelectLinkedFlatAndDegeneratedFaces(), ug::SelectLinkedFlatFaces(), ug::SelectNonShadowsAdjacentToShadowsOnLevel(), ug::SeparateSubsetsByLowerDimSeparators(), ug::SplitIrregularManifoldSubset(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces(), and ug::VisitAreaBoundary().

◆ CollectAssociated() [14/21]

void ug::CollectAssociated ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
Vertex v,
bool  clearContainer = true 
)
inline

Collects all vertices.

Dummy-method. Puts the vertex itself into the given vector.

This function simply returns the vertex itself. It is added for completeness, such that the function can be used in template code.

References ug::CollectVertices().

◆ CollectAssociated() [15/21]

void ug::CollectAssociated ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
Volume v,
bool  clearContainer = true 
)
inline

Collects all vertices.

Collects all vertices that are part of the given volume.

This function returns a std::vector of pointers to all vertices, that are part of the given volume.

References ug::CollectVertices().

◆ CollectAssociated() [16/21]

void ug::CollectAssociated ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
Edge e,
bool  clearContainer = true 
)
inline

Collects all volumes that exist in the given grid which contain the given edge.

if EDGEOPT_STORE_ASSOCIATED_VOLUMES is enabled then the algorithm uses associated_volumes_begin(e), associated_volumes_end(e) in order to find the volumes. if not the algorithm iterates over all volumes associated with one of the edges end-points and returns each volume that contains the edge.

References ug::CollectVolumes().

◆ CollectAssociated() [17/21]

void ug::CollectAssociated ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
Face f,
bool  clearContainer = true,
bool  ignoreAssociatedVolumes = false 
)
inline

Collects all volumes that exist in the given grid which contain the given face.

if FACEOPT_STORE_ASSOCIATED_VOLUMES is enabled then the algorithm uses associated_volumes_begin(f), associated_volumes_end(f) in order to find the volumes. if not the algorithm iterates over all volumes associated with one of the faces end-points and returns each volume that contains the face.

References ug::CollectVolumes().

◆ CollectAssociated() [18/21]

void ug::CollectAssociated ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
FaceDescriptor fd,
bool  clearContainer = true 
)
inline

Collects all volumes that exist in the given grid which contain the given face.

if FACEOPT_STORE_ASSOCIATED_VOLUMES is enabled then the algorithm uses associated_volumes_begin(f), associated_volumes_end(f) in order to find the volumes. if not the algorithm iterates over all volumes associated with one of the faces end-points and returns each volume that contains the face.

References ug::CollectVolumes().

◆ CollectAssociated() [19/21]

void ug::CollectAssociated ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
GridObject obj,
bool  clearContainer = true 
)
inline

◆ CollectAssociated() [20/21]

void ug::CollectAssociated ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
Vertex vrt,
bool  clearContainer = true 
)
inline

References ug::CollectVolumes().

◆ CollectAssociated() [21/21]

void ug::CollectAssociated ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
Volume vol,
bool  clearContainer = true 
)
inline

Collects all volumes. (Returns the volume itself)

References ug::CollectVolumes().

◆ CollectEdges() [1/4]

UG_API void ug::CollectEdges ( vector< Edge * > &  vEdgesOut,
Grid grid,
Edge e,
bool  clearContainer 
)

Collects all edges that exist in the given grid are part of the given edge.

This function simply returns the edge itself. It is added for completeness, such that the function can be used in template code.

Collects all edges that exist in the given grid are part of the given edge.

References ug::Grid::num().

◆ CollectEdges() [2/4]

UG_API void ug::CollectEdges ( vector< Edge * > &  vEdgesOut,
Grid grid,
Face f,
bool  clearContainer 
)

Collects all edges that exist in the given grid are part of the given face.

if FACEOPT_STORE_ASSOCIATED_EDGES is enabled then the algorithm uses associated_edges_begin(f), associated_edges_end(f) in order to find the edges. If not, GetEdge is used. This possibly involves auto-enabling of VRTOPT_STORE_ASSOCIATED_EDGES. The second option performs worse!

Collects all edges that exist in the given grid are part of the given face.

References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::FACEOPT_STORE_ASSOCIATED_EDGES, ug::Grid::get_edge(), ug::Grid::num(), ug::Face::num_edges(), and ug::Grid::option_is_enabled().

◆ CollectEdges() [3/4]

◆ CollectEdges() [4/4]

UG_API void ug::CollectEdges ( std::vector< Edge * > &  vEdgesOut,
Grid grid,
Volume v,
bool  clearContainer = true 
)

Collects all edges that exist in the given grid are part of the given volume.

if VOLOPT_STORE_ASSOCIATED_EDGES is enabled then the algorithm uses associated_edges_begin(v), associated_edges_end(v) in order to find the edges. If not, GetEdge is used. This possibly involves auto-enabling of VRTOPT_STORE_ASSOCIATED_EDGES. The second option performs worse!

References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::Grid::get_edge(), ug::Grid::num(), ug::Volume::num_edges(), ug::Grid::option_is_enabled(), and ug::VOLOPT_STORE_ASSOCIATED_EDGES.

◆ CollectEdgesSorted() [1/5]

UG_API void ug::CollectEdgesSorted ( vector< Edge * > &  vEdgesOut,
Grid grid,
Edge e,
bool  clearContainer 
)

Collects all edges that exist in the given grid are part of the given edge in the order defined by the reference elements.

This function simply returns the edge itself. It is added for completeness, such that the function can be used in template code.

Collects all edges that exist in the given grid are part of the given edge in the order defined by the reference elements.

◆ CollectEdgesSorted() [2/5]

UG_API void ug::CollectEdgesSorted ( vector< Edge * > &  vEdgesOut,
Grid grid,
Face f,
bool  clearContainer 
)

Collects all edges that exist in the given grid are part of the given face in the order defined by the reference elements.

This function returns the associated edges of a face in an std::vector. The order of the edges in the vector is equal to the numbering of edges in the reference element for the face.

Collects all edges that exist in the given grid are part of the given face in the order defined by the reference elements.

References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::FACEOPT_AUTOGENERATE_EDGES, ug::FACEOPT_STORE_ASSOCIATED_EDGES, ug::Grid::get_edge(), ug::Grid::num(), ug::Face::num_edges(), and ug::Grid::option_is_enabled().

◆ CollectEdgesSorted() [3/5]

void ug::CollectEdgesSorted ( std::vector< Edge * > &  vEdgesOut,
Grid grid,
GridObject obj,
bool  clearContainer = true 
)
inline

◆ CollectEdgesSorted() [4/5]

◆ CollectEdgesSorted() [5/5]

UG_API void ug::CollectEdgesSorted ( std::vector< Edge * > &  vEdgesOut,
Grid grid,
Volume v,
bool  clearContainer = true 
)

Collects all edges that exist in the given grid are part of the given volume in the order defined by the reference elements.

This function returns the associated edges of a volume in an std::vector. The order of the edges in the vector is equal to the numbering of edges in the reference element for the volume.

References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::FACEOPT_AUTOGENERATE_EDGES, ug::Grid::get_edge(), ug::Grid::num(), ug::Volume::num_edges(), ug::Grid::option_is_enabled(), ug::VOLOPT_AUTOGENERATE_EDGES, ug::VOLOPT_AUTOGENERATE_FACES, and ug::VOLOPT_STORE_ASSOCIATED_EDGES.

◆ CollectFaces() [1/4]

UG_API void ug::CollectFaces ( std::vector< Face * > &  vFacesOut,
Grid grid,
Edge e,
bool  clearContainer = true 
)

Collects all faces that exist in the given grid which contain the given edge.

if EDGEOPT_STORE_ASSOCIATED_FACES is enabled then the algorithm uses associated_faces_begin(e), associated_faces_end(e) in order to find the faces. if not the algorithm iterates over all faces associated with one of the edges end-points and returns each face which contains the edge.

References ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::EDGEOPT_STORE_ASSOCIATED_FACES, ug::FaceContains(), ug::Grid::num(), ug::Grid::option_is_enabled(), and ug::EdgeVertices::vertex().

◆ CollectFaces() [2/4]

UG_API void ug::CollectFaces ( std::vector< Face * > &  vFacesOut,
Grid grid,
Face v,
bool  clearContainer = true 
)

Collects all faces. (Returns the face itself)

References ug::Grid::num().

◆ CollectFaces() [3/4]

◆ CollectFaces() [4/4]

UG_API void ug::CollectFaces ( std::vector< Face * > &  vFacesOut,
Grid grid,
Volume v,
bool  clearContainer = true 
)

Collects all faces that exist in the given grid are part of the given volume.

if VOLOPT_STORE_ASSOCIATED_VOLUMES is enabled then the algorithm uses associated_faces_begin(v), associated_faces_end(v) in order to find the faces. If not, GetFace is used. This possibly involves auto-enabling of VRTOPT_STORE_ASSOCIATED_FACES. The second option performs worse!

References ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::Grid::get_face(), ug::Grid::num(), ug::Volume::num_faces(), ug::Grid::option_is_enabled(), and ug::VOLOPT_STORE_ASSOCIATED_FACES.

◆ CollectFacesSorted() [1/5]

UG_API void ug::CollectFacesSorted ( vector< Face * > &  vFacesOut,
Grid grid,
Edge e,
bool  clearContainer 
)

Collects all face that exist in the given grid are part of the given edge in the order defined by the reference elements.

Collects all face that exist in the given grid are part of the given edge in the order defined by the reference elements.

◆ CollectFacesSorted() [2/5]

UG_API void ug::CollectFacesSorted ( vector< Face * > &  vFacesOut,
Grid grid,
Face f,
bool  clearContainer 
)

Collects all face that exist in the given grid are part of the given face in the order defined by the reference elements.

Collects all face that exist in the given grid are part of the given face in the order defined by the reference elements.

◆ CollectFacesSorted() [3/5]

void ug::CollectFacesSorted ( std::vector< Face * > &  vFacesOut,
Grid grid,
GridObject obj,
bool  clearContainer = true 
)
inline

◆ CollectFacesSorted() [4/5]

◆ CollectFacesSorted() [5/5]

UG_API void ug::CollectFacesSorted ( vector< Face * > &  vFacesOut,
Grid grid,
Volume v,
bool  clearContainer 
)

Collects all face that exist in the given grid are part of the given volume in the order defined by the reference elements.

This function returns the associated faces of a volume in an std::vector. The order of the faces in the vector is equal to the numbering of faces in the reference element for the volume.

Collects all face that exist in the given grid are part of the given volume in the order defined by the reference elements.

References ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::Grid::get_face(), ug::Grid::num(), ug::Volume::num_faces(), ug::Grid::option_is_enabled(), ug::VOLOPT_AUTOGENERATE_FACES, and ug::VOLOPT_STORE_ASSOCIATED_FACES.

◆ CollectNeighborhood()

void ug::CollectNeighborhood ( std::vector< Face * > &  facesOut,
Grid grid,
Vertex vrt,
size_t  range,
bool  clearContainer = true 
)

◆ CollectNeighbors() [1/4]

void ug::CollectNeighbors ( std::vector< Edge * > &  vNeighborsOut,
Edge e,
Grid grid,
NeighborhoodType  nbhType = NHT_VERTEX_NEIGHBORS 
)

collects all edges that are connected to the given one.

This method uses Grid::mark.

if nbhType != NHT_VERTEX_NEIGHBORS, then vNeighborsOut will be empty. This parameter is featured for compatibility reasons with the other CollectNeighbors methods.

References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::Grid::begin_marking(), ug::Grid::end_marking(), ug::Grid::is_marked(), ug::Grid::mark(), ug::NHT_DEFAULT, ug::NHT_VERTEX_NEIGHBORS, and ug::EdgeVertices::vertex().

◆ CollectNeighbors() [2/4]

void ug::CollectNeighbors ( std::vector< Face * > &  vNeighborsOut,
Face f,
Grid grid,
NeighborhoodType  nbhType = NHT_EDGE_NEIGHBORS 
)

collects all faces that are connected to the given one.

This method uses Grid::mark.

Using nbhType, you can choose which neighborhood you want to receive:

  • NHT_EDGE_NEIGHBORS (default): All faces that share an edge with the given one are regarded as neighbours.
  • NHT_VERTEX_NEIGHBORS: All faces that share a vertex with the given one are regarded as neighbours.

References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::Grid::begin_marking(), ug::EDGEOPT_STORE_ASSOCIATED_FACES, ug::Grid::end_marking(), ug::FACEOPT_AUTOGENERATE_EDGES, ug::FACEOPT_STORE_ASSOCIATED_EDGES, ug::Grid::is_marked(), ug::Grid::mark(), ug::NHT_DEFAULT, ug::NHT_EDGE_NEIGHBORS, ug::NHT_FACE_NEIGHBORS, ug::NHT_VERTEX_NEIGHBORS, ug::FaceVertices::num_vertices(), ug::Grid::option_is_enabled(), and ug::FaceVertices::vertices().

◆ CollectNeighbors() [3/4]

void ug::CollectNeighbors ( std::vector< Vertex * > &  vNeighborsOut,
Grid grid,
Vertex vrt,
uint  nbhType = NHT_EDGE_NEIGHBORS,
Grid::edge_traits::callback  considerEdge = ConsiderAll(),
Grid::face_traits::callback  considerFace = ConsiderAll(),
Grid::volume_traits::callback  considerVol = ConsiderAll() 
)

Collects all vertices that are connected by elements of the specified type.

This method uses Grid::mark.

You may specify the types of objects, which are regarded as connecting objects through or-combinations of constants enumerated in NeighborhoodType.

Through the consider... callbacks, you may specify whether a specific edge/face/volume shall be considered, when collecting neighbors of a vertex. By default, all geometric objects are considered.

Parameters
vNeighboursOutneighbor vertices
gridGrid
shSubset Handler
vrtvertex
subsetIndexsubset index
nbhTypeAccepts or-combinations of any NeighborhoodType enumerated constants.

References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::Grid::associated_volumes_begin(), ug::Grid::associated_volumes_end(), ug::Grid::begin_marking(), ug::Grid::end_marking(), ug::GetConnectedVertex(), ug::Grid::is_marked(), ug::Grid::mark(), ug::NHT_EDGE_NEIGHBORS, ug::NHT_FACE_NEIGHBORS, ug::NHT_VOLUME_NEIGHBORS, ug::FaceVertices::num_vertices(), ug::VolumeVertices::num_vertices(), ug::FaceVertices::vertices(), and ug::VolumeVertices::vertices().

Referenced by ug::ConstructDualGraph(), ug::ConstructDualGraphMG(), ug::ConstructDualGraphMGLevel(), ug::ConstructParallelDualGraphMGLevel(), ug::EdgeCollapseIsValid(), and ug::FindSubsetGroups().

◆ CollectNeighbors() [4/4]

void ug::CollectNeighbors ( std::vector< Volume * > &  vNeighboursOut,
Volume v,
Grid grid,
NeighborhoodType  nbhType = NHT_FACE_NEIGHBORS 
)

collects all volumes that are connected to the given one.

This method uses Grid::mark.

Using nbhType, you can choose which neighborhood you want to receive:

  • NHT_FACE_NEIGHBORS (default): All volumes that share a face with the given one are regarded as neighbors.
  • NHT_EDGE_NEIGHBORS: All volumes that share an edge with the given one are regarded as neighbors.
  • NHT_VERTEX_NEIGHBORS: All volumes that share a vertex with the given one are regarded as neighbors.

References ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::Grid::associated_volumes_begin(), ug::Grid::associated_volumes_end(), ug::Grid::begin_marking(), ug::Grid::end_marking(), ug::FACEOPT_STORE_ASSOCIATED_VOLUMES, ug::Grid::is_marked(), ug::Grid::mark(), ug::NHT_DEFAULT, ug::NHT_EDGE_NEIGHBORS, ug::NHT_FACE_NEIGHBORS, ug::NHT_VERTEX_NEIGHBORS, ug::VolumeVertices::num_vertices(), ug::Grid::option_is_enabled(), ug::VolumeVertices::vertices(), ug::VOLOPT_AUTOGENERATE_FACES, and ug::VOLOPT_STORE_ASSOCIATED_FACES.

◆ CollectVertices() [1/5]

UG_API void ug::CollectVertices ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
Edge e,
bool  clearContainer = true 
)

Collects all vertices.

Collects all vertices that are part of the given edge.

This function returns a std::vector of pointers to all vertices, that are part of the given edge.

References ug::EdgeVertices::num_vertices(), and ug::EdgeVertices::vertex().

◆ CollectVertices() [2/5]

UG_API void ug::CollectVertices ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
Face f,
bool  clearContainer = true 
)

Collects all vertices.

Collects all vertices that are part of the given face.

This function returns a std::vector of pointers to all vertices, that are part of the given face.

References ug::FaceVertices::num_vertices(), and ug::FaceVertices::vertices().

◆ CollectVertices() [3/5]

void ug::CollectVertices ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
GridObject obj,
bool  clearContainer = true 
)
inline

◆ CollectVertices() [4/5]

◆ CollectVertices() [5/5]

UG_API void ug::CollectVertices ( std::vector< Vertex * > &  vVertexOut,
Grid grid,
Volume v,
bool  clearContainer = true 
)

Collects all vertices.

Collects all vertices that are part of the given volume.

This function returns a std::vector of pointers to all vertices, that are part of the given volume.

References ug::VolumeVertices::num_vertices(), and ug::VolumeVertices::vertices().

◆ CollectVolumes() [1/5]

UG_API void ug::CollectVolumes ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
Edge e,
bool  clearContainer = true 
)

Collects all volumes that exist in the given grid which contain the given edge.

if EDGEOPT_STORE_ASSOCIATED_VOLUMES is enabled then the algorithm uses associated_volumes_begin(e), associated_volumes_end(e) in order to find the volumes. if not the algorithm iterates over all volumes associated with one of the edges end-points and returns each volume that contains the edge.

References ug::Grid::associated_volumes_begin(), ug::Grid::associated_volumes_end(), ug::EDGEOPT_STORE_ASSOCIATED_VOLUMES, ug::Grid::num(), ug::Grid::option_is_enabled(), ug::EdgeVertices::vertex(), and ug::VolumeContains().

◆ CollectVolumes() [2/5]

void ug::CollectVolumes ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
Face f,
bool  clearContainer = true,
bool  ignoreAssociatedVolumes = false 
)

Collects all volumes that exist in the given grid which contain the given face.

if FACEOPT_STORE_ASSOCIATED_VOLUMES is enabled then the algorithm uses associated_volumes_begin(f), associated_volumes_end(f) in order to find the volumes. if not the algorithm iterates over all volumes associated with one of the faces end-points and returns each volume that contains the face.

References ug::Grid::associated_volumes_begin(), ug::Grid::associated_volumes_end(), ug::FACEOPT_STORE_ASSOCIATED_VOLUMES, ug::Grid::num(), ug::Grid::option_is_enabled(), ug::FaceVertices::vertex(), and ug::VolumeContains().

◆ CollectVolumes() [3/5]

UG_API void ug::CollectVolumes ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
FaceDescriptor fd,
bool  clearContainer 
)

Collects all volumes that exist in the given grid which contain the given face.

References ug::Grid::associated_volumes_begin(), ug::Grid::associated_volumes_end(), ug::Grid::num(), ug::FaceDescriptor::vertex(), and ug::VolumeContains().

◆ CollectVolumes() [4/5]

◆ CollectVolumes() [5/5]

UG_API void ug::CollectVolumes ( std::vector< Volume * > &  vVolumesOut,
Grid grid,
Volume v,
bool  clearContainer = true 
)

Collects all volumes. (Returns the volume itself)

References ug::Grid::num().

◆ NumVertices() [1/3]

size_t ug::NumVertices ( Edge elem)
inline

Returns the number of vertices of the given geometric object.

Valid template arguments are Vertex, Edge, Face, Volume and derived types.

unifies access to geometric objects.

References ug::EdgeVertices::num_vertices().

◆ NumVertices() [2/3]

size_t ug::NumVertices ( Face elem)
inline

Returns the number of vertices of the given geometric object.

Valid template arguments are Vertex, Edge, Face, Volume and derived types.

unifies access to geometric objects.

References ug::FaceVertices::num_vertices().

◆ NumVertices() [3/3]

size_t ug::NumVertices ( Volume elem)
inline

Returns the number of vertices of the given geometric object.

Valid template arguments are Vertex, Edge, Face, Volume and derived types.

unifies access to geometric objects.

References ug::VolumeVertices::num_vertices().