GridHierarchy Class Reference

GridHierarchy stores the hierarchical structure on an adaptive application. More...

#include <GridHierarchy.h>

List of all members.

Public Member Functions

 GridHierarchy (const int ndim, const int type, const int max_level)
 ~GridHierarchy (void)
void DAGH_SetBaseGrid (double const *bbox, const int *shape, const int &ncuts, const int *cuts)
void DAGH_SetTimeSpecs (double const starttime, double const stoptime, const int ntsteps)
void DAGH_GetTimeSpecs (double &starttime, double &stoptime)
void DAGH_SetBoundaryType (const int type)
void DAGH_SetAdaptBoundaryType (const int type)
void DAGH_SetBoundaryWidth (const int width)
void DAGH_SetPeriodicBoundaries (const int dir, const int value)
void DAGH_SetExternalGhostWidth (const int width)
void DAGH_SetRefineFactor (const int rfactor)
void DAGH_SetRefineFactor (const int lev, const int rfactor)
void DAGH_SetDistributionType (const int type)
void DAGH_SetDistributionType (const int type, BBoxList &bbl)
void DAGH_SetWorkFunction (void *wf)
void DAGH_SetNestingBuffer (const int &nb)
void DAGH_PeriodicBoundaries (GridBoxList *gbl, GridBoxList *agbl)
void DAGH_CreateGridUnitList (GridUnitList *&gul, BBoxList **bbla, int count=(0))
void DAGH_CreateGridUnitList (GridUnitList *&gul, const BBox &_bb)
void DAGH_CreateBBoxList (BBoxList *&bbl, GridUnitList &gul)
void DAGH_ComposeHierarchy (void)
 Compose the grid hierarchy.
int DAGH_AddGridFunction (GridFunctionVoid *gfv)
void DAGH_DelGridFunction (const int gfid)
void DAGH_ComposeGridFunctions (void)
int DAGH_GridFunctionTemplate (GridFunctionVoid &gfv)
void DAGH_RecomposeHierarchy (int Partition)
 Recompose the whole hierachy and all associated GridFunctions.
void DAGH_RecomposeHierarchy ()
void DAGH_Refine (const int lev)
 Use entire level as new refinement region.
void DAGH_Refine (BBoxList &bblist, const int lev)
 Sets refinement regions on a particular level.
void DAGH_RedistributeHierarchy (const int type)
void DAGH_RedistributeHierarchy (const int type, BBoxList &bbl)
void DAGH_Checkpoint (const char *name)
 Write GridHierarchy into checkpointing-file.
void DAGH_Checkpoint (std::stringstream &ofs)
 Write GridHierarchy into memory.
int DAGH_Checkpoint_StrStream_Memory ()
void DAGH_ComposeHierarchy (const char *name)
bool DAGH_RecomposeHierarchy (const char *name)
 Recompose GridHierarchy from checkpointing-file.
void DAGH_RecomposeHierarchy (std::stringstream &ifs)
 Recompose GridHierarchy from memory.
void DAGH_InitChkpt (const char *name)
void DAGH_InitChkpt ()
void DAGH_StopChkpt ()
int DAGH_OpenChkptIStream (const int p, std::ifstream &ifs)
void DAGH_CloseChkptIStream (std::ifstream &ifs)
int DAGH_OpenChkptIStream (const int p, std::streampos *&chkptdir, char *&chkptnamedir, std::ifstream &ifs)
int DAGH_OpenChkptStrStream (std::streampos *&chkptdir, char *&chkptnamedir, std::stringstream &ifs)
void DAGH_CloseChkptIStream (std::streampos *&chkptdir, char *&chkptnamedir, std::ifstream &ifs)
void DAGH_CloseChkptStrStream (std::streampos *&chkptdir, char *&chkptnamedir, std::stringstream &ifs)
int DAGH_GetGFChkptIStream (const int p, const char *gfname, const int gfid, std::ifstream &ifs)
int DAGH_GetGFChkptStrStream (const char *gfname, const int gfid, std::stringstream &ifs)
int DAGH_OpenChkptOStream (const int p, std::ofstream &ofs)
void DAGH_CloseChkptOStream (std::ofstream &ofs)
void DAGH_GlbConcat (void *snddata, int sndsize, void *&rcvdata, int &rcvsize, MPI_Comm Cin=0)
void DAGH_PingIONode (const int tag, int flg)
int DAGH_CommInit (MPI_Comm c=0)
void DAGH_CommKill (void)
int default_alignment (const int r) const
int dagh_type (void) const
int boundarywidth (void) const
int boundarytype (void) const
int adaptboundarytype (void) const
int periodicboundary (const int d) const
int periodicindex (const int d) const
int externalghostwidth (void) const
int totallevels (void) const
int coarselevel (void) const
int maxlevel (void) const
int finelevel (void) const
int stepsize (const int lev) const
 Step-size in internal integer time-units on a particular level.
