ug4
grid_dim_traits.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015: G-CSC, Goethe University Frankfurt
3  * Author: Andreas Vogel
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__LIB_GRID__GRID_DIM_TRAITS__
34 #define __H__LIB_GRID__GRID_DIM_TRAITS__
35 
36 #include <boost/mpl/list.hpp>
38 
39 namespace ug{
40 
42 // Element types for different dimensions
44 
53 template <int dim> struct grid_dim_traits;
54 
55 // 0d
56 template <> struct grid_dim_traits<0>
57 {
58  typedef boost::mpl::list<RegularVertex> DimElemList;
59  typedef boost::mpl::list<RegularVertex> AllElemList;
60 
63 
66 
67  const static size_t MaxNumVerticesOfElem = 1;
68 };
69 
70 // 1d
71 template <> struct grid_dim_traits<1>
72 {
73  typedef boost::mpl::list<RegularEdge> DimElemList;
74  typedef boost::mpl::list<RegularEdge> AllElemList;
75  typedef boost::mpl::list<> ManifoldElemList;
76 
79 
83 
84  const static size_t MaxNumVerticesOfElem = 2;
85 };
86 
87 // 2d
88 template <> struct grid_dim_traits<2>
89 {
90  typedef boost::mpl::list<Triangle, Quadrilateral> DimElemList;
91  typedef boost::mpl::list<RegularEdge, Triangle, Quadrilateral> AllElemList;
92  typedef boost::mpl::list<RegularEdge> ManifoldElemList;
93 
96 
100 
101  const static size_t MaxNumVerticesOfElem = 4;
102 };
103 
104 // 3d
105 template <> struct grid_dim_traits<3>
106 {
107  typedef boost::mpl::list<Tetrahedron, Prism, Pyramid, Hexahedron, Octahedron> DimElemList;
108  typedef boost::mpl::list<RegularEdge, Triangle, Quadrilateral,
110  typedef boost::mpl::list<Triangle, Quadrilateral> ManifoldElemList;
111 
114 
118 
119  const static size_t MaxNumVerticesOfElem = 8;
120 };
121 
122 } // end namespace ug
123 
124 #endif // __H__LIB_GRID__GRID_DIM_TRAITS__
125 
126 /* End of File */
A volume element with 6 quadrilateral sides.
Definition: grid_objects_3d.h:227
platonic solid with eight faces.
Definition: grid_objects_3d.h:626
A volume element with 2 triangle and 3 quadrilateral sides.
Definition: grid_objects_3d.h:360
A volume element with 4 triangle and 1 quadrilateral sides.
Definition: grid_objects_3d.h:493
a face with four points.
Definition: grid_objects_2d.h:323
Edges connect two vertices.
Definition: grid_objects_1d.h:66
the most simple volume-element.
Definition: grid_objects_3d.h:91
the most simple form of a face
Definition: grid_objects_2d.h:174
Definition: grid_base_object_traits.h:68
the ug namespace
geometry_traits< Vertex >::grid_base_object element_type
Definition: grid_dim_traits.h:65
boost::mpl::list< RegularVertex > AllElemList
Definition: grid_dim_traits.h:59
boost::mpl::list< RegularVertex > DimElemList
Definition: grid_dim_traits.h:58
geometry_traits< Vertex >::iterator iterator
Definition: grid_dim_traits.h:62
geometry_traits< Vertex >::grid_base_object grid_base_object
Definition: grid_dim_traits.h:64
geometry_traits< Vertex >::const_iterator const_iterator
Definition: grid_dim_traits.h:61
geometry_traits< Edge >::grid_base_object grid_base_object
Definition: grid_dim_traits.h:80
geometry_traits< Edge >::iterator iterator
Definition: grid_dim_traits.h:78
geometry_traits< Edge >::grid_base_object element_type
Definition: grid_dim_traits.h:81
boost::mpl::list< RegularEdge > AllElemList
Definition: grid_dim_traits.h:74
boost::mpl::list ManifoldElemList
Definition: grid_dim_traits.h:75
boost::mpl::list< RegularEdge > DimElemList
Definition: grid_dim_traits.h:73
geometry_traits< Vertex >::grid_base_object side_type
Definition: grid_dim_traits.h:82
geometry_traits< Edge >::const_iterator const_iterator
Definition: grid_dim_traits.h:77
geometry_traits< Face >::iterator iterator
Definition: grid_dim_traits.h:95
geometry_traits< Face >::const_iterator const_iterator
Definition: grid_dim_traits.h:94
geometry_traits< Face >::grid_base_object element_type
Definition: grid_dim_traits.h:98
boost::mpl::list< RegularEdge > ManifoldElemList
Definition: grid_dim_traits.h:92
boost::mpl::list< RegularEdge, Triangle, Quadrilateral > AllElemList
Definition: grid_dim_traits.h:91
boost::mpl::list< Triangle, Quadrilateral > DimElemList
Definition: grid_dim_traits.h:90
geometry_traits< Edge >::grid_base_object side_type
Definition: grid_dim_traits.h:99
geometry_traits< Face >::grid_base_object grid_base_object
Definition: grid_dim_traits.h:97
boost::mpl::list< Tetrahedron, Prism, Pyramid, Hexahedron, Octahedron > DimElemList
Definition: grid_dim_traits.h:107
geometry_traits< Volume >::grid_base_object element_type
Definition: grid_dim_traits.h:116
boost::mpl::list< RegularEdge, Triangle, Quadrilateral, Tetrahedron, Prism, Pyramid, Hexahedron, Octahedron > AllElemList
Definition: grid_dim_traits.h:109
geometry_traits< Face >::grid_base_object side_type
Definition: grid_dim_traits.h:117
geometry_traits< Volume >::iterator iterator
Definition: grid_dim_traits.h:113
boost::mpl::list< Triangle, Quadrilateral > ManifoldElemList
Definition: grid_dim_traits.h:110
geometry_traits< Volume >::const_iterator const_iterator
Definition: grid_dim_traits.h:112
geometry_traits< Volume >::grid_base_object grid_base_object
Definition: grid_dim_traits.h:115
Definition: grid_dim_traits.h:53