combinedgrapedisplay.hh
Go to the documentation of this file.00001 #ifndef DUNE_COMBINEDGRAPEDISPLAY_HH
00002 #define DUNE_COMBINEDGRAPEDISPLAY_HH
00003
00004
00005 #include <list>
00006 #include <vector>
00007
00008
00009
00010
00011 #include "grapedatadisplay.hh"
00012
00018 namespace Dune
00019 {
00020
00025 template<class DisplayType>
00026 class CombinedGrapeDisplay
00027 {
00028 typedef CombinedGrapeDisplay < DisplayType > MyDisplayType;
00029
00030 typedef typename DisplayType :: MyGridType GridType;
00031 enum { dim = GridType :: dimension };
00032 enum { dimworld = GridType :: dimensionworld };
00033
00034
00035 typedef typename GrapeInterface<dim,dimworld>::DUNE_ELEM DUNE_ELEM;
00036 typedef typename GrapeInterface<dim,dimworld>::DUNE_FDATA DUNE_FDATA;
00037 typedef typename GrapeInterface<dim,dimworld>::DUNE_DAT DUNE_DAT;
00038 typedef typename GrapeInterface<dim,dimworld>::F_DATA F_DATA;
00039 typedef typename GrapeInterface<dim,dimworld>::STACKENTRY STACKENTRY;
00040
00041 protected:
00042 typedef typename std::list< DisplayType * > DisplayListType;
00043 DisplayListType dispList_;
00044
00045 typedef typename DisplayListType :: iterator DisplayListIteratorType;
00046 DisplayListIteratorType grditer_;
00047 DisplayListIteratorType enditer_;
00048
00049 typedef typename std::list< void * > GridPartListType;
00050 GridPartListType gridPartList_;
00051 typedef typename GridPartListType :: iterator GridPartListIteratorType;
00052 GridPartListIteratorType partEnd_;
00053 GridPartListIteratorType partIter_;
00054
00055
00056
00057 DisplayType * disp_;
00058
00059 DUNE_ELEM * dhel_;
00060
00061
00062 DUNE_ELEM hel_;
00063
00064
00065 DUNE_DAT dune_;
00066
00067 public:
00068
00070 void *hmesh_;
00071
00072 public:
00074 inline CombinedGrapeDisplay();
00075
00077 inline ~CombinedGrapeDisplay();
00078
00080 void addDisplay ( DisplayType & disp );
00081
00084 inline void display();
00085
00087 inline void * getHmesh();
00088
00089 inline void addMyMeshToGlobalTimeScene(double time, int proc);
00090
00091 private:
00092
00093 inline void * setupHmesh();
00094
00095 typedef typename DisplayType :: StackEntryType StackEntryType;
00096 StackEntryType stackEntry_;
00097
00098 protected:
00099 std::vector < DUNE_FDATA * > vecFdata_;
00100
00101
00102
00103
00104
00105 inline int callFirstMacro(DUNE_ELEM * he) ;
00106
00107 inline int first_leaf (DUNE_ELEM * he) ;
00108 inline int next_leaf (DUNE_ELEM * he) ;
00109
00110
00111 inline int first_macro (DUNE_ELEM * he) ;
00112 inline int next_macro (DUNE_ELEM * he) ;
00113
00114
00115 inline int first_child (DUNE_ELEM * he) ;
00116 inline int next_child (DUNE_ELEM * he) ;
00117
00118 inline static void * copy_iterator (const void * i) ;
00119
00120
00121 inline void local_to_world (DUNE_ELEM * he, const double * c, double * w);
00122
00123
00124 inline int world_to_local (DUNE_ELEM * he, const double * w, double * c);
00125
00126
00127 inline int checkInside (DUNE_ELEM * he, const double * w);
00128
00129
00130 inline static void ctow (DUNE_ELEM * he, const double * c, double * w);
00131
00132
00133 inline static int wtoc (DUNE_ELEM * he, const double * w, double * c);
00134
00135
00136 inline static int check_inside (DUNE_ELEM * he, const double * w);
00137
00138
00139 inline static int first_mac (DUNE_ELEM * he);
00140 inline static int next_mac (DUNE_ELEM * he);
00141
00142
00143 inline static int fst_leaf (DUNE_ELEM * he);
00144 inline static int nxt_leaf (DUNE_ELEM * he);
00145
00146
00147 inline static int fst_child (DUNE_ELEM * he);
00148 inline static int nxt_child (DUNE_ELEM * he);
00149
00151 inline void evalCoord (DUNE_ELEM *he, DUNE_FDATA *df,
00152 const double *coord, double * val);
00154 inline void evalDof (DUNE_ELEM *he, DUNE_FDATA *df, int localNum, double * val);
00155
00158 inline static void evalCoordWrap (DUNE_ELEM *he, DUNE_FDATA *df,
00159 const double *coord, double * val);
00162 inline static void evalDofWrap (DUNE_ELEM *he, DUNE_FDATA *df, int localNum, double * val);
00163
00164
00165 inline static void func_real (DUNE_ELEM *he , DUNE_FDATA * fe,int ind,
00166 const double *coord, double *val);
00167
00168 inline void setIterationMethods(DUNE_DAT *, DUNE_FDATA *);
00169 static inline void setIterationModus(DUNE_DAT *, DUNE_FDATA *);
00170
00171 static void * getStackEn(DUNE_DAT *);
00172 static void freeStackEn(DUNE_DAT *, void *);
00173
00174 };
00175
00176 }
00177
00178 #include "grape/combinedgrapedisplay.cc"
00179 #endif