dune-mmesh (1.4)

defaults.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_MMESH_CGAL_DEFAULTS_HH
4#define DUNE_MMESH_CGAL_DEFAULTS_HH
5
6// CGAL includes
7#include "includes.hh"
8
9#define CGAL_NO_POSTCONDITIONS
10
15namespace Dune
16{
17 namespace MMeshDefaults
18 {
19
24 template< int dim >
25 struct ElementInfo {
26 std::size_t insertionIndex;
27 std::size_t index;
28 std::array< std::size_t, dim+1 > cgalIndex;
29 size_t domainMarker = 0;
30 int mark = 0;
31 bool isNew = false;
32 bool mightVanish = false;
33 std::size_t componentNumber = 0;
34 int rank = 0;
35 int partition = 0;
36 std::unordered_set<int> connectivity;
37 };
38
39 struct VertexInfo {
40 std::size_t id;
41 bool idWasSet = false;
42 std::size_t index;
43 std::size_t insertionLevel = 0;
44 bool isInterface = false;
45 int boundaryFlag = -1;
46 int partition = 0;
47 };
48
52 template<>
53 class Triangulation<2>
54 {
55 private:
56 typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
57
58 typedef CGAL::Triangulation_vertex_base_2<K> Vbbb;
59 typedef CGAL::Triangulation_vertex_base_with_info_2<VertexInfo, K, Vbbb> Vbb;
60 typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
61
62 typedef CGAL::Triangulation_face_base_2<K> Fbbb;
63 typedef CGAL::Triangulation_face_base_with_info_2<ElementInfo<2>, K, Fbbb> Fbb;
64 typedef CGAL::Triangulation_face_base_2<K,Fbb> Fb;
65
66 typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
67
68 public:
69 typedef CGAL::Triangulation_2<K, Tds> type;
70 };
71
72
76 template<>
77 class Triangulation<3>
78 {
79 private:
80 typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
81
82 typedef CGAL::Triangulation_vertex_base_with_info_3<VertexInfo, K> Vb;
83
84 typedef CGAL::Triangulation_cell_base_3<K> Fbb;
85 typedef CGAL::Triangulation_cell_base_with_info_3<ElementInfo<3>, K, Fbb> Fb;
86
87 typedef CGAL::Triangulation_data_structure_3<Vb, Fb> Tds;
88
89 public:
90 typedef CGAL::Triangulation_3<K, Tds> type;
91 };
92
93
97 template<>
98 class Delaunay<2>
99 {
100 private:
101 typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
102
103 typedef CGAL::Delaunay_mesh_vertex_base_2<K> Vbbb;
104 typedef CGAL::Triangulation_vertex_base_with_info_2<VertexInfo, K, Vbbb> Vbb;
105 typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
106
107 typedef CGAL::Delaunay_mesh_face_base_2<K> Fbbb;
108 typedef CGAL::Triangulation_face_base_with_info_2<ElementInfo<2>, K, Fbbb> Fbb;
109 typedef CGAL::Triangulation_face_base_2<K,Fbb> Fb;
110
111 typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
112
113 public:
114 typedef CGAL::Delaunay_triangulation_2<K, Tds> type;
115 };
116
117
121 template<>
122 class Delaunay<3>
123 {
124 private:
125 typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
126
127 typedef CGAL::Triangulation_vertex_base_with_info_3<VertexInfo, K> Vb;
128
129 typedef CGAL::Delaunay_triangulation_cell_base_3<K> Fbb;
130 typedef CGAL::Triangulation_cell_base_with_info_3<ElementInfo<3>, K, Fbb> Fb;
131
132 typedef CGAL::Triangulation_data_structure_3<Vb, Fb> Tds;
133
134 public:
135 typedef CGAL::Delaunay_triangulation_3<K, Tds> type;
136 };
137
138
139 } // end namespace MMeshDefaults
140
141} // end namespace Dune
142
143#endif
The element and vertex infos used by the dune-mmesh implementation.
Definition: defaults.hh:25
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 5, 23:02, 2025)