int timestep (const int lev) const
int stepstaken (const int t, const int l) const
 Steps already taken in a subiteration on the refined grids.
double delta_t (const int l) const
 Physical time-step on level l.
double delta_x (const int dim, const int l) const
 Physical step-size on level l.
int refinefactor (const int lev) const
 Refinement factor employed for new refinement grids on level lev.
int refinedby (const int lev) const
 Refinement factor of level lev in respect to the coarsest grid.
int refinedby (const int l1, const int l2) const
 Refinement factor between levels l1 and l2.
int buffer () const
 Buffer size for proper nesting of refinement grids.
const int & gucfactor () const
 The GridUnit-coarsening factor.
const int & guminwidth () const
 The minimal GridUnit-width.
void setgucfactor (const int &cfac)
 Enforce an appropriate minimal GridUnit-width.
const int & maxGridBoxSize () const
 Maximal size of GridBox.
void setmaxGridBoxSize (const int &mgsize)
const int & timerefinewl () const
 Time step refinement in workload calculation.
void settimerefinewl (const int &tref)
int updatedvaluestep () const
void setupdatedvaluestep (const int ustep)
void chkpt_filename (std::ostringstream &obuf, const char *name, const int p)
int chkpt_restart (void) const
const char * chkpt_name (void) const
int chkpt_pnum (void) const
void chkpt_reset (void)
int getCurrentTime (const int lev) const
 Actual time in internal integer time-units.
void setCurrentTime (const int ctime, const int lev)
void incrCurrentTime (const int lev)
 Increment the actual integer-time on a level by one time-step.
int getPreviousTime (const int lev) const
 Previous time in internal integer time-units.
int getNextTime (const int lev) const
 Next time in internal integer time-units.
int GlobalLength (int lev)
int GlobalMaxIndex (int lev)
int LocalLength (int lev)
GridUnitListclist ()
GridUnitListllist ()
GridBoxList ** lgbl ()
 Local GridBoxLists on all levels.
GridBoxList ** ggbl ()
 Global GridBoxLists on all levels.
GridBoxList ** oldlgbl ()
GridBoxList ** oldggbl ()
GridBoxListlgbl (int lev)
 Actual local GridBoxList on level lev.
GridBoxListggbl (int lev)
 Actual global GridBoxList on level lev.
GridBoxListoldlgbl (int lev)
GridBoxListoldggbl (int lev)
void llb (int *lc) const
void lub (int *lc) const
Coords llb (void) const
 Integer coords of the basebox.
Coords lub (void) const
void wlb (double *wc) const
void wub (double *wc) const
DCoords worldCoords (const int *lc, const int *ls) const
 Transform integer-coordinates into physical coordinates.
DCoords worldCoordsUpper (const int *lc, const int *ls) const
DCoords worldCoordsLower (const int *lc, const int *ls) const
DCoords worldStep (const int *ls) const
void worldCoords (const int *lc, const int *ls, double *wc) const
void worldStep (const int *ls, double *ws) const
Coords localCoords (double const *wc) const
Coords localStep (double const *ws) const
void localCoords (double const *wc, int *lc) const
void localStep (double const *ws, int *ls) const
BBox bbbox (void) const
 Bounding box of the entire base grid.
BBox glbbbox (void) const
BBox wholebbox (void) const
 Interior box of the entire base grid.
BBoxListwholebaselist (void) const
 Interior boxes of the actual base grid.
const double * wholebndry (void) const
 Coordinates of entire base grid and cut-off regions.
