33 #ifndef __H__LIB_GRID__GRID_UTIL_IMPL__
34 #define __H__LIB_GRID__GRID_UTIL_IMPL__
61 template <
class TVrtContainer1,
class TVrtContainer2>
63 const TVrtContainer2& con2)
65 int con1Size = (int)con1.size();
67 if(con1Size != con2.size())
70 for(
int i = 0; i < con1Size; ++i)
73 for(j = 0; j < con1Size; ++j)
75 if(con1[i] == con2[j])
101 UG_ASSERT(i < 1,
"A Vertex has only one vertex");
152 Grid& grid,
Edge* e,
bool clearContainer)
158 Grid& grid,
Face* f,
bool clearContainer)
180 throw(
UGError(
"GeomObject type not known."));
192 Grid& grid,
Edge* e,
bool clearContainer)
198 Grid& grid,
Face* f,
bool clearContainer)
220 throw(
UGError(
"GeomObject type not known."));
232 Grid& grid,
Edge* e,
bool clearContainer)
238 Grid& grid,
Face* f,
bool clearContainer)
260 throw(
UGError(
"GeomObject type not known."));
272 Grid& grid,
Edge* e,
bool clearContainer)
278 Grid& grid,
Face* f,
bool clearContainer,
279 bool ignoreAssociatedVolumes)
281 CollectVolumes(vVolumesOut, grid, f, clearContainer, ignoreAssociatedVolumes);
307 throw(
UGError(
"GeomObject type not known."));
323 throw(
UGError(
"GeomObject type not known."));
336 throw(
UGError(
"GeomObject type not known."));
349 throw(
UGError(
"GeomObject type not known."));
Base-class for edges.
Definition: grid_base_objects.h:397
holds the vertices of an Edge or an EdgeDescriptor.
Definition: grid_base_objects.h:362
virtual Vertex * vertex(size_t index) const
Definition: grid_base_objects.h:366
virtual size_t num_vertices() const
Definition: grid_base_objects.h:368
Can be queried for the edges and vertices of a face.
Definition: grid_base_objects.h:684
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
virtual Vertex * vertex(size_t index) const
Definition: grid_base_objects.h:486
virtual size_t num_vertices() const
Definition: grid_base_objects.h:488
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
virtual int base_object_id() const =0
Instances of this class or of derived classes are thrown if errors arise.
Definition: error.h:104
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
virtual Vertex * vertex(size_t index) const
Definition: grid_base_objects.h:727
virtual size_t num_vertices() const
Definition: grid_base_objects.h:729
bool EdgeContains(EdgeVertices *e, Vertex *vrt)
Definition: grid_util_impl.hpp:45
bool CompareVertices(const FaceVertices *fv1, const FaceVertices *fv2)
Checks whether fv1 and fv2 contain the same vertices.
Definition: grid_util.cpp:44
void CollectVolumes(std::vector< Volume * > &vVolumesOut, Grid &grid, Vertex *vrt, bool clearContainer)
Collects all volumes that exist in the given grid which contain the given vertex.
Definition: grid_util.cpp:592
void CollectEdgesSorted(vector< Edge * > &vEdgesOut, Grid &grid, Vertex *v, bool clearContainer)
Collects all edges of a vertex, thus, none.
Definition: grid_util.cpp:205
void 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.
Definition: grid_util.cpp:295
void CollectFacesSorted(vector< Face * > &vFacesOut, Grid &grid, Vertex *v, bool clearContainer)
Collects all Faces of a Vertex, thus, none.
Definition: grid_util.cpp:401
void 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.
Definition: grid_util.cpp:458
void CollectVertices(std::vector< Vertex * > &vVertexOut, Grid &grid, Vertex *v, bool clearContainer)
Collects all vertices.
Definition: grid_util.cpp:141
UG_API void CollectAssociated(std::vector< Vertex * > &vVertexOut, Grid &grid, GridObject *obj, bool clearContainer=true)
Definition: grid_util_impl.hpp:169
UG_API bool CompareVertexContainer(const TVrtContainer1 &con1, const TVrtContainer2 &con2)
compares vertices in a container
Definition: grid_util_impl.hpp:62
Vertex * GetVertex(Vertex *v, size_t i)
returns the i'th vertex of a vertex
Definition: grid_util_impl.hpp:99
size_t NumVertices(Vertex *elem)
Returns the number of vertices of the given geometric object.
Definition: grid_util_impl.hpp:123
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
unsigned int uint
Definition: types.h:114
int num_vertices(ug::BidirectionalMatrix< T > const &M)
Definition: bidirectional_boost.h:70
@ VOLUME
Definition: grid_base_objects.h:63
@ VERTEX
Definition: grid_base_objects.h:60
@ EDGE
Definition: grid_base_objects.h:61
@ FACE
Definition: grid_base_objects.h:62