ug4
reference_element.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2021: G-CSC, Goethe University Frankfurt
3  * Authors: Andreas Vogel, Martin Stepniewski
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__LIB_DISC__REFERENCE_ELEMENT__REFERENCE_ELEMENT__
34 #define __H__UG__LIB_DISC__REFERENCE_ELEMENT__REFERENCE_ELEMENT__
35 
36 #include <cassert>
37 #include <iostream>
38 #include <sstream>
39 #include "common/common.h"
40 #include "common/math/ugmath.h"
42 
43 namespace ug{
44 
46 // Reference Element Common Base Class
48 
50 
70 {
71  public:
74 
77  {return m_vRefElemType[m_dim][0];}
78 
80  int dimension() const {return m_dim;}
81 
83  number size() const {return m_size;}
84 
86 
95  size_t num(int dim) const {return m_vNum[dim];}
96 
98 
110  size_t num(int dim_i, size_t i, int dim_j) const
111  {return m_vSubNum[dim_i][i][dim_j];}
112 
114 
127  int id(int dim_i, size_t i, int dim_j, size_t j) const
128  {return m_id[dim_i][i][dim_j][j];}
129 
131  size_t num(ReferenceObjectID type) const
132  {return m_vNumRefElem[type];}
133 
135  ReferenceObjectID roid(int dim_i, size_t i) const
136  {return m_vRefElemType[dim_i][i];}
137 
139  void print_info() const;
140 
141  protected:
143  enum{POINT = 0, EDGE = 1, FACE = 2, VOLUME= 3};
144 
146  enum{MAXOBJECTS = 12};
147 
149  enum{MAXDIM = 3};
150 
152  int m_dim;
153 
156 
158  size_t m_vNum[MAXDIM+1];
159 
162 
165 
168 
171 };
172 
174 
181 template <int d>
183 {
184  public:
186  static const int dim = d;
187 
189  const MathVector<dim>* corners() const {return &m_vCorner[0];}
190 
192  const MathVector<dim>& corner(size_t i) const {return m_vCorner[i];}
193 
195  const MathVector<dim,int>* corner() const {return m_vCoInt;}
196 
198  void print_info() const;
199 
200  protected:
202  enum{MAXCORNERS = 8};
203 
207 };
208 
210 // Reference Element Providers
212 
215 {
217  : UGError(""), dim(dim_), roid(roid_)
218  {
219  std::stringstream ss; ss << "Reference Element not found for "
220  <<roid<<" (dim="<<dim<<")";
221  UGError::push_msg(ss.str());
222  }
223  int dim;
225 };
226 
229 {
230  private:
233 
234  // intentionally left unimplemented
237 
240  {
241  static ReferenceElementProvider inst;
242  return inst;
243  }
244 
246  static bool add_elem(const ReferenceElement& elem);
247 
249  static const ReferenceElement& get_elem(ReferenceObjectID roid);
250 
253 
255  template <int dim>
256  static bool add_dim_elem(const DimReferenceElement<dim>& elem);
257 
259  template <int dim>
261  {
262  UG_ASSERT(roid >= 0, "roid ="<<roid<<" wrong")
263  UG_ASSERT(roid < NUM_REFERENCE_OBJECTS, "roid ="<<roid<<" wrong")
264  static const DimReferenceElement<dim>** vDimElem = get_vector<dim>();
265  UG_ASSERT(vDimElem[roid] != NULL, "Null pointer for roid ="<<roid);
266  return *vDimElem[roid];
267  }
268 
270  template <int dim>
272  {
274  return sVec;
275  }
276 
277  public:
279  template <int dim>
280  inline static const DimReferenceElement<dim>& get(ReferenceObjectID roid)
281  {
282  return instance().get_dim_elem<dim>(roid);
283  }
284 
286  inline static const ReferenceElement& get(ReferenceObjectID roid)
287  {
288  return instance().get_elem(roid);
289  }
290 };
291 
294 // Concrete Reference Elements
297 
299 // Reference RegularVertex
301 
303 {
304  public:
307 
309  static const int dim = 0;
310 
312  static const int numCorners = 1;
313 
315  static const int numEdges = 0;
316 
318  static const int numFaces = 0;
319 
321  static const int numVolumes = 0;
322 
324  static const int numSides = 0;
325 
326  public:
328  ReferenceVertex();
329 
332 
334  int dimension() const {return dim;}
335 
337  number size() const {return 1.0;}
338 };
339 
341 // Reference Edge
343 
345 {
346  public:
349 
351  static const int dim = 1;
352 
354  static const int numCorners = 2;
355 
357  static const int numEdges = 1;
358 
360  static const int numFaces = 0;
361 
363  static const int numVolumes = 0;
364 
366  static const int numSides = numCorners;
367 
368  public:
370  ReferenceEdge();
371 
374 
376  int dimension() const {return dim;}
377 
379  number size() const {return 0.5;}
380 
382  inline static void check_position(const MathVector<dim>& pos)
383  {
384  UG_ASSERT(pos[0] >= 0.0 && pos[0] <= 1.0,
385  "Local position "<<pos<<" outside Reference Element");
386  }
387 };
388 
390 // Reference Triangle
392 
394 {
395  public:
398 
400  static const int dim = 2;
401 
403  static const int numCorners = 3;
404 
406  static const int numEdges = 3;
407 
409  static const int numFaces = 1;
410 
412  static const int numVolumes = 0;
413 
415  static const int numSides = numEdges;
416 
417  public:
420 
423 
425  int dimension() const {return dim;}
426 
428  number size() const {return 0.5;}
429 
431  inline static void check_position(const MathVector<dim>& pos)
432  {
433  UG_ASSERT(pos[0] >= 0.0 && pos[0] <= 1.0 &&
434  pos[1] >= 0.0 && pos[1] <= 1.0 &&
435  pos[0]+pos[1] <= 1.0,
436  "Local position "<<pos<<" outside Reference Element");
437  }
438 };
439 
441 // Reference Quadrilateral
443 
445 {
446  public:
449 
451  static const int dim = 2;
452 
454  static const int numCorners = 4;
455 
457  static const int numEdges = 4;
458 
460  static const int numFaces = 1;
461 
463  static const int numVolumes = 0;
464 
466  static const int numSides = numEdges;
467 
468  public:
470 
473 
475  int dimension() const {return dim;}
476 
478  number size() const {return 1.0;}
479 
481  inline static void check_position(const MathVector<dim>& pos)
482  {
483  UG_ASSERT(pos[0] >= 0.0 && pos[0] <= 1.0 &&
484  pos[1] >= 0.0 && pos[1] <= 1.0,
485  "Local position "<<pos<<" outside Reference Element");
486  }
487 };
488 
490 // Reference Tetrahedron
492 
494 {
495  public:
498 
500  static const int dim = 3;
501 
503  static const int numCorners = 4;
504 
506  static const int numEdges = 6;
507 
509  static const int numFaces = 4;
510 
512  static const int numVolumes = 1;
513 
515  static const int numSides = numFaces;
516 
517  public:
520 
523 
525  int dimension() const {return dim;}
526 
528  number size() const {return 1.0/6.0;}
529 
531  inline static void check_position(const MathVector<dim>& pos)
532  {
533  UG_ASSERT(pos[0] >= 0.0 && pos[0] <= 1.0 &&
534  pos[1] >= 0.0 && pos[1] <= 1.0 &&
535  pos[2] >= 0.0 && pos[2] <= 1.0 &&
536  pos[0]+pos[1]+pos[2] <= 1.0,
537  "Local position "<<pos<<" outside Reference Element");
538  }
539 };
540 
542 // Reference Pyramid
544 
546 {
547  public:
550 
552  static const int dim = 3;
553 
555  static const int numCorners = 5;
556 
558  static const int numEdges = 8;
559 
561  static const int numFaces = 5;
562 
564  static const int numVolumes = 1;
565 
567  static const int numSides = numFaces;
568 
569  public:
572 
575 
577  int dimension() const {return dim;}
578 
580  number size() const {return 1.0/3.0;}
581 
583  inline static void check_position(const MathVector<dim>& pos)
584  {
585  //\todo: add check
586  }
587 };
588 
589 
591 // Reference Prism
593 
595 {
596  public:
599 
601  static const int dim = 3;
602 
604  static const int numCorners = 6;
605 
607  static const int numEdges = 9;
608 
610  static const int numFaces = 5;
611 
613  static const int numVolumes = 1;
614 
616  static const int numSides = numFaces;
617 
618  public:
620  ReferencePrism();
621 
624 
626  int dimension() const {return dim;}
627 
629  number size() const {return 0.5;}
630 
632  inline static void check_position(const MathVector<dim>& pos)
633  {
634  UG_ASSERT(pos[0] >= 0.0 && pos[0] <= 1.0 &&
635  pos[1] >= 0.0 && pos[1] <= 1.0 &&
636  pos[0]+pos[1] <= 1.0 &&
637  pos[2] >= 0.0 && pos[2] <= 1.0,
638  "Local position "<<pos<<" outside Reference Element");
639  }
640 };
641 
643 // Reference Hexahedron
645 
648 {
649  public:
652 
654  static const int dim = 3;
655 
657  static const int numCorners = 8;
658 
660  static const int numEdges = 12;
661 
663  static const int numFaces = 6;
664 
666  static const int numVolumes = 1;
667 
669  static const int numSides = numFaces;
670 
671  public:
674 
677 
679  int dimension() const {return dim;}
680 
682  number size() const {return 1.0;}
683 
685  inline static void check_position(const MathVector<dim>& pos)
686  {
687  UG_ASSERT(pos[0] >= 0.0 && pos[0] <= 1.0 &&
688  pos[1] >= 0.0 && pos[1] <= 1.0 &&
689  pos[2] >= 0.0 && pos[2] <= 1.0,
690  "Local position "<<pos<<" outside Reference Element");
691  }
692 };
693 
695 // Reference Octahedron
697 
699 {
700  public:
703 
705  static const int dim = 3;
706 
708  static const int numCorners = 6;
709 
711  static const int numEdges = 12;
712 
714  static const int numFaces = 8;
715 
717  static const int numVolumes = 1;
718 
720  static const int numSides = numFaces;
721 
722  public:
725 
728 
730  int dimension() const {return dim;}
731 
733  number size() const {return 2.0/3.0;}
734 
736  inline static void check_position(const MathVector<dim>& pos)
737  {
738  //\todo: add check
739  }
740 };
741 
742 } // end namespace ug
743 
745 
746 #endif /* __H__UG__LIB_DISC__REFERENCE_ELEMENT__REFERENCE_ELEMENT__ */
dimension dependent base class for reference elements
Definition: reference_element.h:183
MathVector< dim > m_vCorner[MAXCORNERS]
coordinates of Reference Corner
Definition: reference_element.h:205
MathVector< dim, int > m_vCoInt[MAXCORNERS]
Definition: reference_element.h:206
const MathVector< dim > & corner(size_t i) const
coordinates of reference corner (i = 0 ... num(0))
Definition: reference_element.h:192
void print_info() const
print informations about the reference element
Definition: reference_element.cpp:100
const MathVector< dim, int > * corner() const
coordinates of reference corner as integer
Definition: reference_element.h:195
static const int dim
dimension, where the reference element is defined
Definition: reference_element.h:186
@ MAXCORNERS
Definition: reference_element.h:202
const MathVector< dim > * corners() const
coordinates of reference corner in a vector
Definition: reference_element.h:189
Definition: reference_element.h:345
static const int numSides
number of sides
Definition: reference_element.h:366
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:373
static void check_position(const MathVector< dim > &pos)
Definition: reference_element.h:382
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:348
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:376
static const int dim
dimension of reference element
Definition: reference_element.h:351
static const int numEdges
number of eges
Definition: reference_element.h:357
static const int numVolumes
number of volumes
Definition: reference_element.h:363
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:379
static const int numCorners
number of corners
Definition: reference_element.h:354
static const int numFaces
number of faces
Definition: reference_element.h:360
ReferenceEdge()
Constructor.
Definition: reference_element.cpp:246
base class for reference elements
Definition: reference_element.h:70
@ MAXOBJECTS
Definition: reference_element.h:146
number m_size
size of reference element
Definition: reference_element.h:155
ReferenceElement()
Constructor filling the arrays.
Definition: reference_element.cpp:42
size_t num(int dim) const
returns the number of geometric objects of dim
Definition: reference_element.h:95
void print_info() const
print informations about the reference element
Definition: reference_element.cpp:66
ReferenceObjectID roid() const
returns the reference object id
Definition: reference_element.h:76
size_t m_vSubNum[MAXDIM+1][MAXOBJECTS][MAXDIM+1]
number of Geometric Objects contained in a (Sub-)Geometric Object of the Element
Definition: reference_element.h:161
size_t num(ReferenceObjectID type) const
number of reference elements this element contains
Definition: reference_element.h:131
size_t m_vNumRefElem[NUM_REFERENCE_OBJECTS]
number of reference elements
Definition: reference_element.h:167
int id(int dim_i, size_t i, int dim_j, size_t j) const
id of object j in dimension dim_j of obj i in dimension dim_i
Definition: reference_element.h:127
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:80
@ MAXDIM
Definition: reference_element.h:149
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:83
ReferenceObjectID m_vRefElemType[MAXDIM+1][MAXOBJECTS]
type of reference elements
Definition: reference_element.h:170
int m_dim
dimension of the reference world
Definition: reference_element.h:152
size_t m_vNum[MAXDIM+1]
number of Geometric Objects of a dimension
Definition: reference_element.h:158
@ VOLUME
Definition: reference_element.h:143
@ EDGE
Definition: reference_element.h:143
@ POINT
Definition: reference_element.h:143
@ FACE
Definition: reference_element.h:143
ReferenceObjectID roid(int dim_i, size_t i) const
reference element type of obj nr i in dimension dim_i
Definition: reference_element.h:135
int m_id[MAXDIM+1][MAXOBJECTS][MAXDIM+1][MAXOBJECTS]
indices of GeomObjects
Definition: reference_element.h:164
size_t num(int dim_i, size_t i, int dim_j) const
returns the number of object of dim for a sub-geometric object
Definition: reference_element.h:110
Provider for Reference Elements.
Definition: reference_element.h:229
static bool add_dim_elem(const DimReferenceElement< dim > &elem)
adds a Reference Element
Definition: reference_element.cpp:179
static bool add_elem(const ReferenceElement &elem)
adds a Reference Element
Definition: reference_element.cpp:161
ReferenceElementProvider & operator=(const ReferenceElementProvider &)
static const ReferenceElement & get_elem(ReferenceObjectID roid)
returns a Reference Element
Definition: reference_element.cpp:170
static const DimReferenceElement< dim > ** get_vector()
returns vector of DimReferenceElement
Definition: reference_element.h:271
static const ReferenceElement & get(ReferenceObjectID roid)
returns a Reference Element
Definition: reference_element.h:286
static ReferenceElementProvider & instance()
provide instance of singleton
Definition: reference_element.h:239
static const DimReferenceElement< dim > & get_dim_elem(ReferenceObjectID roid)
returns a Reference Element
Definition: reference_element.h:260
ReferenceElementProvider(const ReferenceElementProvider &)
Definition: reference_element.h:235
static const ReferenceElement * m_vElem[NUM_REFERENCE_OBJECTS]
vector storing all ReferenceElement
Definition: reference_element.h:252
ReferenceElementProvider()
constructor
Definition: reference_element.cpp:122
static const DimReferenceElement< dim > & get(ReferenceObjectID roid)
returns a dimension dependent Reference Element
Definition: reference_element.h:280
reference element for a hexahedron
Definition: reference_element.h:648
static const int dim
dimension of reference element
Definition: reference_element.h:654
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:676
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:679
static const int numVolumes
number of volumes
Definition: reference_element.h:666
ReferenceHexahedron()
Constructor filling the arrays.
Definition: reference_element.cpp:1327
static const int numFaces
number of faces
Definition: reference_element.h:663
static const int numSides
number of sides
Definition: reference_element.h:669
static void check_position(const MathVector< dim > &pos)
Definition: reference_element.h:685
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:682
static const int numCorners
number of corners
Definition: reference_element.h:657
static const int numEdges
number of eges
Definition: reference_element.h:660
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:651
Definition: reference_element.h:699
static const int numSides
number of sides
Definition: reference_element.h:720
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:733
static const int numFaces
number of faces
Definition: reference_element.h:714
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:730
static const int dim
dimension of reference element
Definition: reference_element.h:705
ReferenceOctahedron()
Constructor.
Definition: reference_element.cpp:1650
static const int numCorners
number of corners
Definition: reference_element.h:708
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:727
static const int numVolumes
number of volumes
Definition: reference_element.h:717
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:702
static const int numEdges
number of edges
Definition: reference_element.h:711
static void check_position(const MathVector< dim > &pos)
Definition: reference_element.h:736
Definition: reference_element.h:595
static const int numCorners
number of corners
Definition: reference_element.h:604
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:629
static const int dim
dimension of reference element
Definition: reference_element.h:601
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:623
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:598
static const int numSides
number of sides
Definition: reference_element.h:616
static const int numFaces
number of faces
Definition: reference_element.h:610
static void check_position(const MathVector< dim > &pos)
Definition: reference_element.h:632
ReferencePrism()
Constructor.
Definition: reference_element.cpp:1034
static const int numVolumes
number of volumes
Definition: reference_element.h:613
static const int numEdges
number of eges
Definition: reference_element.h:607
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:626
Definition: reference_element.h:546
static const int numFaces
number of faces
Definition: reference_element.h:561
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:580
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:574
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:577
static void check_position(const MathVector< dim > &pos)
Definition: reference_element.h:583
static const int numEdges
number of eges
Definition: reference_element.h:558
static const int numVolumes
number of volumes
Definition: reference_element.h:564
static const int dim
dimension of reference element
Definition: reference_element.h:552
static const int numCorners
number of corners
Definition: reference_element.h:555
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:549
ReferencePyramid()
Constructor.
Definition: reference_element.cpp:768
static const int numSides
number of sides
Definition: reference_element.h:567
Definition: reference_element.h:445
static void check_position(const MathVector< dim > &pos)
Definition: reference_element.h:481
static const int numFaces
number of faces
Definition: reference_element.h:460
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:472
static const int numVolumes
number of volumes
Definition: reference_element.h:463
ReferenceQuadrilateral()
Definition: reference_element.cpp:428
static const int numEdges
number of eges
Definition: reference_element.h:457
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:478
static const int numCorners
number of corners
Definition: reference_element.h:454
static const int numSides
number of sides
Definition: reference_element.h:466
static const int dim
dimension of reference element
Definition: reference_element.h:451
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:448
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:475
Definition: reference_element.h:494
static const int numFaces
number of faces
Definition: reference_element.h:509
static const int numSides
number of sides
Definition: reference_element.h:515
static void check_position(const MathVector< dim > &pos)
Definition: reference_element.h:531
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:528
static const int dim
dimension of reference element
Definition: reference_element.h:500
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:497
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:525
static const int numEdges
number of eges
Definition: reference_element.h:506
static const int numCorners
number of corners
Definition: reference_element.h:503
ReferenceTetrahedron()
Constructor.
Definition: reference_element.cpp:547
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:522
static const int numVolumes
number of volumes
Definition: reference_element.h:512
Definition: reference_element.h:394
static const int numVolumes
number of volumes
Definition: reference_element.h:412
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:422
static const int numEdges
number of eges
Definition: reference_element.h:406
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:428
static const int numFaces
number of faces
Definition: reference_element.h:409
static void check_position(const MathVector< dim > &pos)
Definition: reference_element.h:431
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:397
static const int dim
dimension of reference element
Definition: reference_element.h:400
static const int numSides
number of sides
Definition: reference_element.h:415
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:425
ReferenceTriangle()
Constructor filling the arrays.
Definition: reference_element.cpp:315
static const int numCorners
number of corners
Definition: reference_element.h:403
Definition: reference_element.h:303
static const int numCorners
number of corners
Definition: reference_element.h:312
ReferenceObjectID reference_object_id() const
Definition: reference_element.h:331
static const int dim
dimension of reference element
Definition: reference_element.h:309
ReferenceVertex()
Constructor filling the arrays.
Definition: reference_element.cpp:202
int dimension() const
returns the dimension where reference element lives
Definition: reference_element.h:334
static const int numFaces
number of faces
Definition: reference_element.h:318
static const int numSides
number of sides
Definition: reference_element.h:324
static const int numVolumes
number of volumes
Definition: reference_element.h:321
static const ReferenceObjectID REFERENCE_OBJECT_ID
type of reference element
Definition: reference_element.h:306
number size() const
returns the size (e.g. area or volume) of the reference element
Definition: reference_element.h:337
static const int numEdges
number of eges
Definition: reference_element.h:315
Instances of this class or of derived classes are thrown if errors arise.
Definition: error.h:104
void push_msg(const std::string &msg, const char *file=" -- no file -- ", const unsigned long line=0)
adds a message to the message stack
Definition: error.h:119
static const int dim
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
double number
Definition: types.h:124
the ug namespace
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_QUADRILATERAL
Definition: grid_base_objects.h:79
@ NUM_REFERENCE_OBJECTS
Definition: grid_base_objects.h:85
@ ROID_PYRAMID
Definition: grid_base_objects.h:83
@ ROID_PRISM
Definition: grid_base_objects.h:82
@ ROID_EDGE
Definition: grid_base_objects.h:77
@ ROID_OCTAHEDRON
Definition: grid_base_objects.h:84
@ ROID_HEXAHEDRON
Definition: grid_base_objects.h:81
@ ROID_TRIANGLE
Definition: grid_base_objects.h:78
@ ROID_VERTEX
Definition: grid_base_objects.h:76
Exception thrown when reference element not found.
Definition: reference_element.h:215
ReferenceObjectID roid
Definition: reference_element.h:224
UGError_ReferenceElementMissing(int dim_, ReferenceObjectID roid_)
Definition: reference_element.h:216
int dim
Definition: reference_element.h:223