const int & nbndry (void) const
void glb_bboxlist (BBoxList &bbl, const int l, const int type=(1)) const
void glb_bboxlist (BBoxList &bbl, const int l, const int type, BBox &bb) const
void DAGH_IOServe (void)
void DAGH_SetIOType (const short type)
const short & DAGH_IOType (void)
DAGHIO_WriteFunc DAGH_IOWrite (void)
DAGHIO_ReadFunc DAGH_IORead (void)
void DAGH_IOFlush (void)
void DAGH_IOClose (void)
void DAGH_IOEnd (void)
void DAGH_SyncGhostRegions (const int t, const int l)
void DAGH_SyncGhostRegions (const int t, const int l, const int axis, const int dir)

Static Public Member Functions

static void DAGH_InitOverlaps (const int Type, short *olap)
static int daghoverlapCC_or_NCC (const int type)

Public Attributes

short const rank
 Grid rank.
short distribution_type
 Distribution information.
DAGHDistributiondistribution
GridUnitListcomplist
 The COMPOSITE list.
GridBoxList ** globalgbl
 Actual and last Grid BoxList for the global topology of each level.
GridBoxList ** oldglobalgbl
GridUnitListlocallist
 Local GridUnit list.
GridBoxList ** localgbl
 Actual and last Grid BoxList for the local topology of each level.
GridBoxList ** oldlocalgbl
BBoxList ** localbboxarray
 New refinement topology.
short gfnum
 GridFunction Information.
GridFunctionVoid ** gflist
short io_type
 IO Servers.
DAGHIOServerRcvio_write_server
DAGHIOServerSndio_read_server
DAGHIOServerPingio_flush_server
DAGHIOServerPingio_close_server
DAGHIOServerPingio_end_server

Friends

std::ostream & operator<< (std::ostream &os, const GridHierarchy &)
std::ofstream & operator<< (std::ofstream &ofs, const GridHierarchy &)
std::ifstream & operator>> (std::ifstream &ifs, GridHierarchy &)
std::stringstream & operator<< (std::stringstream &ofs, const GridHierarchy &)
std::stringstream & operator>> (std::stringstream &ifs, GridHierarchy &)
void DAGHIO_EndIOPingFunction (GridHierarchy &GH)

Detailed Description

GridHierarchy stores the hierarchical structure on an adaptive application.

The global topology of each level is stored in a GridBoxList of the array globalgbl. The local portion of each processor is stored in localgbl. All GridFunctions follow automatically the topology determined by these lists. A change of the hierarchy is initiated by initializing the BBoxLists in localbboxarray with the new topology found on each processor. When RecomposeHierarchy() is called the global union of these BBoxLists is constructed on each level. The workload of the entire hierachy is estimated and accumulated in GridUnit-objects. The minimal size of a GridUnit is one cell of the coarsest level. The usage of larger GridUnits can be enforced with setgucfactor(), the GridUnit-coarsening factor. The partitioning algorithm breaks up the derived composite GridUnitList complist in load-balanced portions and assigns a locallist to each processor. Each node derives its new GridBoxList localgbl by intersecting its locallist with the global union of BBoxLists. globalgbl is finally found as global union of all localgbl's. Employing localgbl, globalgbl and their counterparts oldlocalgbl, oldglobalgbl of the preceeding hierarchy all GridFunctions are reconstructed.

Author:
Ralf Deiterding, Manish Parashar

Constructor & Destructor Documentation


Member Function Documentation

int GridHierarchy::adaptboundarytype ( void   )  const [inline]
BBox GridHierarchy::bbbox ( void   )  const [inline]

Bounding box of the entire base grid.

int GridHierarchy::boundarytype ( void   )  const [inline]
int GridHierarchy::boundarywidth ( void   )  const [inline]

Referenced by DAGH_PeriodicBoundaries().

int GridHierarchy::buffer (  )  const [inline]

Buffer size for proper nesting of refinement grids.

Referenced by DAGH_RecomposeHierarchy().

void GridHierarchy::chkpt_filename ( std::ostringstream &  obuf,
const char *  name,
const int  p 
)
const char* GridHierarchy::chkpt_name ( void   )  const [inline]
int GridHierarchy::chkpt_pnum ( void   )  const [inline]
void GridHierarchy::chkpt_reset ( void   )  [inline]

