00001
00002
00003 #ifndef _included_GridHierarchy_h
00004 #define _included_GridHierarchy_h
00005
00011 #include "DAGHParams.h"
00012 #include "DAGHDefaults.h"
00013
00014 #include "DAGHDistribution.h"
00015
00016 #include "GridUnitList.h"
00017 #include "GridBoxList.h"
00018 #include "BBoxList.h"
00019
00020 #include "DCoords.h"
00021
00022 #include "CommServer.h"
00023 #include "CommIOServer.h"
00024
00025 #include "GridFunctionVoid.h"
00026 #include "AllocError.h"
00027
00028 #include <iosfwd>
00029
00030
00031 #ifdef DAGH_IOV
00032 #include <RawTCP.H>
00033 #endif
00034
00035
00036
00037
00038 struct dimspec {
00039 double low;
00040 double high;
00041 double h;
00042 double hfine;
00043 unsigned n;
00044 unsigned nfine;
00045 inline dimspec():low(0),high(0),h(0),hfine(0),n(0),nfine(0) {}
00046 };
00047
00048
00049
00050
00051
00052 struct MergedGridUnit {
00053 BBox bb;
00054 GridUnitList gul;
00055 };
00056
00057
00058
00059
00060
00061 inline double toWorld(struct dimspec const &ds, const int lc)
00062 { return (ds.low + (lc*ds.hfine)); }
00063 inline double toWorldLower(struct dimspec const &ds, const int lc)
00064 { return (ds.high*((1.0*lc)/(1.0*ds.nfine)) +
00065 ds.low*(1.0 - (1.0*lc)/(1.0*ds.nfine))); }
00066 inline double toWorldUpper(struct dimspec const &ds, const int lc,
00067 const int step, const int olap)
00068 { return (ds.high*((1.0*(lc+(1-olap)*step))/(1.0*ds.nfine)) +
00069 ds.low*(1.0 - (1.0*(lc+(1-olap)*step))/(1.0*ds.nfine))); }
00070 inline int toLocal(struct dimspec const &ds, double const wc)
00071 { return ((int) ((wc - ds.low)/ds.hfine)); }
00072
00073
00074
00075
00076
00077
00078 void DAGHIO_EndIOPingFunction(GridHierarchy &GH);
00079
00080
00081 #ifdef DAGH_IOV
00082
00083
00084
00085 void WriteStream(GridHierarchy& GH, RawTCPport* Server, const GridBoxList& cgbl);
00086
00087 #endif
00088
00089 #ifndef DAGHDefaultDistribution
00090 #define DAGHDefaultDistribution (DAGHCompositeDistribution)
00091 #endif
00092
00093 #ifndef DAGHDefaultPartMinGUWidth
00094 #define DAGHDefaultPartMinGUWidth (1)
00095 #endif
00096 #ifndef DAGHDefaultRefineMinGUWidth
00097 #define DAGHDefaultRefineMinGUWidth (1)
00098 #endif
00099
00100 #ifndef DAGHDefaultBoundary
00101 #define DAGHDefaultBoundary (DAGHBoundaryRegular)
00102 #endif
00103
00104 #ifndef DAGHDefaultAdaptBoundary
00105 #define DAGHDefaultAdaptBoundary (DAGHAdaptBoundaryInterp)
00106 #endif
00107
00108 #ifndef DAGHDefaultRefineFactor
00109 #define DAGHDefaultRefineFactor (2)
00110 #endif
00111
00112 #ifndef DAGHDefaultRefineLevel
00113 #define DAGHDefaultRefineLevel (1)
00114 #endif
00115
00116 #ifndef DAGHMaxIOTypes
00117 #define DAGHMaxIOTypes (5)
00118 #endif
00119
00120 #ifndef DAGHChkPtTagNameSize
00121 #define DAGHChkPtTagNameSize (256)
00122 #endif
00123
00143 class GridHierarchy
00144 {
00145 friend std::ostream& operator<<(std::ostream& os, const GridHierarchy& );
00146 friend std::ofstream& operator<<(std::ofstream& ofs, const GridHierarchy&);
00147 friend std::ifstream& operator>>(std::ifstream& ifs, GridHierarchy&);
00148 friend std::stringstream& operator<<(std::stringstream& ofs,
00149 const GridHierarchy&);
00150 friend std::stringstream& operator>>(std::stringstream& ifs,
00151 GridHierarchy&);
00152
00153 public:
00155 short const rank;
00156
00157 private:
00159 struct dimspec dspecs[DAGHMaxRank];
00161 struct dimspec tspecs;
00163 BBox basebbox;
00164
00166 short daghtype;
00168 short overlap[DAGHMaxRank];
00169
00171 short bndrytype;
00173 short adaptbndrytype;
00175 short bndrywidth;
00177 short bndryperiodic[DAGHMaxRank];
00178 short periodicidx[DAGHMaxRank];
00179
00181 short extghostwidth;
00182
00183
00185 short levels;
00187 short maxlev;
00189 short crslev;
00191 short *refby;
00192
00194 short finelev;
00195
00197 BBox intbbox;
00199 BBoxList* intbaselist;
00201 double* bndrycoords;
00202 int nbndrycoords;
00203
00204
00205 BBox* cutbbox;
00206 int ncutbbox;
00207
00209 int *curtime;
00210
00212 int updatedstep;
00213
00214
00215 int nestbuffer;
00216
00217
00218 int cfactor;
00219 int guwidth;
00220
00221
00222 int maxgridsize;
00223
00224
00225 int timerefine;
00226
00227 public:
00229 short distribution_type;
00230 DAGHDistribution* distribution;
00231
00232 public:
00233
00235 GridUnitList *complist;
00237 GridBoxList **globalgbl, **oldglobalgbl;
00238
00239
00241 GridUnitList *locallist;
00243 GridBoxList **localgbl, **oldlocalgbl;
00245 BBoxList** localbboxarray;
00246
00247 public:
00249 short gfnum;
00250 GridFunctionVoid **gflist;
00251
00253 short io_type;
00254 DAGHIOServerRcv *io_write_server;
00255 DAGHIOServerSnd *io_read_server;
00256 DAGHIOServerPing *io_flush_server;
00257 DAGHIOServerPing *io_close_server;
00258 DAGHIOServerPing *io_end_server;
00259
00260 private:
00262 short chkptflag;
00263 int chkptpnum;
00264 char chkptname[DAGHChkPtTagNameSize];
00265
00266 #ifdef DAGH_IOV
00267 private:
00268 RawTCPserver *ServerPort;
00269 RawTCPport *Server;
00270 #endif
00271
00272 private:
00273
00274
00275
00276 GridHierarchy(GridHierarchy const &other);
00277 GridHierarchy const &operator= (GridHierarchy const &other);
00278
00279 public:
00280
00281
00282
00283 GridHierarchy(const int ndim, const int type, const int max_level);
00284
00285
00286
00287
00288 ~GridHierarchy(void);
00289
00290
00291
00292
00293 public:
00294 void DAGH_SetBaseGrid(double const *bbox, const int *shape,
00295 const int& ncuts, const int *cuts);
00296 void DAGH_SetTimeSpecs(double const starttime,
00297 double const stoptime,
00298 const int ntsteps);
00299 inline void DAGH_GetTimeSpecs(double& starttime, double& stoptime) {
00300 starttime = tspecs.low;
00301 stoptime = tspecs.high;
00302 }
00303
00304 inline void DAGH_SetBoundaryType(const int type)
00305 { bndrytype = type; }
00306 inline void DAGH_SetAdaptBoundaryType(const int type)
00307 { adaptbndrytype = type; }
00308 inline void DAGH_SetBoundaryWidth(const int width)
00309 { bndrywidth = width; }
00310 inline void DAGH_SetPeriodicBoundaries(const int dir, const int value)
00311 { if (dir>=0 && dir<rank) bndryperiodic[dir] = value; }
00312
00313 inline void DAGH_SetExternalGhostWidth(const int width)
00314 { extghostwidth = width; }
00315
00316 void DAGH_SetRefineFactor(const int rfactor);
00317 void DAGH_SetRefineFactor(const int lev, const int rfactor);
00318
00319 inline void DAGH_SetDistributionType(const int type)
00320 { distribution_type = type; if (distribution) distribution->set_dist(type); }
00321 inline void DAGH_SetDistributionType(const int type, BBoxList& bbl)
00322 { distribution_type = type; if (distribution) distribution->set_dist(type,bbl); }
00323
00324 inline void DAGH_SetWorkFunction(void *wf)
00325 { if (distribution) distribution->set_workfunc(wf); }
00326
00327 inline void DAGH_SetNestingBuffer(const int& nb)
00328 { nestbuffer = nb; }
00329
00330
00331
00332
00333 private:
00334 void DAGH_PeriodicAppendTogbl(GridBoxList *gbl, GridBox* gb, const BBox& bbox,
00335 const BBox& bbtest, const int dir, const int base,
00336 const int maxlength);
00337 public:
00338 void DAGH_PeriodicBoundaries(GridBoxList *gbl, GridBoxList *agbl);
00339
00340
00341
00342
00343 private:
00344 BBox shrinktoroot(BBox& bb);
00345 BBox growtoroot(BBox& bb);
00346 BBoxList* shrinktoroot(BBoxList& bbl);
00347 BBoxList* growtoroot(BBoxList& bbl);
00348
00349 int countcells(BBox& bb, BBoxList** bbla, int count);
00350 public:
00351 void DAGH_CreateGridUnitList(GridUnitList*& gul, BBoxList** bbla, int count=DAGHFalse);
00352 void DAGH_CreateGridUnitList(GridUnitList*& gul, const BBox& _bb);
00353 void DAGH_CreateBBoxList(BBoxList*& bbl, GridUnitList& gul);
00354
00355 public:
00357 void DAGH_ComposeHierarchy(void);
00358
00359
00360
00361
00362 public:
00363 int DAGH_AddGridFunction(GridFunctionVoid *gfv);
00364 inline void DAGH_DelGridFunction(const int gfid)
00365 {
00366 gflist[gfid] = (GridFunctionVoid *) 0;
00367 if (comm_service::dce()) comm_service::delete_comm(gfid);
00368 gfnum--;
00369 }
00370
00371 inline void DAGH_ComposeGridFunctions(void)
00372 {
00373 for (register int i=0; i<gfnum; i++)
00374 { if (gflist[i]) gflist[i]->GF_Compose(); }
00375 if (chkpt_restart()) {
00376 for (register int i=0; i<gfnum; i++)
00377 { if (gflist[i] && gflist[i]->checkpoint())
00378 gflist[i]->GF_CheckpointRestart(); }
00379 }
00380 }
00381
00382 inline int DAGH_GridFunctionTemplate(GridFunctionVoid& gfv)
00383 { return (DAGHTemplateComm + gfv.gfid); }
00384
00385
00386
00387
00388 public:
00400 void DAGH_RecomposeHierarchy(int Partition);
00401 inline void DAGH_RecomposeHierarchy() { DAGH_RecomposeHierarchy(DAGHTrue); }
00402
00403 public:
00405 void DAGH_Refine(const int lev);
00410 void DAGH_Refine(BBoxList &bblist, const int lev);
00411
00412
00413
00414
00415 public:
00416 inline void DAGH_RedistributeHierarchy(const int type)
00417 { if (distribution) distribution->set_dist(type); DAGH_RecomposeHierarchy(); }
00418 inline void DAGH_RedistributeHierarchy(const int type, BBoxList& bbl)
00419 { if (distribution) distribution->set_dist(type,bbl); DAGH_RecomposeHierarchy(); }
00420
00421
00422
00423
00424 public:
00426 void DAGH_Checkpoint(const char* name);
00428 void DAGH_Checkpoint(std::stringstream& ofs);
00429 int DAGH_Checkpoint_StrStream_Memory();
00430
00431 void DAGH_ComposeHierarchy(const char* name);
00433 bool DAGH_RecomposeHierarchy(const char* name);
00435 void DAGH_RecomposeHierarchy(std::stringstream& ifs);
00436
00437 void DAGH_InitChkpt(const char* name) {
00438 chkptflag = DAGHTrue;
00439 std::strncpy(chkptname,name,DAGHChkPtTagNameSize);
00440 chkptname[DAGHChkPtTagNameSize-1] = '\0';
00441 }
00442 void DAGH_InitChkpt()
00443 { chkptflag = DAGHTrue; }
00444 void DAGH_StopChkpt()
00445 { chkptflag = DAGHFalse; chkptname[0] = '\0'; chkptpnum = 0; }
00446
00447 int DAGH_OpenChkptIStream(const int p,
00448 std::ifstream& ifs);
00449 void DAGH_CloseChkptIStream(std::ifstream& ifs);
00450
00451 int DAGH_OpenChkptIStream(const int p,
00452 std::streampos*& chkptdir,
00453 char*& chkptnamedir,
00454 std::ifstream& ifs);
00455 int DAGH_OpenChkptStrStream(std::streampos*& chkptdir,
00456 char*& chkptnamedir,
00457 std::stringstream& ifs);
00458
00459 void DAGH_CloseChkptIStream(std::streampos*& chkptdir,
00460 char*& chkptnamedir,
00461 std::ifstream& ifs);
00462
00463 void DAGH_CloseChkptStrStream(std::streampos*& chkptdir,
00464 char*& chkptnamedir,
00465 std::stringstream& ifs)
00466 { if (chkptdir) delete [] chkptdir;
00467 if (chkptnamedir) delete [] chkptnamedir; }
00468
00469 int DAGH_GetGFChkptIStream(const int p, const char* gfname,
00470 const int gfid,
00471 std::ifstream& ifs);
00472 int DAGH_GetGFChkptStrStream(const char* gfname,
00473 const int gfid,
00474 std::stringstream& ifs);
00475
00476 int DAGH_OpenChkptOStream(const int p,
00477 std::ofstream& ofs);
00478 void DAGH_CloseChkptOStream(std::ofstream& ofs);
00479
00480
00481
00482
00483 void DAGH_GlbConcat(void *snddata, int sndsize, void *&rcvdata,
00484 int &rcvsize, MPI_Comm Cin=0);
00485
00486
00487
00488 void DAGH_PingIONode(const int tag, int flg);
00489 public:
00490 int DAGH_CommInit(MPI_Comm c = 0);
00491 void DAGH_CommKill(void);
00492
00493
00494
00495
00496 public:
00497 static void DAGH_InitOverlaps(const int Type, short* olap)
00498 { if (Type == DAGHCellCentered)
00499 {olap[0] = 0; olap[1] = 0; olap[2] = 0; }
00500 else if (Type == DAGHVertexCentered)
00501 {olap[0] = 1; olap[1] = 1; olap[2] = 1; }
00502 else if (Type == DAGHFaceCentered_X)
00503 {olap[0] = 1; olap[1] = 0; olap[2] = 0; }
00504 else if (Type == DAGHFaceCentered_Y)
00505 {olap[0] = 0; olap[1] = 1; olap[2] = 0; }
00506 else if (Type == DAGHFaceCentered_Z)
00507 {olap[0] = 0; olap[1] = 0; olap[2] = 1; } }
00508
00509
00510
00511
00512
00513 private:
00514 inline int daghoverlapCC_or_NCC() const
00515 { return ((daghtype==DAGHCellCentered) ? 0 : 1); }
00516
00517 inline const short* daghoverlap() const
00518 { return (overlap); }
00519
00520 inline int daghoverlap(const int dir) const
00521 { return (overlap[dir]); }
00522
00523
00524
00525 public:
00526 static int daghoverlapCC_or_NCC(const int type)
00527 { return((type==DAGHCellCentered) ? 0 : 1); }
00528
00529
00530
00531
00532 public:
00533 inline int default_alignment(const int r) const
00534 { return ((r == rank) ? DAGH_All :
00535 (r == 3) ? DAGH_All :
00536 (r == 2) ? DAGH_XY : DAGH_X); }
00537
00538
00539
00540 public:
00541 inline int dagh_type(void) const { return daghtype; }
00542
00543 inline int boundarywidth(void) const { return bndrywidth; }
00544 inline int boundarytype(void) const { return bndrytype; }
00545 inline int adaptboundarytype(void) const { return adaptbndrytype; }
00546 inline int periodicboundary(const int d) const { return bndryperiodic[d]; }
00547 inline int periodicindex(const int d) const { return periodicidx[d]; }
00548
00549 inline int externalghostwidth(void) const { return extghostwidth; }
00550
00551 inline int totallevels(void) const { return levels; }
00552
00553 inline int coarselevel(void) const { return crslev; }
00554 inline int maxlevel(void) const { return maxlev; }
00555 inline int finelevel(void) const { return finelev; }
00556
00559 inline int stepsize(const int lev) const {
00560 int ret=1; for (register int l=Max(0,lev); l<levels-1; l++) ret *= refby[l]; return (ret);
00561 }
00562 inline int timestep(const int lev) const {
00563 int ret=1; for (register int l=Max(0,lev); l<levels-1; l++) ret *= refby[l]; return (ret);
00564 }
00566 inline int stepstaken(const int t, const int l) const
00567 { return (t/timestep(l)); }
00569 inline double delta_t(const int l) const
00570 { return (tspecs.h/refinedby(l)); }
00572 inline double delta_x(const int dim, const int l) const
00573 { return (dspecs[dim].h/refinedby(l)); }
00574
00576 inline int refinefactor(const int lev) const
00577 { return (lev>=0 && lev<levels ? refby[lev] : 1); }
00579 inline int refinedby(const int lev) const {
00580 int ret=1; for (register int l=0; l<Min(lev,levels); l++) ret *= refby[l]; return (ret);
00581 }
00583 int refinedby(const int l1, const int l2) const {
00584 int ret=1;
00585 if (l1>=0 && l2>=0 && l1<levels && l2<levels) {
00586 if (l2<l1)
00587 for (register int l=l2; l<l1; l++)
00588 ret *= refby[l];
00589 else if (l2>l1) {
00590 ret = -1;
00591 for (register int l=l1; l<l2; l++)
00592 ret *= refby[l];
00593 }
00594 }
00595 return (ret);
00596 }
00597
00599 inline int buffer() const { return nestbuffer; }
00600
00608 inline const int& gucfactor() const { return cfactor; }
00610 inline const int& guminwidth() const { return guwidth; }
00612 inline void setgucfactor(const int& cfac) {
00613 cfactor = cfac;
00614 guwidth = (int)(std::log((double)cfactor)/std::log((double)2.0));
00615 if (guwidth<std::log((double)cfactor)/std::log((double)2.0)) guwidth++;
00616 }
00617
00619 inline const int& maxGridBoxSize() const { return maxgridsize; }
00620 inline void setmaxGridBoxSize(const int& mgsize) { maxgridsize = mgsize; }
00621
00623 inline const int& timerefinewl() const { return timerefine; }
00624 inline void settimerefinewl(const int& tref) { timerefine = tref; }
00625
00626
00627
00628
00629 inline int updatedvaluestep() const { return updatedstep; }
00630 inline void setupdatedvaluestep(const int ustep) { updatedstep = ustep; }
00631
00632
00633
00634
00635 void chkpt_filename(std::ostringstream& obuf,
00636 const char* name, const int p);
00637 inline int chkpt_restart(void) const
00638 { return (chkptflag == DAGHTrue); }
00639 inline const char* chkpt_name(void) const
00640 { return chkptname; }
00641 inline int chkpt_pnum(void) const
00642 { return chkptpnum; }
00643 inline void chkpt_reset(void)
00644 { chkptflag = DAGHFalse; chkptname[0] = '\0'; chkptpnum = 0; }
00645
00646
00647
00648
00649 public:
00654 inline int getCurrentTime(const int lev) const
00655 { return curtime[lev] ; }
00656 inline void setCurrentTime(const int ctime, const int lev)
00657 { curtime[lev] = ctime; }
00659 inline void incrCurrentTime(const int lev)
00660 { curtime[lev] += timestep(lev); }
00661
00663 inline int getPreviousTime(const int lev) const
00664 { return curtime[lev] - timestep(lev); }
00666 inline int getNextTime(const int lev) const
00667 { return curtime[lev] + timestep(lev); }
00668
00669
00670
00671
00672 public:
00673 inline int GlobalLength(int lev) { return (globalgbl[lev] ? globalgbl[lev]->number() : 0); }
00674 inline int GlobalMaxIndex(int lev) { return (globalgbl[lev] ? globalgbl[lev]->maxindex() : 0); }
00675 inline int LocalLength(int lev) { return (localgbl[lev] ? localgbl[lev]->number() : 0); }
00676
00677 inline GridUnitList* clist() { return (complist); }
00678 inline GridUnitList* llist() { return (locallist); }
00679
00681 inline GridBoxList** lgbl() { return (localgbl); }
00683 inline GridBoxList** ggbl() { return (globalgbl); }
00684 inline GridBoxList** oldlgbl() { return (oldlocalgbl); }
00685 inline GridBoxList** oldggbl() { return (oldglobalgbl); }
00686
00688 inline GridBoxList* lgbl(int lev) { return (localgbl[lev]); }
00690 inline GridBoxList* ggbl(int lev) { return (globalgbl[lev]); }
00691 inline GridBoxList* oldlgbl(int lev) { return (oldlocalgbl[lev]); }
00692 inline GridBoxList* oldggbl(int lev) { return (oldglobalgbl[lev]); }
00693
00694
00695 void llb(int *lc) const;
00696 void lub(int *lc) const;
00697
00699 inline Coords llb(void) const { return (basebbox.lower()); }
00700 inline Coords lub(void) const { return (basebbox.upper()); }
00701
00702
00703 void wlb(double *wc) const;
00704 void wub(double *wc) const;
00705
00707 DCoords worldCoords(const int *lc, const int *ls) const;
00708 DCoords worldCoordsUpper(const int *lc, const int *ls) const;
00709 DCoords worldCoordsLower(const int *lc, const int *ls) const;
00710 DCoords worldStep(const int *ls) const;
00711
00712 void worldCoords(const int *lc, const int *ls, double *wc) const;
00713 void worldStep(const int *ls, double *ws) const;
00714
00715
00716 Coords localCoords(double const *wc) const;
00717 Coords localStep(double const *ws) const;
00718
00719 void localCoords(double const *wc, int *lc) const;
00720 void localStep(double const *ws, int *ls) const;
00721
00722
00723
00724
00725 public:
00727 inline BBox bbbox(void) const { return basebbox; }
00728 inline BBox glbbbox(void) const { return intbbox; }
00730 inline BBox wholebbox(void) const
00731 { return shrinkupperbydim(intbbox,daghoverlap()); }
00733 inline BBoxList* wholebaselist(void) const { return intbaselist; };
00735 inline const double* wholebndry(void) const { return bndrycoords; }
00736 inline const int& nbndry(void) const { return nbndrycoords; }
00737
00738
00739 void glb_bboxlist(BBoxList& bbl,
00740 const int l,
00741 const int type=DAGHCellCentered) const;
00742 void glb_bboxlist(BBoxList& bbl, const int l,
00743 const int type, BBox& bb) const;
00744
00745
00746
00747 public:
00748 void DAGH_IOServe(void);
00749 inline void DAGH_SetIOType(const short type) { io_type = type; }
00750 inline const short& DAGH_IOType(void) { return io_type; }
00751 inline DAGHIO_WriteFunc DAGH_IOWrite(void) { return DAGHIO_Write[io_type]; }
00752 inline DAGHIO_ReadFunc DAGH_IORead(void) { return DAGHIO_Read[io_type]; }
00753 void DAGH_IOFlush(void);
00754 void DAGH_IOClose(void);
00755 void DAGH_IOEnd(void);
00756 friend void DAGHIO_EndIOPingFunction(GridHierarchy &GH);
00757
00758
00759
00760
00761 public:
00762 inline void DAGH_SyncGhostRegions(const int t, const int l)
00763 {
00764 register int i;
00765 for (i=0; i<gfnum; i++)
00766 if (gflist[i] && gflist[i]->comm())
00767 gflist[i]->GF_WriteGhosts(t,l);
00768 for (i=0; i<gfnum; i++)
00769 if (gflist[i] && gflist[i]->comm())
00770 gflist[i]->GF_ReadGhosts(t,l);
00771 }
00772
00773 inline void DAGH_SyncGhostRegions(const int t, const int l,
00774 const int axis, const int dir)
00775 {
00776 register int i;
00777 for (i=0; i<gfnum; i++)
00778 if (gflist[i] && gflist[i]->comm())
00779 gflist[i]->GF_WriteGhosts(t,l,axis,dir);
00780 for (i=0; i<gfnum; i++)
00781 if (gflist[i] && gflist[i]->comm())
00782 gflist[i]->GF_ReadGhosts(t,l,axis,dir);
00783 }
00784 };
00785
00786 std::ostream& operator<<(std::ostream&, const GridHierarchy&);
00787 std::ostream& operator<<(std::ostream&, const struct dimspecs&);
00788 std::ostream& operator<<(std::ostream&, const struct MergedGridUnit&);
00789
00790 std::ofstream& operator<<(std::ofstream&, const GridHierarchy&);
00791 std::ifstream& operator>>(std::ifstream&, GridHierarchy&);
00792 std::stringstream& operator<<(std::stringstream&, const GridHierarchy&);
00793 std::stringstream& operator>>(std::stringstream&, GridHierarchy&);
00794
00795
00796 #endif