Dune Core Modules (2.3.1)

combinedgrapedisplay.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_COMBINEDGRAPEDISPLAY_HH
4#define DUNE_COMBINEDGRAPEDISPLAY_HH
5
6//- System includes
7#include <list>
8#include <vector>
9
10//- Dune includes
11
12#if HAVE_GRAPE
13//- Local includes
14#include "grapedatadisplay.hh"
15#endif
16
22namespace Dune
23{
24
29 template<class DisplayType>
31 {
32
33#if HAVE_GRAPE
34 typedef CombinedGrapeDisplay < DisplayType > MyDisplayType;
35
36 typedef typename DisplayType :: MyGridType GridType;
37 enum { dim = GridType :: dimension };
38 enum { dimworld = GridType :: dimensionworld };
39
40 // defined in griddisplay.hh
41 typedef typename GrapeInterface<dim,dimworld>::DUNE_ELEM DUNE_ELEM;
42 typedef typename GrapeInterface<dim,dimworld>::DUNE_FDATA DUNE_FDATA;
43 typedef typename GrapeInterface<dim,dimworld>::DUNE_DAT DUNE_DAT;
44 typedef typename GrapeInterface<dim,dimworld>::F_DATA F_DATA;
45 typedef typename GrapeInterface<dim,dimworld>::STACKENTRY STACKENTRY;
46
47 protected:
48 typedef typename std::list< DisplayType * > DisplayListType;
49 DisplayListType dispList_;
50
51 typedef typename DisplayListType :: iterator DisplayListIteratorType;
52 DisplayListIteratorType grditer_;
53 DisplayListIteratorType enditer_;
54
55 typedef typename std::list< void * > GridPartListType;
56 GridPartListType gridPartList_;
57 typedef typename GridPartListType :: iterator GridPartListIteratorType;
58 GridPartListIteratorType partEnd_;
59 GridPartListIteratorType partIter_;
60
61
62 DUNE_ELEM * dhel_;
63
64 // actual element data
65 DUNE_ELEM hel_;
66
67 // actual dat struct
68 DUNE_DAT dune_;
69#endif
70
71 // pointer to actual display
72 DisplayType * disp_;
73
74 public:
75 // no better way than this canot export HMESH structure to here
77 void *hmesh_;
78
79 public:
81 inline CombinedGrapeDisplay();
82
84 inline ~CombinedGrapeDisplay();
85
87 void addDisplay ( DisplayType & disp );
88
91 inline void display();
92
93#if HAVE_GRAPE
95 inline void * getHmesh();
96
97 inline void addMyMeshToGlobalTimeScene(double time, int proc);
98
99 private:
100 // generate hmesh
101 inline void * setupHmesh();
102
103 typedef typename DisplayType :: StackEntryType StackEntryType;
104 StackEntryType stackEntry_;
105
106 protected:
107 std::vector < DUNE_FDATA * > vecFdata_;
108 //****************************************************************
109 //
110 // --GrapeGridDisplay, Some Subroutines needed for display with GRAPE
111 //
112 //****************************************************************
113 inline int callFirstMacro(DUNE_ELEM * he) ;
114 // first and next macro element via LevelIterator level 0
115 inline int first_leaf (DUNE_ELEM * he) ;
116 inline int next_leaf (DUNE_ELEM * he) ;
117
118 // first and next macro element via LevelIterator level 0
119 inline int first_macro (DUNE_ELEM * he) ;
120 inline int next_macro (DUNE_ELEM * he) ;
121
122 // first and next child via HierarchicIterator with given maxlevel in Grape
123 inline int first_child (DUNE_ELEM * he) ;
124 inline int next_child (DUNE_ELEM * he) ;
125
126 inline static void * copy_iterator (const void * i) ;
127
128 // local to world
129 inline void local_to_world (DUNE_ELEM * he, const double * c, double * w);
130
131 // world to local
132 inline int world_to_local (DUNE_ELEM * he, const double * w, double * c);
133
134 // check inside reference element
135 inline int checkInside (DUNE_ELEM * he, const double * w);
136
137 // local to world
138 inline static void ctow (DUNE_ELEM * he, const double * c, double * w);
139
140 // world to local
141 inline static int wtoc (DUNE_ELEM * he, const double * w, double * c);
142
143 // check inside reference element
144 inline static int check_inside (DUNE_ELEM * he, const double * w);
145
146 // wrapper methods for first_child and next_child
147 inline static int first_mac (DUNE_ELEM * he);
148 inline static int next_mac (DUNE_ELEM * he);
149
150 // wrapper methods for first_child and next_child
151 inline static int fst_leaf (DUNE_ELEM * he);
152 inline static int nxt_leaf (DUNE_ELEM * he);
153
154 // wrapper methods for first_child and next_child
155 inline static int fst_child (DUNE_ELEM * he);
156 inline static int nxt_child (DUNE_ELEM * he);
157
159 inline void evalCoord (DUNE_ELEM *he, DUNE_FDATA *df,
160 const double *coord, double * val);
162 inline void evalDof (DUNE_ELEM *he, DUNE_FDATA *df, int localNum, double * val);
163
166 inline static void evalCoordWrap (DUNE_ELEM *he, DUNE_FDATA *df,
167 const double *coord, double * val);
170 inline static void evalDofWrap (DUNE_ELEM *he, DUNE_FDATA *df, int localNum, double * val);
171
172 // function to evaluate data
173 inline static void func_real (DUNE_ELEM *he , DUNE_FDATA * fe,int ind,
174 const double *coord, double *val);
175
176 inline void setIterationMethods(DUNE_DAT *, DUNE_FDATA *);
177 static inline void setIterationModus(DUNE_DAT *, DUNE_FDATA *);
178
179 static void * getStackEn(DUNE_DAT *);
180 static void freeStackEn(DUNE_DAT *, void *);
181#endif
182
183 }; // end class GrapeGridDisplay
184
185} // end namespace Dune
186
187#include "grape/combinedgrapedisplay.cc"
188#endif
Combines GrapeDataDisplays to one so that visualisation for parallel grid is more easy to handle.
Definition: combinedgrapedisplay.hh:31
void addDisplay(DisplayType &disp)
add display to list of displays
Definition: combinedgrapedisplay.cc:369
~CombinedGrapeDisplay()
Destructor for GrapeGridDisplay.
Definition: combinedgrapedisplay.cc:23
CombinedGrapeDisplay()
Constructor, make a GrapeGridDisplay for given grid.
Definition: combinedgrapedisplay.cc:14
void * hmesh_
pointer to hmesh
Definition: combinedgrapedisplay.hh:77
void display()
Definition: combinedgrapedisplay.cc:358
Provides a DataDisplay class using the GridDisplay and dune-fem module for class DiscreteFubctions su...
Dune namespace.
Definition: alignment.hh:14
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)