References DAGHFalse.

int GridHierarchy::chkpt_restart ( void   )  const [inline]
GridUnitList* GridHierarchy::clist (  )  [inline]

References complist.

int GridHierarchy::coarselevel ( void   )  const [inline]

Referenced by CoarseLevel().

void GridHierarchy::DAGH_Checkpoint ( std::stringstream &  ofs  ) 
void GridHierarchy::DAGH_Checkpoint ( const char *  name  ) 
int GridHierarchy::DAGH_Checkpoint_StrStream_Memory (  ) 
void GridHierarchy::DAGH_CloseChkptIStream ( std::streampos *&  chkptdir,
char *&  chkptnamedir,
std::ifstream &  ifs 
)
void GridHierarchy::DAGH_CloseChkptIStream ( std::ifstream &  ifs  ) 

Referenced by DAGH_RecomposeHierarchy().

void GridHierarchy::DAGH_CloseChkptOStream ( std::ofstream &  ofs  ) 

Referenced by DAGH_Checkpoint().

void GridHierarchy::DAGH_CloseChkptStrStream ( std::streampos *&  chkptdir,
char *&  chkptnamedir,
std::stringstream &  ifs 
) [inline]

Referenced by DAGH_RecomposeHierarchy().

int GridHierarchy::DAGH_CommInit ( MPI_Comm  c = 0  ) 

Referenced by GridHierarchy().

void GridHierarchy::DAGH_CommKill ( void   ) 

Referenced by ~GridHierarchy().

void GridHierarchy::DAGH_ComposeGridFunctions ( void   )  [inline]
void GridHierarchy::DAGH_ComposeHierarchy ( const char *  name  ) 
void GridHierarchy::DAGH_CreateGridUnitList ( GridUnitList *&  gul,
const BBox _bb 
)
void GridHierarchy::DAGH_DelGridFunction ( const int  gfid  )  [inline]
int GridHierarchy::DAGH_GetGFChkptIStream ( const int  p,
const char *  gfname,
const int  gfid,
std::ifstream &  ifs 
)
int GridHierarchy::DAGH_GetGFChkptStrStream ( const char *  gfname,
const int  gfid,
std::stringstream &  ifs 
)
void GridHierarchy::DAGH_GetTimeSpecs ( double &  starttime,
double &  stoptime 
) [inline]

References dimspec::high, and dimspec::low.

void GridHierarchy::DAGH_GlbConcat ( void *  snddata,
int  sndsize,
void *&  rcvdata,
int &  rcvsize,
MPI_Comm  Cin = 0 
)
int GridHierarchy::DAGH_GridFunctionTemplate ( GridFunctionVoid gfv  )  [inline]
void GridHierarchy::DAGH_InitChkpt (  )  [inline]

References DAGHTrue.

Referenced by DAGH_Checkpoint(), and DAGH_RecomposeHierarchy().

void GridHierarchy::DAGH_InitChkpt ( const char *  name  )  [inline]

References DAGHChkPtTagNameSize, and DAGHTrue.

void GridHierarchy::DAGH_IOClose ( void   ) 

Referenced by DAGHIOClose().

void GridHierarchy::DAGH_IOEnd ( void   ) 

Referenced by DAGHIOEnd().

void GridHierarchy::DAGH_IOFlush ( void   ) 

Referenced by DAGHIOFlush().

DAGHIO_ReadFunc GridHierarchy::DAGH_IORead ( void   )  [inline]

References DAGHIO_Read, and io_type.

Referenced by DAGHIORead().

const short& GridHierarchy::DAGH_IOType ( void   )  [inline]

References io_type.

Referenced by DAGHIOType().

DAGHIO_WriteFunc GridHierarchy::DAGH_IOWrite ( void   )  [inline]

References DAGHIO_Write, and io_type.

Referenced by DAGHIOWrite().

