vtf-logo

GridHierarchy Class Reference

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

#include <GridHierarchy.h>

List of all members.

Public Member Functions

void DAGH_ComposeHierarchy (void)
 Compose the grid hierarchy.
void DAGH_RecomposeHierarchy (int Partition)
 Recompose the whole hierachy and all associated GridFunctions.
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_Checkpoint (const char *name)
 Write GridHierarchy into checkpointing-file.
void DAGH_Checkpoint (std::stringstream &ofs)
 Write GridHierarchy into memory.
bool DAGH_RecomposeHierarchy (const char *name)
 Recompose GridHierarchy from checkpointing-file.
void DAGH_RecomposeHierarchy (std::stringstream &ifs)
 Recompose GridHierarchy from memory.
int stepsize (const int lev) const
 Step-size in internal integer time-units on a particular level.
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.
int getCurrentTime (const int lev) const
 Actual time in internal integer time-units.
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.
GridBoxList ** lgbl ()
 Local GridBoxLists on all levels.
GridBoxList ** ggbl ()
 Global GridBoxLists on all levels.
GridBoxListlgbl (int lev)
 Actual local GridBoxList on level lev.
GridBoxListggbl (int lev)
 Actual global GridBoxList on level lev.
Coords llb (void) const
 Integer coords of the basbox.
DCoords worldCoords (const int *lc, const int *ls) const
 Transform integer-coordinates into physical coordinates.
BBox bbbox (void) const
 Bounding box of the entire base grid.
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.

Public Attributes

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


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


Member Function Documentation

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).

void GridHierarchy::DAGH_Refine ( BBoxList bblist,
const int  lev 
)

Sets refinement regions on a particular level.

Parameters:
bblist BBoxList &. Refinement region.
lev int. Level.

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.

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.

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

Enforce an appropriate minimal GridUnit-width.

Application-dependent.

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.


The documentation for this class was generated from the following files:
Generated on Fri Aug 24 13:00:29 2007 for AMROC's Hierachical Data Structures - by  doxygen 1.4.7