ug4
grid_objects_3d.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2015: G-CSC, Goethe University Frankfurt
3  * Author: Sebastian Reiter
4  *
5  * This file is part of UG4.
6  *
7  * UG4 is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License version 3 (as published by the
9  * Free Software Foundation) with the following additional attribution
10  * requirements (according to LGPL/GPL v3 §7):
11  *
12  * (1) The following notice must be displayed in the Appropriate Legal Notices
13  * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14  *
15  * (2) The following notice must be displayed at a prominent place in the
16  * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17  *
18  * (3) The following bibliography is recommended for citation and must be
19  * preserved in all covered files:
20  * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21  * parallel geometric multigrid solver on hierarchically distributed grids.
22  * Computing and visualization in science 16, 4 (2013), 151-164"
23  * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24  * flexible software system for simulating pde based models on high performance
25  * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU Lesser General Public License for more details.
31  */
32 
33 #ifndef __H__UG__grid_objects_3d__
34 #define __H__UG__grid_objects_3d__
35 
36 #include "../grid/grid.h"
37 #include "common/math/ugmath.h"
38 #include "common/assert.h"
39 #include "grid_objects_0d.h"
40 #include "grid_objects_1d.h"
41 #include "grid_objects_2d.h"
42 
43 namespace ug
44 {
45 
48 
50 {
51  CSVOL_NONE = -1,
57 };
58 
60 // TetrahedronDescriptor
62 
68 {
69  public:
73  TetrahedronDescriptor(Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4);
74 
75  inline uint num_vertices() const {return 4;}
76  inline Vertex* vertex(size_t index) const {return m_vertex[index];}
77 
78  protected:
79  Vertex* m_vertex[4];
80 };
81 
83 // Tetrahedron
85 
90 class UG_API Tetrahedron : public Volume
91 {
92  public:
93  typedef Volume BaseClass;
94 
95  static const size_t NUM_VERTICES = 4;
96 
97  public:
98  inline static bool type_match(GridObject* pObj) {return dynamic_cast<Tetrahedron*>(pObj) != NULL;}
99 
102  Tetrahedron(Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4);
103 
104  virtual GridObject* create_empty_instance() const {return new Tetrahedron;}
105 
106  virtual Vertex* vertex(size_t index) const {return m_vertices[index];}
107  virtual ConstVertexArray vertices() const {return m_vertices;}
108  virtual size_t num_vertices() const {return 4;}
109 
110  virtual EdgeDescriptor edge_desc(int index) const;
111  virtual void edge_desc(int index, EdgeDescriptor& edOut) const;
112  virtual uint num_edges() const;
113 
114  virtual FaceDescriptor face_desc(int index) const;
115  virtual void face_desc(int index, FaceDescriptor& fdOut) const;
116  virtual uint num_faces() const;
117 
118  virtual Edge* create_edge(int index);
119  virtual Face* create_face(int index);
120 
121  virtual void get_vertex_indices_of_edge(size_t& ind1Out,
122  size_t& ind2Out,
123  size_t edgeInd) const;
124 
125  virtual void get_vertex_indices_of_face(std::vector<size_t>& indsOut,
126  size_t side) const;
127 
128  virtual int get_edge_index_from_vertices( const size_t vi0,
129  const size_t vi1) const;
130 
131  virtual int get_face_edge_index ( const size_t faceInd,
132  const size_t faceEdgeInd) const;
133 
134  virtual std::pair<GridBaseObjectId, int> get_opposing_object(Vertex* vrt) const;
135 
137 
139  virtual bool refine(std::vector<Volume*>& vNewVolumesOut,
140  Vertex** ppNewVertexOut,
141  Vertex** newEdgeVertices,
142  Vertex** newFaceVertices,
143  Vertex* newVolumeVertex,
144  const Vertex& prototypeVertex,
145  Vertex** pSubstituteVertices = NULL,
146  vector3* corners = NULL,
147  bool* isSnapPoint = NULL);
148 
149  virtual bool is_regular_ref_rule(int edgeMarks) const;
150 
151  virtual bool collapse_edge(std::vector<Volume*>& vNewVolumesOut,
152  int edgeIndex, Vertex* newVertex,
153  std::vector<Vertex*>* pvSubstituteVertices = NULL);
154 
155  virtual void get_flipped_orientation(VolumeDescriptor& vdOut) const;
156 
157  virtual int container_section() const
158  {return CSVOL_TETRAHEDRON;}
159 
161  {return ROID_TETRAHEDRON;}
162 
163  protected:
164  virtual void set_vertex(uint index, Vertex* pVrt) {m_vertices[index] = pVrt;}
165 
166  protected:
167  Vertex* m_vertices[4];
168 };
169 
170 template <>
172 {
173  public:
177 
180 
181  enum
182  {
183  CONTAINER_SECTION = CSVOL_TETRAHEDRON,
184  BASE_OBJECT_ID = VOLUME
185  };
186  static const ReferenceObjectID REFERENCE_OBJECT_ID = ROID_TETRAHEDRON;
187 };
188 
191 
192 
193 
195 // HexahedronDescriptor
197 
203 {
204  public:
208  HexahedronDescriptor(Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4,
209  Vertex* v5, Vertex* v6, Vertex* v7, Vertex* v8);
210 
211  inline uint num_vertices() const {return 8;}
212  inline Vertex* vertex(size_t index) const {return m_vertex[index];}
213 
214  protected:
215  Vertex* m_vertex[8];
216 };
217 
219 // Hexahedron
221 
226 class UG_API Hexahedron : public Volume
227 {
228  public:
229  typedef Volume BaseClass;
230 
231  static const size_t NUM_VERTICES = 8;
232 
233  public:
234  inline static bool type_match(GridObject* pObj) {return dynamic_cast<Hexahedron*>(pObj) != NULL;}
235 
237  Hexahedron(const HexahedronDescriptor& td);
238  Hexahedron(Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4,
239  Vertex* v5, Vertex* v6, Vertex* v7, Vertex* v8);
240 
241  virtual GridObject* create_empty_instance() const {return new Hexahedron;}
242 
243  virtual Vertex* vertex(size_t index) const {return m_vertices[index];}
244  virtual ConstVertexArray vertices() const {return m_vertices;}
245  virtual size_t num_vertices() const {return 8;}
246 
247  virtual EdgeDescriptor edge_desc(int index) const;
248  virtual void edge_desc(int index, EdgeDescriptor& edOut) const;
249  virtual uint num_edges() const;
250 
251  virtual FaceDescriptor face_desc(int index) const;
252  virtual void face_desc(int index, FaceDescriptor& fdOut) const;
253  virtual uint num_faces() const;
254 
255  virtual Edge* create_edge(int index);
256  virtual Face* create_face(int index);
257 
258  virtual void get_vertex_indices_of_edge(size_t& ind1Out,
259  size_t& ind2Out,
260  size_t edgeInd) const;
261 
262  virtual void get_vertex_indices_of_face(std::vector<size_t>& indsOut,
263  size_t side) const;
264 
265  virtual int get_edge_index_from_vertices( const size_t vi0,
266  const size_t vi1) const;
267 
268  virtual int get_face_edge_index ( const size_t faceInd,
269  const size_t faceEdgeInd) const;
270 
271  virtual bool get_opposing_side(FaceVertices* f, FaceDescriptor& fdOut) const;
272 
273  virtual std::pair<GridBaseObjectId, int> get_opposing_object(Vertex* vrt) const;
274 
276  virtual bool refine(std::vector<Volume*>& vNewVolumesOut,
277  Vertex** ppNewVertexOut,
278  Vertex** newEdgeVertices,
279  Vertex** newFaceVertices,
280  Vertex* newVolumeVertex,
281  const Vertex& prototypeVertex,
282  Vertex** pSubstituteVertices = NULL,
283  vector3* corners = NULL,
284  bool* isSnapPoint = NULL);
285 
286  virtual bool is_regular_ref_rule(int edgeMarks) const;
287 
288  virtual bool collapse_edge(std::vector<Volume*>& vNewVolumesOut,
289  int edgeIndex, Vertex* newVertex,
290  std::vector<Vertex*>* pvSubstituteVertices = NULL);
291 
292  virtual void get_flipped_orientation(VolumeDescriptor& vdOut) const;
293 
294  virtual int container_section() const {return CSVOL_HEXAHEDRON;}
296 
297  protected:
298  virtual void set_vertex(uint index, Vertex* pVrt) {m_vertices[index] = pVrt;}
299 
300  protected:
301  Vertex* m_vertices[8];
302 };
303 
304 template <>
306 {
307  public:
311 
314 
315  enum
316  {
317  CONTAINER_SECTION = CSVOL_HEXAHEDRON,
318  BASE_OBJECT_ID = VOLUME
319  };
320  static const ReferenceObjectID REFERENCE_OBJECT_ID = ROID_HEXAHEDRON;
321 };
322 
325 
326 
328 // PrismDescriptor
330 
336 {
337  public:
339  PrismDescriptor(const PrismDescriptor& td);
340  PrismDescriptor(const VolumeVertices& vv);
341  PrismDescriptor(Vertex* v1, Vertex* v2, Vertex* v3,
342  Vertex* v4, Vertex* v5, Vertex* v6);
343 
344  inline uint num_vertices() const {return 6;}
345  inline Vertex* vertex(size_t index) const {return m_vertex[index];}
346 
347  protected:
348  Vertex* m_vertex[6];
349 };
350 
352 // Prism
354 
359 class UG_API Prism : public Volume
360 {
361  public:
362  typedef Volume BaseClass;
363 
364  static const size_t NUM_VERTICES = 6;
365 
366  public:
367  inline static bool type_match(GridObject* pObj) {return dynamic_cast<Prism*>(pObj) != NULL;}
368 
369  Prism() {}
370  Prism(const PrismDescriptor& td);
371  Prism(Vertex* v1, Vertex* v2, Vertex* v3,
372  Vertex* v4, Vertex* v5, Vertex* v6);
373 
374  virtual GridObject* create_empty_instance() const {return new Prism;}
375 
376  virtual Vertex* vertex(size_t index) const {return m_vertices[index];}
377  virtual ConstVertexArray vertices() const {return m_vertices;}
378  virtual size_t num_vertices() const {return 6;}
379 
380  virtual EdgeDescriptor edge_desc(int index) const;
381  virtual void edge_desc(int index, EdgeDescriptor& edOut) const;
382  virtual uint num_edges() const;
383 
384  virtual FaceDescriptor face_desc(int index) const;
385  virtual void face_desc(int index, FaceDescriptor& fdOut) const;
386  virtual uint num_faces() const;
387 
388  virtual Edge* create_edge(int index);
389  virtual Face* create_face(int index);
390 
391  virtual void get_vertex_indices_of_edge(size_t& ind1Out,
392  size_t& ind2Out,
393  size_t edgeInd) const;
394 
395  virtual void get_vertex_indices_of_face(std::vector<size_t>& indsOut,
396  size_t side) const;
397 
398  virtual int get_edge_index_from_vertices( const size_t vi0,
399  const size_t vi1) const;
400 
401  virtual int get_face_edge_index ( const size_t faceInd,
402  const size_t faceEdgeInd) const;
403 
404  virtual bool get_opposing_side(FaceVertices* f, FaceDescriptor& fdOut) const;
405 
406  virtual std::pair<GridBaseObjectId, int> get_opposing_object(Vertex* vrt) const;
407 
409  virtual bool refine(std::vector<Volume*>& vNewVolumesOut,
410  Vertex** ppNewVertexOut,
411  Vertex** newEdgeVertices,
412  Vertex** newFaceVertices,
413  Vertex* newVolumeVertex,
414  const Vertex& prototypeVertex,
415  Vertex** pSubstituteVertices = NULL,
416  vector3* corners = NULL,
417  bool* isSnapPoint = NULL);
418 
419  virtual bool is_regular_ref_rule(int edgeMarks) const;
420 
421  virtual bool collapse_edge(std::vector<Volume*>& vNewVolumesOut,
422  int edgeIndex, Vertex* newVertex,
423  std::vector<Vertex*>* pvSubstituteVertices = NULL);
424 
425  virtual void get_flipped_orientation(VolumeDescriptor& vdOut) const;
426 
427  virtual int container_section() const {return CSVOL_PRISM;}
429 
430  protected:
431  virtual void set_vertex(uint index, Vertex* pVrt) {m_vertices[index] = pVrt;}
432 
433  protected:
434  Vertex* m_vertices[6];
435 };
436 
437 template <>
439 {
440  public:
444 
447 
448  enum
449  {
450  CONTAINER_SECTION = CSVOL_PRISM,
451  BASE_OBJECT_ID = VOLUME
452  };
453  static const ReferenceObjectID REFERENCE_OBJECT_ID = ROID_PRISM;
454 };
455 
458 
459 
461 // PyramidDescriptor
463 
469 {
470  public:
474  PyramidDescriptor(Vertex* v1, Vertex* v2, Vertex* v3,
475  Vertex* v4, Vertex* v5);
476 
477  inline uint num_vertices() const {return 5;}
478  inline Vertex* vertex(size_t index) const {return m_vertex[index];}
479 
480  protected:
481  Vertex* m_vertex[5];
482 };
483 
485 // Pyramid
487 
492 class UG_API Pyramid : public Volume
493 {
494  public:
495  typedef Volume BaseClass;
496 
497  static const size_t NUM_VERTICES = 5;
498 
499  public:
500  inline static bool type_match(GridObject* pObj) {return dynamic_cast<Pyramid*>(pObj) != NULL;}
501 
502  Pyramid() {}
503  Pyramid(const PyramidDescriptor& td);
504  Pyramid(Vertex* v1, Vertex* v2, Vertex* v3,
505  Vertex* v4, Vertex* v5);
506 
507  virtual GridObject* create_empty_instance() const {return new Pyramid;}
508 
509  virtual Vertex* vertex(size_t index) const {return m_vertices[index];}
510  virtual ConstVertexArray vertices() const {return m_vertices;}
511  virtual size_t num_vertices() const {return 5;}
512 
513  virtual EdgeDescriptor edge_desc(int index) const;
514  virtual void edge_desc(int index, EdgeDescriptor& edOut) const;
515  virtual uint num_edges() const;
516 
517  virtual FaceDescriptor face_desc(int index) const;
518  virtual void face_desc(int index, FaceDescriptor& fdOut) const;
519  virtual uint num_faces() const;
520 
521  virtual Edge* create_edge(int index);
522  virtual Face* create_face(int index);
523 
524  virtual void get_vertex_indices_of_edge(size_t& ind1Out,
525  size_t& ind2Out,
526  size_t edgeInd) const;
527 
528  virtual void get_vertex_indices_of_face(std::vector<size_t>& indsOut,
529  size_t side) const;
530 
531  virtual int get_edge_index_from_vertices( const size_t vi0,
532  const size_t vi1) const;
533 
534  virtual int get_face_edge_index ( const size_t faceInd,
535  const size_t faceEdgeInd) const;
536 
537  virtual std::pair<GridBaseObjectId, int> get_opposing_object(Vertex* vrt) const;
538 
540  virtual bool refine(std::vector<Volume*>& vNewVolumesOut,
541  Vertex** ppNewVertexOut,
542  Vertex** newEdgeVertices,
543  Vertex** newFaceVertices,
544  Vertex* newVolumeVertex,
545  const Vertex& prototypeVertex,
546  Vertex** pSubstituteVertices = NULL,
547  vector3* corners = NULL,
548  bool* isSnapPoint = NULL);
549 
550  virtual bool is_regular_ref_rule(int edgeMarks) const;
551 
552  virtual bool collapse_edge(std::vector<Volume*>& vNewVolumesOut,
553  int edgeIndex, Vertex* newVertex,
554  std::vector<Vertex*>* pvSubstituteVertices = NULL);
555 
556  virtual void get_flipped_orientation(VolumeDescriptor& vdOut) const;
557 
558  virtual int container_section() const {return CSVOL_PYRAMID;}
560 
561  protected:
562  virtual void set_vertex(uint index, Vertex* pVrt) {m_vertices[index] = pVrt;}
563 
564  protected:
565  Vertex* m_vertices[5];
566 };
567 
568 template <>
570 {
571  public:
575 
578 
579  enum
580  {
581  CONTAINER_SECTION = CSVOL_PYRAMID,
582  BASE_OBJECT_ID = VOLUME
583  };
584  static const ReferenceObjectID REFERENCE_OBJECT_ID = ROID_PYRAMID;
585 };
586 
589 
590 
591 
593 // OctahedronDescriptor
595 
602 {
603  public:
607  OctahedronDescriptor(Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4, Vertex* v5, Vertex* v6);
608 
609  inline uint num_vertices() const {return 6;}
610  inline Vertex* vertex(size_t index) const {return m_vertex[index];}
611 
612  protected:
613  Vertex* m_vertex[6];
614 };
615 
616 
618 // Octahedron
620 
625 class UG_API Octahedron : public Volume
626 {
627  public:
628  typedef Volume BaseClass;
629 
630  static const size_t NUM_VERTICES = 6;
631 
632  public:
633  inline static bool type_match(GridObject* pObj) {return dynamic_cast<Octahedron*>(pObj) != NULL;}
634 
636  Octahedron(const OctahedronDescriptor& td);
637  Octahedron(Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4, Vertex* v5, Vertex* v6);
638 
639  virtual GridObject* create_empty_instance() const {return new Octahedron;}
640 
641  virtual Vertex* vertex(size_t index) const {return m_vertices[index];}
642  virtual ConstVertexArray vertices() const {return m_vertices;}
643  virtual size_t num_vertices() const {return 6;}
644 
645  virtual EdgeDescriptor edge_desc(int index) const;
646  virtual void edge_desc(int index, EdgeDescriptor& edOut) const;
647  virtual uint num_edges() const;
648 
649  virtual FaceDescriptor face_desc(int index) const;
650  virtual void face_desc(int index, FaceDescriptor& fdOut) const;
651  virtual uint num_faces() const;
652 
653  virtual Edge* create_edge(int index);
654  virtual Face* create_face(int index);
655 
656  virtual void get_vertex_indices_of_edge(size_t& ind1Out,
657  size_t& ind2Out,
658  size_t edgeInd) const;
659 
660  virtual void get_vertex_indices_of_face(std::vector<size_t>& indsOut,
661  size_t side) const;
662 
663  virtual int get_edge_index_from_vertices( const size_t vi0,
664  const size_t vi1) const;
665 
666  virtual int get_face_edge_index ( const size_t faceInd,
667  const size_t faceEdgeInd) const;
668 
669  virtual std::pair<GridBaseObjectId, int> get_opposing_object(Vertex* vrt) const;
670 
672 
674  virtual bool refine(std::vector<Volume*>& vNewVolumesOut,
675  Vertex** ppNewVertexOut,
676  Vertex** newEdgeVertices,
677  Vertex** newFaceVertices,
678  Vertex* newVolumeVertex,
679  const Vertex& prototypeVertex,
680  Vertex** pSubstituteVertices = NULL,
681  vector3* corners = NULL,
682  bool* isSnapPoint = NULL);
683 
684  virtual bool is_regular_ref_rule(int edgeMarks) const;
685 
686  virtual bool collapse_edge(std::vector<Volume*>& vNewVolumesOut,
687  int edgeIndex, Vertex* newVertex,
688  std::vector<Vertex*>* pvSubstituteVertices = NULL);
689 
690  virtual void get_flipped_orientation(VolumeDescriptor& vdOut) const;
691 
692  virtual int container_section() const {return CSVOL_OCTAHEDRON;}
694 
695  protected:
696  virtual void set_vertex(uint index, Vertex* pVrt) {m_vertices[index] = pVrt;}
697 
698  protected:
699  Vertex* m_vertices[6];
700 };
701 
702 template <>
704 {
705  public:
709 
712 
713  enum
714  {
715  CONTAINER_SECTION = CSVOL_OCTAHEDRON,
716  BASE_OBJECT_ID = VOLUME
717  };
718  static const ReferenceObjectID REFERENCE_OBJECT_ID = ROID_OCTAHEDRON;
719 };
720 
723 
724 }// end of namespace
725 
726 #endif
Use this class as a tool to create const_iterators to your own geometric objects.
Definition: generic_grid_object_iterator.h:70
Can be used to store information about an edge and to construct an edge.
Definition: grid_base_objects.h:464
Base-class for edges.
Definition: grid_base_objects.h:397
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
Definition: grid_base_objects.h:483
Use this class as a tool to create iterators to your own geometric objects.
Definition: generic_grid_object_iterator.h:44
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
only used to initialize a hexahedron. for all other tasks you should use VolumeDescriptor.
Definition: grid_objects_3d.h:203
HexahedronDescriptor()
Definition: grid_objects_3d.h:205
Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:212
uint num_vertices() const
Definition: grid_objects_3d.h:211
A volume element with 6 quadrilateral sides.
Definition: grid_objects_3d.h:227
virtual Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:243
virtual ConstVertexArray vertices() const
Definition: grid_objects_3d.h:244
virtual int container_section() const
Definition: grid_objects_3d.h:294
virtual ReferenceObjectID reference_object_id() const
Definition: grid_objects_3d.h:295
virtual size_t num_vertices() const
Definition: grid_objects_3d.h:245
virtual void set_vertex(uint index, Vertex *pVrt)
Definition: grid_objects_3d.h:298
virtual GridObject * create_empty_instance() const
create an instance of the derived type
Definition: grid_objects_3d.h:241
Hexahedron()
Definition: grid_objects_3d.h:236
Volume BaseClass
Definition: grid_objects_3d.h:229
static bool type_match(GridObject *pObj)
Definition: grid_objects_3d.h:234
Vertex *const * ConstVertexArray
Definition: grid_base_objects.h:319
only used to initialize a octahedron. for all other tasks you should use VolumeDescripor.
Definition: grid_objects_3d.h:602
Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:610
OctahedronDescriptor()
Definition: grid_objects_3d.h:604
uint num_vertices() const
Definition: grid_objects_3d.h:609
platonic solid with eight faces.
Definition: grid_objects_3d.h:626
virtual void set_vertex(uint index, Vertex *pVrt)
Definition: grid_objects_3d.h:696
virtual GridObject * create_empty_instance() const
create an instance of the derived type
Definition: grid_objects_3d.h:639
Octahedron()
Definition: grid_objects_3d.h:635
static bool type_match(GridObject *pObj)
Definition: grid_objects_3d.h:633
virtual int container_section() const
Definition: grid_objects_3d.h:692
virtual size_t num_vertices() const
Definition: grid_objects_3d.h:643
virtual ReferenceObjectID reference_object_id() const
Definition: grid_objects_3d.h:693
virtual ConstVertexArray vertices() const
Definition: grid_objects_3d.h:642
virtual Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:641
Volume BaseClass
Definition: grid_objects_3d.h:628
only used to initialize a prism. for all other tasks you should use VolumeDescripor.
Definition: grid_objects_3d.h:336
Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:345
PrismDescriptor()
Definition: grid_objects_3d.h:338
uint num_vertices() const
Definition: grid_objects_3d.h:344
A volume element with 2 triangle and 3 quadrilateral sides.
Definition: grid_objects_3d.h:360
virtual ReferenceObjectID reference_object_id() const
Definition: grid_objects_3d.h:428
Volume BaseClass
Definition: grid_objects_3d.h:362
static bool type_match(GridObject *pObj)
Definition: grid_objects_3d.h:367
virtual Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:376
virtual GridObject * create_empty_instance() const
create an instance of the derived type
Definition: grid_objects_3d.h:374
virtual ConstVertexArray vertices() const
Definition: grid_objects_3d.h:377
virtual int container_section() const
Definition: grid_objects_3d.h:427
Prism()
Definition: grid_objects_3d.h:369
virtual void set_vertex(uint index, Vertex *pVrt)
Definition: grid_objects_3d.h:431
virtual size_t num_vertices() const
Definition: grid_objects_3d.h:378
only used to initialize a pyramids. for all other tasks you should use VolumeDescripor.
Definition: grid_objects_3d.h:469
PyramidDescriptor()
Definition: grid_objects_3d.h:471
Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:478
uint num_vertices() const
Definition: grid_objects_3d.h:477
A volume element with 4 triangle and 1 quadrilateral sides.
Definition: grid_objects_3d.h:493
virtual Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:509
virtual size_t num_vertices() const
Definition: grid_objects_3d.h:511
Volume BaseClass
Definition: grid_objects_3d.h:495
Pyramid()
Definition: grid_objects_3d.h:502
virtual ConstVertexArray vertices() const
Definition: grid_objects_3d.h:510
static bool type_match(GridObject *pObj)
Definition: grid_objects_3d.h:500
virtual GridObject * create_empty_instance() const
create an instance of the derived type
Definition: grid_objects_3d.h:507
virtual ReferenceObjectID reference_object_id() const
Definition: grid_objects_3d.h:559
virtual int container_section() const
Definition: grid_objects_3d.h:558
virtual void set_vertex(uint index, Vertex *pVrt)
Definition: grid_objects_3d.h:562
only used to initialize a tetrahedron. for all other tasks you should use VolumeDescripor.
Definition: grid_objects_3d.h:68
Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:76
TetrahedronDescriptor()
Definition: grid_objects_3d.h:70
uint num_vertices() const
Definition: grid_objects_3d.h:75
the most simple volume-element.
Definition: grid_objects_3d.h:91
Tetrahedron()
Definition: grid_objects_3d.h:100
virtual void set_vertex(uint index, Vertex *pVrt)
Definition: grid_objects_3d.h:164
Volume BaseClass
Definition: grid_objects_3d.h:93
virtual int container_section() const
Definition: grid_objects_3d.h:157
virtual ConstVertexArray vertices() const
Definition: grid_objects_3d.h:107
static bool type_match(GridObject *pObj)
Definition: grid_objects_3d.h:98
virtual GridObject * create_empty_instance() const
create an instance of the derived type
Definition: grid_objects_3d.h:104
virtual ReferenceObjectID reference_object_id() const
Definition: grid_objects_3d.h:160
virtual size_t num_vertices() const
Definition: grid_objects_3d.h:108
virtual Vertex * vertex(size_t index) const
Definition: grid_objects_3d.h:106
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Holds a set of vertices which represent the corners of a volume element.
Definition: grid_base_objects.h:951
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
holds the vertices of a Volume or a VolumeDescriptor
Definition: grid_base_objects.h:723
HexahedronDescriptor Descriptor
Definition: grid_objects_3d.h:312
Volume grid_base_object
Definition: grid_objects_3d.h:313
GenericGridObjectIterator< Hexahedron *, VolumeIterator > iterator
Definition: grid_objects_3d.h:308
ConstGenericGridObjectIterator< Hexahedron *, VolumeIterator, ConstVolumeIterator > const_iterator
Definition: grid_objects_3d.h:310
ConstGenericGridObjectIterator< Octahedron *, VolumeIterator, ConstVolumeIterator > const_iterator
Definition: grid_objects_3d.h:708
GenericGridObjectIterator< Octahedron *, VolumeIterator > iterator
Definition: grid_objects_3d.h:706
OctahedronDescriptor Descriptor
Definition: grid_objects_3d.h:710
Volume grid_base_object
Definition: grid_objects_3d.h:711
GenericGridObjectIterator< Prism *, VolumeIterator > iterator
Definition: grid_objects_3d.h:441
PrismDescriptor Descriptor
Definition: grid_objects_3d.h:445
ConstGenericGridObjectIterator< Prism *, VolumeIterator, ConstVolumeIterator > const_iterator
Definition: grid_objects_3d.h:443
Volume grid_base_object
Definition: grid_objects_3d.h:446
ConstGenericGridObjectIterator< Pyramid *, VolumeIterator, ConstVolumeIterator > const_iterator
Definition: grid_objects_3d.h:574
GenericGridObjectIterator< Pyramid *, VolumeIterator > iterator
Definition: grid_objects_3d.h:572
Volume grid_base_object
Definition: grid_objects_3d.h:577
PyramidDescriptor Descriptor
Definition: grid_objects_3d.h:576
Volume grid_base_object
Definition: grid_objects_3d.h:179
GenericGridObjectIterator< Tetrahedron *, VolumeIterator > iterator
Definition: grid_objects_3d.h:174
ConstGenericGridObjectIterator< Tetrahedron *, VolumeIterator, ConstVolumeIterator > const_iterator
Definition: grid_objects_3d.h:176
TetrahedronDescriptor Descriptor
Definition: grid_objects_3d.h:178
Definition: grid_base_object_traits.h:68
#define UG_API
Definition: ug_config.h:65
unsigned int uint
Definition: types.h:114
const int NUM_VERTICES
Definition: hexahedron_rules.h:45
the ug namespace
geometry_traits< Octahedron >::iterator OctahedronIterator
Definition: grid_objects_3d.h:721
geometry_traits< Pyramid >::const_iterator ConstPyramidIterator
Definition: grid_objects_3d.h:588
geometry_traits< Prism >::iterator PrismIterator
Definition: grid_objects_3d.h:456
ReferenceObjectID
these ids are used to identify the shape of a geometric object.
Definition: grid_base_objects.h:74
@ ROID_TETRAHEDRON
Definition: grid_base_objects.h:80
@ ROID_PYRAMID
Definition: grid_base_objects.h:83
@ ROID_PRISM
Definition: grid_base_objects.h:82
@ ROID_OCTAHEDRON
Definition: grid_base_objects.h:84
@ ROID_HEXAHEDRON
Definition: grid_base_objects.h:81
VolumeContainerSections
These numbers define where in the volume-section-container a volume will be stored.
Definition: grid_objects_3d.h:50
@ CSVOL_PRISM
Definition: grid_objects_3d.h:54
@ CSVOL_OCTAHEDRON
Definition: grid_objects_3d.h:56
@ CSVOL_TETRAHEDRON
Definition: grid_objects_3d.h:52
@ CSVOL_HEXAHEDRON
Definition: grid_objects_3d.h:53
@ CSVOL_NONE
Definition: grid_objects_3d.h:51
@ CSVOL_PYRAMID
Definition: grid_objects_3d.h:55
geometry_traits< Prism >::const_iterator ConstPrismIterator
Definition: grid_objects_3d.h:457
geometry_traits< Octahedron >::const_iterator ConstOctahedronIterator
Definition: grid_objects_3d.h:722
@ VOLUME
Definition: grid_base_objects.h:63
geometry_traits< Hexahedron >::iterator HexahedronIterator
Definition: grid_objects_3d.h:323
ElementStorage< Volume >::SectionContainer::const_iterator ConstVolumeIterator
Definition: grid_base_object_traits.h:83
geometry_traits< Tetrahedron >::iterator TetrahedronIterator
Definition: grid_objects_3d.h:189
geometry_traits< Tetrahedron >::const_iterator ConstTetrahedronIterator
Definition: grid_objects_3d.h:190
geometry_traits< Hexahedron >::const_iterator ConstHexahedronIterator
Definition: grid_objects_3d.h:324
geometry_traits< Pyramid >::iterator PyramidIterator
Definition: grid_objects_3d.h:587
ElementStorage< Volume >::SectionContainer::iterator VolumeIterator
Definition: grid_base_object_traits.h:82