Blockstructured Adaptive Mesh Refinement in object-oriented C++
00001 #ifndef _included_GridTable_h 00002 #define _included_GridTable_h 00003 00009 #include "DAGHParams.h" 00010 00011 #include "GridBox.h" 00012 #include "GridBoxList.h" 00013 00014 #include "PackedGridDataBucket.h" 00015 00016 #include "List.h" 00017 00018 #include "CommServer.h" 00019 00020 #define GridTableNULL ((GridTable *) NULL) 00021 00026 class GridTable 00027 { 00028 friend ostream& operator<<(ostream&, const GridTable&); 00029 00030 public: 00031 const short gfid; 00032 00033 private: 00034 short numtsteps; 00035 short numlevels; 00036 List<GridDataBucketVoid*>* _data; 00037 List<GridDataBucketVoid*>* _ghosts; 00038 00039 static List<GridDataBucketVoid*>* _nulldata; 00040 00041 private: 00042 /* To prevent user from copying/assigning this class */ 00043 GridTable(const GridTable&); 00044 void operator = (const GridTable&); 00045 00046 public: 00047 inline GridTable(const int gf, 00048 const int levs, 00049 const int ntsteps) 00050 : gfid(gf), numtsteps(ntsteps), numlevels(levs), 00051 _data(0), _ghosts(0) 00052 { _data = new List<GridDataBucketVoid*>[numtsteps]; 00053 _ghosts = new List<GridDataBucketVoid*>[numtsteps*numlevels]; } 00054 00055 inline ~GridTable() 00056 { if (_data) delete [] _data; if (_ghosts) delete [] _ghosts; } 00057 00058 inline List<GridDataBucketVoid*>& data(const int t) 00059 { return (_data[t]); } 00060 00061 inline List<GridDataBucketVoid*>& ghosts(const int t, const int l) 00062 { return (_ghosts[t*numlevels+l]); } 00063 00064 void resettable(); 00065 00066 /* Communications methods */ 00067 int send(const unsigned tag, GridDataBucketVoid* gdbkt, 00068 const int dest); 00069 }; 00070 00071 #endif
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04