int GridHierarchy::DAGH_OpenChkptIStream ( const int  p,
std::streampos *&  chkptdir,
char *&  chkptnamedir,
std::ifstream &  ifs 
)
int GridHierarchy::DAGH_OpenChkptIStream ( const int  p,
std::ifstream &  ifs 
)
int GridHierarchy::DAGH_OpenChkptOStream ( const int  p,
std::ofstream &  ofs 
)
int GridHierarchy::DAGH_OpenChkptStrStream ( std::streampos *&  chkptdir,
char *&  chkptnamedir,
std::stringstream &  ifs 
)

References DAGHBktGFNameWidth, and DAGHTrue.

Referenced by DAGH_RecomposeHierarchy().

void GridHierarchy::DAGH_PingIONode ( const int  tag,
int  flg 
)
void GridHierarchy::DAGH_RecomposeHierarchy (  )  [inline]
void GridHierarchy::DAGH_RecomposeHierarchy ( int  Partition  ) 

Recompose the whole hierachy and all associated GridFunctions.

When RecomposeHierarchy() is called the global union of localbbl is constructed on each level. The workload of the entire hierachy is estimated and accumulated in GridUnit-objects. The partitioning algorithm breaks up the derived composite GridUnitList complist in load-balanced portions and assigns a locallist to each processor. Each node derives its new GridBoxList localgbl by intersecting its locallist with the global union of BBoxLists. globalgbl is finally found as global union of all localgbl's. Employing localgbl, globalgbl and their counterparts oldlocalgbl, oldglobalgbl of the preceeding hierarchy all GridFunctions are reconstructed.

Parameters:
Partition int. DAGHFalse=skip the partitioner (minimizes communication).

References Bucket< Type >::add(), add(), GridBoxList::bboxlist(), buffer(), chkpt_restart(), coarsen(), comm_service::comm(), complist, DAGH_CreateBBoxList(), DAGH_CreateGridUnitList(), DAGH_GlbConcat(), DAGH_InitOverlaps(), DAGH_PeriodicBoundaries(), DAGH_StopChkpt(), DAGHMaxRank, DAGHShadowFactor, comm_service::dce(), distribution, Bucket< Type >::empty(), BBox::empty(), END_WATCH, first(), Bucket< Type >::first(), GridBox::gbBBox(), GridFunctionVoid::GF_FreeTmpStorage(), GridFunctionVoid::GF_Recompose(), gflist, gfnum, globalgbl, BBox::grow(), BBox::growupper(), growupper(), guminwidth(), Bucket< Type >::insert(), BBox::intersects(), Bucket< Type >::isempty(), isempty(), localbboxarray, localgbl, locallist, comm_service::log(), BBox::lower(), maxGridBoxSize(), BBoxList::mergeboxes(), Bucket< Type >::next(), Bucket< Type >::number(), number(), oldglobalgbl, oldlocalgbl, Bucket< Type >::pack(), DAGHDistribution::partition(), Bucket< Type >::prev(), comm_service::proc_me(), comm_service::proc_num(), comm_service::proc_world(), BBoxList::reduce(), BBox::refine(), refine(), refinedby(), refinefactor(), comm_service::reset_comm(), BBox::setstepsize(), AllocError::SetTexts(), START_WATCH, BBox::stepsize(), timerefinewl(), and wholebbox().

Referenced by RecomposeHierarchy().

void GridHierarchy::DAGH_RedistributeHierarchy ( const int  type,
BBoxList bbl 
) [inline]
void GridHierarchy::DAGH_RedistributeHierarchy ( const int  type  )  [inline]
void GridHierarchy::DAGH_Refine ( BBoxList bblist,
const int  lev 
)
void GridHierarchy::DAGH_Refine ( const int  lev  ) 

Use entire level as new refinement region.

References add(), Bucket< Type >::empty(), first(), GridBox::gbBBox(), localbboxarray, localgbl, comm_service::log(), and Bucket< Type >::next().

Referenced by Refine().

void GridHierarchy::DAGH_SetAdaptBoundaryType ( const int  type  )  [inline]

Referenced by SetAdaptBoundaryType().

void GridHierarchy::DAGH_SetBaseGrid ( double const *  bbox,
const int *  shape,
const int &  ncuts,
const int *  cuts 
)
void GridHierarchy::DAGH_SetBoundaryType ( const int  type  )  [inline]

Referenced by SetBoundaryType().

