dune-grid  2.2.1
grapeinclude.hh
Go to the documentation of this file.
1 #ifndef DUNE_GRIDDISPLAY_HH
2 #define DUNE_GRIDDISPLAY_HH
3 
4 #include <cstdlib>
5 #include <iostream>
6 #include <cassert>
7 #include <cstdarg>
8 #include <cstring>
9 #include <iostream>
10 #include <stack>
11 #include <map>
12 #include <set>
13 #include <list>
14 
15 #if HAVE_GRAPE
16 #include "grapecommon.hh"
17 
18 namespace GrapeInterface_two_two
19 {
20 #define GRAPE_DIM 2
21 #define GRAPE_DIMWORLD 2
22 #undef GRAPE_GRAPEHMESH_HH_INCLUDED
23 #include "grapehmesh.hh"
24 }
25 
26 namespace GrapeInterface_two_three
27 {
28 #define GRAPE_DIM 2
29 #define GRAPE_DIMWORLD 3
30 #undef GRAPE_GRAPEHMESH_HH_INCLUDED
31 #include "grapehmesh.hh"
32 }
33 
34 namespace GrapeInterface_three_three
35 {
36 #define GRAPE_DIM 3
37 #define GRAPE_DIMWORLD 3
38 #undef GRAPE_GRAPEHMESH_HH_INCLUDED
39 #include "grapehmesh.hh"
40 }
41 
42 namespace Dune
43 {
44 
45 static int __MaxPartition = 1;
46 
47 // the interface to dune
48 template <int dim, int dimworld>
49 struct GrapeInterface;
50 
51 template<>
52 struct GrapeInterface<2,2>
53 {
54  static int called;
55  typedef GrapeInterface_two_two::DUNE_ELEM DUNE_ELEM;
56  typedef GrapeInterface_two_two::DUNE_FDATA DUNE_FDATA;
57  typedef GrapeInterface_two_two::DUNE_DAT DUNE_DAT;
58  typedef GrapeInterface_two_two::F_DATA F_DATA;
59  typedef GrapeInterface_three_three::HELEMENT HELEMENT;
61 
62  inline static void init()
63  {
65  GrapeInterface_two_two::setupReferenceElements();
66  }
67 
68  inline static void setThread(int t)
69  {
70  }
71 
72  inline static void setDefaultIterator(int val)
73  {
75  }
76 
77  inline static void handleMesh (void *hmesh, bool grdMode = false )
78  {
80  }
81 
82  inline static void addDataToHmesh(void *hmesh, DUNE_FDATA * data)
83  {
85  }
86 
87  inline static void *setupHmesh(const int noe,
88  const int nov, const int maxlev,DUNE_DAT * dune,
89  const char *meshName = "Dune Mesh" )
90  {
92  noe,nov,maxlev,dune,meshName);
93  }
94 
95  inline static void deleteHmesh( void * hmesh )
96  {
98  }
99 
100  inline static void deleteFunctions( void * hmesh )
101  {
103  }
104 
105  inline static void addHmeshToTimeScene(void * timescene, double time, void *hmesh , int proc)
106  {
107  GrapeInterface_two_two::addHmeshToTimeScene(timescene,time,hmesh,proc);
108  }
109 
110  inline static void addHmeshToGlobalTimeScene(double time, void *hmesh , int proc)
111  {
113  }
114 
115  inline static void colorBarMinMax(const double min, const double max)
116  {
118  }
119 };
120 
121 template <>
122 struct GrapeInterface<2,3>
123 {
124  static int called;
125  typedef GrapeInterface_two_three::DUNE_ELEM DUNE_ELEM;
126  typedef GrapeInterface_two_three::DUNE_FDATA DUNE_FDATA;
127  typedef GrapeInterface_two_three::DUNE_DAT DUNE_DAT;
128  typedef GrapeInterface_two_three::F_DATA F_DATA;
129  typedef GrapeInterface_two_three::HELEMENT HELEMENT;
131 
132  inline static void init()
133  {
135  GrapeInterface_two_three::setupReferenceElements();
136  }
137 
138  inline static void setThread(int t)
139  {
140  }
141 
142  inline static void setDefaultIterator(int val)
143  {
145  }
146 
147  inline static void handleMesh (void *hmesh, bool grdMode = false )
148  {
150  }
151 
152  inline static void addDataToHmesh(void *hmesh, DUNE_FDATA * data)
153  {
155  }
156 
157  inline static void *setupHmesh(const int noe,
158  const int nov, const int maxlev,DUNE_DAT * dune,
159  const char *meshName = "Dune Mesh" )
160  {
162  noe,nov,maxlev,dune, meshName);
163  }
164 
165  inline static void deleteHmesh( void * hmesh )
166  {
168  }
169 
170  inline static void deleteFunctions( void * hmesh )
171  {
173  }
174 
175  inline static void addHmeshToTimeScene(void * timescene, double time, void *hmesh , int proc)
176  {
177  GrapeInterface_two_three::addHmeshToTimeScene(timescene,time,hmesh,proc);
178  }
179 
180  inline static void addHmeshToGlobalTimeScene(double time, void *hmesh , int proc)
181  {
183  }
184 
185  inline static void colorBarMinMax(const double min, const double max)
186  {
188  }
189 };
190 
191 // the interface to dune for dim = dimworld = 3
192 template <>
193 struct GrapeInterface<3,3>
194 {
195  typedef GrapeInterface_three_three::DUNE_ELEM DUNE_ELEM;
196  typedef GrapeInterface_three_three::DUNE_FDATA DUNE_FDATA;
197  typedef GrapeInterface_three_three::DUNE_DAT DUNE_DAT;
198  typedef GrapeInterface_three_three::F_DATA F_DATA;
199  typedef GrapeInterface_three_three::HELEMENT HELEMENT;
201 
202  inline static void init()
203  {
206  GrapeInterface_three_three::setupReferenceElements();
207  }
208 
209  inline static void setThread(int t)
210  {
212  }
213 
214  inline static void setDefaultIterator(int val)
215  {
217  }
218 
219  inline static void handleMesh (void *hmesh, bool grdMode = false )
220  {
222  }
223 
224  inline static void addDataToHmesh(void *hmesh, DUNE_FDATA * data)
225  {
227  }
228 
229  inline static void *setupHmesh(const int noe,
230  const int nov, const int maxlev, DUNE_DAT * dune,
231  const char *meshName = "Dune Mesh" )
232  {
234  setupHmesh(noe,nov,maxlev,dune, meshName);
235  }
236 
237  inline static void deleteFunctions( void * hmesh )
238  {
240  }
241 
242  inline static void deleteHmesh( void * hmesh )
243  {
245  }
246 
247  inline static void addHmeshToTimeScene(void * timescene, double time, void *hmesh , int proc)
248  {
249  GrapeInterface_three_three::addHmeshToTimeScene(timescene,time,hmesh,proc);
250  }
251  inline static void addHmeshToGlobalTimeScene(double time, void *hmesh , int proc)
252  {
254  }
255 
256  inline static void colorBarMinMax(const double min, const double max)
257  {
259  }
260 };
261 
262 } // end namespace Dune
263 
264 #include "grapecommon.cc"
265 
266 #endif // #if HAVE_GRAPE
267 
268 #endif // #ifndef DUNE_GRIDDISPLAY_HH