void GridHierarchy::DAGH_SetBoundaryWidth ( const int  width  )  [inline]

Referenced by SetBoundaryWidth().

void GridHierarchy::DAGH_SetDistributionType ( const int  type,
BBoxList bbl 
) [inline]
void GridHierarchy::DAGH_SetDistributionType ( const int  type  )  [inline]
void GridHierarchy::DAGH_SetExternalGhostWidth ( const int  width  )  [inline]

Referenced by SetExternalGhostWidth().

void GridHierarchy::DAGH_SetIOType ( const short  type  )  [inline]

References io_type.

Referenced by DAGHSetIOType().

void GridHierarchy::DAGH_SetNestingBuffer ( const int &  nb  )  [inline]
void GridHierarchy::DAGH_SetPeriodicBoundaries ( const int  dir,
const int  value 
) [inline]

References rank.

Referenced by SetPeriodicBoundaries().

void GridHierarchy::DAGH_SetRefineFactor ( const int  lev,
const int  rfactor 
)
void GridHierarchy::DAGH_SetRefineFactor ( const int  rfactor  ) 

References DAGHDefaultRefineFactor.

Referenced by SetRefineFactor().

void GridHierarchy::DAGH_SetTimeSpecs ( double const   starttime,
double const   stoptime,
const int  ntsteps 
)

References dimspec::h, dimspec::high, dimspec::low, and dimspec::n.

Referenced by SetTimeSpecs().

void GridHierarchy::DAGH_SetWorkFunction ( void *  wf  )  [inline]
void GridHierarchy::DAGH_StopChkpt (  )  [inline]

References DAGHFalse.

Referenced by DAGH_Checkpoint(), and DAGH_RecomposeHierarchy().

void GridHierarchy::DAGH_SyncGhostRegions ( const int  t,
const int  l,
const int  axis,
const int  dir 
) [inline]
void GridHierarchy::DAGH_SyncGhostRegions ( const int  t,
const int  l 
) [inline]
int GridHierarchy::dagh_type ( void   )  const [inline]
static int GridHierarchy::daghoverlapCC_or_NCC ( const int  type  )  [inline, static]

References DAGHCellCentered.

int GridHierarchy::default_alignment ( const int  r  )  const [inline]

References DAGH_All, DAGH_X, DAGH_XY, and rank.

double GridHierarchy::delta_t ( const int  l  )  const [inline]

Physical time-step on level l.

References dimspec::h, and refinedby().

Referenced by DeltaT().

double GridHierarchy::delta_x ( const int  dim,
const int  l 
) const [inline]

Physical step-size on level l.

References dimspec::h, and refinedby().

Referenced by DeltaX().

int GridHierarchy::externalghostwidth ( void   )  const [inline]
int GridHierarchy::finelevel ( void   )  const [inline]
int GridHierarchy::getCurrentTime ( const int  lev  )  const [inline]

Actual time in internal integer time-units.

To each time-step that took place during a run a unique integer time-value is assigned. The time-value depends on the actual level and is calculated in respect to the list of refinement factors.

Referenced by AbsStepsTaken(), GridFunction< GFType, dim >::comm(), CurrentTime(), GridFunction< GFType, dim >::dagh_timeindex(), GridFunction< GFType, dim >::dagh_timevalue(), GridFunction< GFType, dim >::get_phystime_timevalue(), GridFunction< GFType, dim >::GF_CurrentTime(), GridFunction< GFType, dim >::GF_NextTime(), GridFunction< GFType, dim >::GF_PreviousTime(), GridFunction< GFType, dim >::set_phystime_timevalue(), and StepsTaken().

int GridHierarchy::getNextTime ( const int  lev  )  const [inline]

Next time in internal integer time-units.

References timestep().

int GridHierarchy::getPreviousTime ( const int  lev  )  const [inline]

Previous time in internal integer time-units.

References timestep().

GridBoxList* GridHierarchy::ggbl ( int  lev  )  [inline]

Actual global GridBoxList on level lev.

References globalgbl.

GridBoxList** GridHierarchy::ggbl (  )  [inline]

Global GridBoxLists on all levels.

References globalgbl.

void GridHierarchy::glb_bboxlist ( BBoxList bbl,
const int  l,
const int  type,
BBox bb 
) const
void GridHierarchy::glb_bboxlist ( BBoxList bbl,
const int  l,
const int  type = (1) 
) const
BBox GridHierarchy::glbbbox ( void   )  const [inline]
int GridHierarchy::GlobalLength ( int  lev  )  [inline]

References globalgbl, and number().

int GridHierarchy::GlobalMaxIndex ( int  lev  )  [inline]

References globalgbl.

const int& GridHierarchy::gucfactor (  )  const [inline]

The GridUnit-coarsening factor.

Coarsen level 0 by this factor when constructing GridUnits. The GuC-factor determines the minimal size of elements for partitioning. The usage of coarser GridFunctions, e.g. for error estimation or multigrid algorithms, requires coarser GridUnits. Otherwise it is not guaranteed that all data is local available.

Referenced by DAGH_CreateBBoxList(), DAGH_CreateGridUnitList(), DAGH_PeriodicBoundaries(), and GuCFactor().

const int& GridHierarchy::guminwidth (  )  const [inline]

The minimal GridUnit-width.

Referenced by DAGH_ComposeHierarchy(), DAGH_CreateGridUnitList(), and DAGH_RecomposeHierarchy().

void GridHierarchy::incrCurrentTime ( const int  lev  )  [inline]

Increment the actual integer-time on a level by one time-step.

References timestep().

Referenced by IncrCurrentTime().

GridBoxList* GridHierarchy::lgbl ( int  lev  )  [inline]

Actual local GridBoxList on level lev.

References localgbl.

GridBoxList** GridHierarchy::lgbl (  )  [inline]

Local GridBoxLists on all levels.

References localgbl.

Coords GridHierarchy::llb ( void   )  const [inline]

Integer coords of the basebox.

References BBox::lower().

void GridHierarchy::llb ( int *  lc  )  const

References BBox::lower().

GridUnitList* GridHierarchy::llist (  )  [inline]

References locallist.

void GridHierarchy::localCoords ( double const *  wc,
int *  lc 
) const

References toLocal().

Coords GridHierarchy::localCoords ( double const *  wc  )  const

References toLocal().

int GridHierarchy::LocalLength ( int  lev  )  [inline]

References localgbl, and number().

void GridHierarchy::localStep ( double const *  ws,
int *  ls 
) const

References dimspec::hfine.

Coords GridHierarchy::localStep ( double const *  ws  )  const
Coords GridHierarchy::lub ( void   )  const [inline]

References BBox::upper().

void GridHierarchy::lub ( int *  lc  )  const

References BBox::upper().

const int& GridHierarchy::maxGridBoxSize (  )  const [inline]
int GridHierarchy::maxlevel ( void   )  const [inline]

Referenced by MaxLevel().

const int& GridHierarchy::nbndry ( void   )  const [inline]
GridBoxList* GridHierarchy::oldggbl ( int  lev  )  [inline]

References oldglobalgbl.

GridBoxList** GridHierarchy::oldggbl (  )  [inline]

References oldglobalgbl.

GridBoxList* GridHierarchy::oldlgbl ( int  lev  )  [inline]

References oldlocalgbl.

GridBoxList** GridHierarchy::oldlgbl (  )  [inline]

References oldlocalgbl.

int GridHierarchy::periodicboundary ( const int  d  )  const [inline]

Referenced by DAGH_PeriodicBoundaries().

int GridHierarchy::periodicindex ( const int  d  )  const [inline]
int GridHierarchy::refinedby ( const int  l1,
const int  l2 
) const [inline]

Refinement factor between levels l1 and l2.

int GridHierarchy::refinedby ( const int  lev  )  const [inline]

Refinement factor of level lev in respect to the coarsest grid.

References Min().

Referenced by DAGH_ComposeHierarchy(), DAGH_RecomposeHierarchy(), delta_t(), delta_x(), RefinedBy(), and GridFunctionVoid::usedbbox().

int GridHierarchy::refinefactor ( const int  lev  )  const [inline]

Refinement factor employed for new refinement grids on level lev.

Referenced by DAGH_ComposeHierarchy(), DAGH_RecomposeHierarchy(), and RefineFactor().

void GridHierarchy::setCurrentTime ( const int  ctime,
const int  lev 
) [inline]

Referenced by SetCurrentTime().

void GridHierarchy::setgucfactor ( const int &  cfac  )  [inline]

Enforce an appropriate minimal GridUnit-width.

Application-dependent.

Referenced by SetGuCFactor().

void GridHierarchy::setmaxGridBoxSize ( const int &  mgsize  )  [inline]

Referenced by SetMaxGridBoxSize().

void GridHierarchy::settimerefinewl ( const int &  tref  )  [inline]

Referenced by SetTimeRefineWL().

void GridHierarchy::setupdatedvaluestep ( const int  ustep  )  [inline]

Referenced by SetUpdatedValueStep().

int GridHierarchy::stepsize ( const int  lev  )  const [inline]

Step-size in internal integer time-units on a particular level.

On the highest possible level stepsize is 1.

References Max().

Referenced by DAGH_ComposeHierarchy(), DAGH_CreateBBoxList(), DAGH_RecomposeHierarchy(), DAGH_Refine(), GridFunction< GFType, dim >::GF_StepSize(), and StepSize().

int GridHierarchy::stepstaken ( const int  t,
const int  l 
) const [inline]

Steps already taken in a subiteration on the refined grids.

References timestep().

Referenced by AbsStepsTaken(), and StepsTaken().

const int& GridHierarchy::timerefinewl (  )  const [inline]

Time step refinement in workload calculation.

Referenced by DAGH_ComposeHierarchy(), DAGH_RecomposeHierarchy(), and TimeRefineWL().

int GridHierarchy::timestep ( const int  lev  )  const [inline]
int GridHierarchy::updatedvaluestep (  )  const [inline]

Referenced by UpdatedValueAt().

BBoxList* GridHierarchy::wholebaselist ( void   )  const [inline]

Interior boxes of the actual base grid.

BBox GridHierarchy::wholebbox ( void   )  const [inline]

Interior box of the entire base grid.

References shrinkupperbydim().

Referenced by DAGH_ComposeHierarchy(), DAGH_CreateGridUnitList(), DAGH_PeriodicBoundaries(), and DAGH_RecomposeHierarchy().

const double* GridHierarchy::wholebndry ( void   )  const [inline]

Coordinates of entire base grid and cut-off regions.

void GridHierarchy::wlb ( double *  wc  )  const

References toWorld().

void GridHierarchy::worldCoords ( const int *  lc,
const int *  ls,
double *  wc 
) const

References BBox::lower(), and toWorld().

DCoords GridHierarchy::worldCoords ( const int *  lc,
const int *  ls 
) const

Transform integer-coordinates into physical coordinates.

References BBox::lower(), and toWorld().

Referenced by DAGH_ComposeHierarchy().

DCoords GridHierarchy::worldCoordsLower ( const int *  lc,
const int *  ls 
) const

References BBox::lower(), and toWorldLower().

DCoords GridHierarchy::worldCoordsUpper ( const int *  lc,
const int *  ls 
) const

References BBox::lower(), and toWorldUpper().

void GridHierarchy::worldStep ( const int *  ls,
double *  ws 
) const
DCoords GridHierarchy::worldStep ( const int *  ls  )  const
void GridHierarchy::wub ( double *  wc  )  const

Friends And Related Function Documentation

void DAGHIO_EndIOPingFunction ( GridHierarchy GH  )  [friend]
std::stringstream& operator<< ( std::stringstream &  ofs,
const GridHierarchy gh 
) [friend]
std::ofstream& operator<< ( std::ofstream &  ofs,
const GridHierarchy gh 
) [friend]
std::ostream& operator<< ( std::ostream &  os,
const GridHierarchy gh 
) [friend]
std::stringstream& operator>> ( std::stringstream &  ifs,
GridHierarchy gh 
) [friend]
std::ifstream& operator>> ( std::ifstream &  ifs,
GridHierarchy gh 
) [friend]

Member Data Documentation

Distribution information.

Referenced by DAGH_SetDistributionType(), and GridHierarchy().


The documentation for this class was generated from the following files:
Generated on Thu Jun 30 02:19:00 2016 for AMROC's Hierachical Data Structures by  doxygen 1.6.3