Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::mblk::MultiblockPatchHierarchy< DIM > Class Template Reference

Class MultiblockPatchHierarchy<DIM> manages an array of patch hierarchies that represent a multiblock domain, and describes the relationship between these hierarchies. More...

#include <source/multiblock/MultiblockPatchHierarchy.h>

Inheritance diagram for SAMRAI::mblk::MultiblockPatchHierarchy< DIM >:

Inheritance graph
[legend]
List of all members.

Public Types

enum  RotationIdentifier {
  NO_ROTATE = 0, IUP_JUP = 0, JUP_IDOWN = 1, IDOWN_JDOWN = 2,
  JDOWN_IUP = 3, IUP_JUP_KUP = 0, KUP_IUP_JUP = 1, JUP_KUP_IUP = 2,
  IDOWN_KUP_JUP = 3, KUP_JUP_IDOWN = 4, JUP_IDOWN_KUP = 5, KDOWN_JUP_IUP = 6,
  IUP_KDOWN_JUP = 7, JUP_IUP_KDOWN = 8, KDOWN_IDOWN_JUP = 9, IDOWN_JUP_KDOWN = 10,
  JUP_KDOWN_IDOWN = 11, JDOWN_IUP_KUP = 12, IUP_KUP_JDOWN = 13, KUP_JDOWN_IUP = 14,
  JDOWN_KUP_IDOWN = 15, IDOWN_JDOWN_KUP = 16, KUP_IDOWN_JDOWN = 17, JDOWN_KDOWN_IUP = 18,
  KDOWN_IUP_JDOWN = 19, IUP_JDOWN_KDOWN = 20, JDOWN_IDOWN_KDOWN = 21, KDOWN_JDOWN_IDOWN = 22,
  IDOWN_KDOWN_JDOWN = 23
}

Public Member Functions

 MultiblockPatchHierarchy (const string &object_name, tbox::Pointer< tbox::Database > input_db, tbox::Array< tbox::Pointer< hier::PatchHierarchy< DIM > > > &hierarchies, const bool register_for_restart=true)
 Constructor for MultiblockPatchHierarchy.
 ~MultiblockPatchHierarchy ()
 Destructor for multiblock.
tbox::Pointer< hier::PatchHierarchy<
DIM > > & 
getHierarchy (const int block_num)
 Get a pointer to a single patch hierarchy represented by the specified block number.
tbox::Pointer< MultiblockPatchLevel<
DIM > > 
getMultiblockPatchLevel (const int level_num) const
 Get a pointer to a MultiblockPatchLevel<DIM> associated with the given level number.
tbox::Pointer< hier::BasePatchLevel<
DIM > > 
getPatchLevel (const int level_num) const
 Get a pointer to a hier::BasePatchLevel<DIM> association with the given level number.
void adjustMultiblockPatchLevelBoundaries (tbox::Pointer< MultiblockPatchLevel< DIM > > level)
 Adjust boundary data of a level to be consistent with the multiblock nature of the domain.
int getNumberBlocks ()
 Returns the number of blocks in the multiblock domain.
int getNumberNeighbors (const int block_number)
 Return the number of neighbors a specific block of the Multiblock domain has.
tbox::List< Neighbor > & getNeighbors (const int block_number)
 Return a list of Neighbor objects describing all of the neighbors of the block indicated by the block_number.
hier::BoxList< DIM > & getSingularityBoxList (const int block_number)
 Return a BoxList that describes all of the singularities touched by the block indicated by block_number.
void getTranslatedBlock (hier::BoxArray< DIM > &block_boxes, const int base_block, const int translated_block)
 Get a box array that describes the coarse-level domain of the translated_block in terms of the index space of base_block.
void translateBoxArray (hier::BoxArray< DIM > &boxes, const hier::IntVector< DIM > &ratio, const int base_block, const int translated_block)
 Modify boxes by rotating and shifting from the index space of the translated_block to the index space of the base_block at the resolution level defined by ratio.
int getFinestLevelNumber () const
 Get finest level number existing in multiblock patch hierarchy.
int getNumberLevels () const
bool finerLevelExists (const int ln) const
 Returns true if the array of patch levels contains a patch level finer than the specified patch level. Otherwise, false is returned.
void getDomainOutsideBlock (hier::BoxList< DIM > &domain_outside_block, const int block_number)
bool reducedConnectivityExists (const int block_number) const
 Return true if block represented by block_number touches a reduced-connectivity singularity.
void putToDatabase (tbox::Pointer< tbox::Database > database)
 Writes the state of the PatchHierarchy object and the PatchLevels it contains to the database. It should be noted that only those patch data which have been registered for restart with the hier::VariableDatabase<DIM> will be written to the database. This method implements the pure virtual method in tbox::Serializable class which is used by the tbox::RestartManager for writing the MultiblockPatchHierarchy to a restart file.
void putToDatabase (tbox::Pointer< tbox::Database > database, const hier::ComponentSelector &patchdata_write_table)
void getFromRestart (const int max_levels)
 Read in the entire hierarchy from the restart file. The database from which the restart data is read is determined by the object_name specified in the constructor.

Static Public Member Functions

static RotationIdentifier getReverseRotationIdentifier (const RotationIdentifier rotation)
 static routine to get a reverse rotation identifier
static void calculateReverseShift (hier::IntVector< DIM > &back_shift, const hier::IntVector< DIM > &shift, const RotationIdentifier back_rotation)
 static routine to get a reverse shift

Classes

struct  Neighbor
 Structure to represent the neighbor of a given block. More...

Detailed Description

template<int DIM>
class SAMRAI::mblk::MultiblockPatchHierarchy< DIM >

Class MultiblockPatchHierarchy<DIM> manages an array of patch hierarchies that represent a multiblock domain, and describes the relationship between these hierarchies.

Each patch hierarchy contained in the array of patch hierarchies represents a logically rectangular block of a multiblock domain. This class contains this array, and also contains information that describes the relationship between neighboring blocks. It also contains information about the point or points of singularity that exist in the multiblock domain.

See also:
hier::BasePatchHierarchy

hier::PatchHierarchy

mblk::MultiblockPatchLevel

hier::PatchLevel


Member Enumeration Documentation

template<int DIM>
enum SAMRAI::mblk::MultiblockPatchHierarchy::RotationIdentifier
 

Enumeration values:
NO_ROTATE 
IUP_JUP 
JUP_IDOWN 
IDOWN_JDOWN 
JDOWN_IUP 
IUP_JUP_KUP 
KUP_IUP_JUP 
JUP_KUP_IUP 
IDOWN_KUP_JUP 
KUP_JUP_IDOWN 
JUP_IDOWN_KUP 
KDOWN_JUP_IUP 
IUP_KDOWN_JUP 
JUP_IUP_KDOWN 
KDOWN_IDOWN_JUP 
IDOWN_JUP_KDOWN 
JUP_KDOWN_IDOWN 
JDOWN_IUP_KUP 
IUP_KUP_JDOWN 
KUP_JDOWN_IUP 
JDOWN_KUP_IDOWN 
IDOWN_JDOWN_KUP 
KUP_IDOWN_JDOWN 
JDOWN_KDOWN_IUP 
KDOWN_IUP_JDOWN 
IUP_JDOWN_KDOWN 
JDOWN_IDOWN_KDOWN 
KDOWN_JDOWN_IDOWN 
IDOWN_KDOWN_JDOWN 


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::MultiblockPatchHierarchy const string &  object_name,
tbox::Pointer< tbox::Database input_db,
tbox::Array< tbox::Pointer< hier::PatchHierarchy< DIM > > > &  hierarchies,
const bool  register_for_restart = true
 

Constructor for MultiblockPatchHierarchy.

Parameters:
object_name String identifier for database operations
input_db Input Database
hierarchies Array of pointers to patch hierarchies. Each hierarchy in the array represents a logically rectangular block of domain, and together all of the hierarchies represent the full domain.
register_for_restart Boolean switch for restart registration

template<int DIM>
SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::~MultiblockPatchHierarchy  ) 
 

Destructor for multiblock.


Member Function Documentation

template<int DIM>
tbox::Pointer< hier::PatchHierarchy< DIM > > & SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getHierarchy const int  block_num  ) 
 

Get a pointer to a single patch hierarchy represented by the specified block number.

Parameters:
block_num Integer block number, corresponding to array index of the hiearchy array passed into the constructor

template<int DIM>
tbox::Pointer< MultiblockPatchLevel< DIM > > SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getMultiblockPatchLevel const int  level_num  )  const
 

Get a pointer to a MultiblockPatchLevel<DIM> associated with the given level number.

The MultiblockPatchLevel<DIM> will give access to an array of pointers to hier::PatchLevel<DIM>, each member of which represents a level from one block of the hierarchy corresponding to the specified level number.

Parameters:
level_num Level number in AMR hierachy of desired multiblock patch level.

template<int DIM>
tbox::Pointer< hier::BasePatchLevel< DIM > > SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getPatchLevel const int  level_num  )  const [virtual]
 

Get a pointer to a hier::BasePatchLevel<DIM> association with the given level number.

Returns a pointer to an object of the virtual base class hier::BasePatchLevel<DIM>. The object being pointed to can be cast to MultiblockPatchLevel<DIM>.

Parameters:
level_num Level number in AMR hierachy of desired multiblock patch level.

Implements SAMRAI::hier::BasePatchHierarchy< DIM >.

template<int DIM>
void SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::adjustMultiblockPatchLevelBoundaries tbox::Pointer< MultiblockPatchLevel< DIM > >  level  ) 
 

Adjust boundary data of a level to be consistent with the multiblock nature of the domain.

On a MultiblockPatchHierarchy, each hier::PatchHierarchy<DIM> will contain PatchLevels with patches that were constructed independent of any knowledge of the multiblock nature of the complete domain. Thus the patches will contain boundary data that recognizes no difference between a physical domain boundary and a block boundary. Calling this routine will adjust the boundary data on all patches in the given level such that the true boundaries of the domain are represented.

Parameters:
level Multiblock level where boundaries need to be adjusted.

template<int DIM>
int SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getNumberBlocks  ) 
 

Returns the number of blocks in the multiblock domain.

template<int DIM>
int SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getNumberNeighbors const int  block_number  ) 
 

Return the number of neighbors a specific block of the Multiblock domain has.

The block_number argument identifies a specific block by the array index of the array of pointers to hierarchies given the constructor of this class. A block is the neighbor of another block if the two blocks abut at a point, a 1D line, or a 2D plane

Parameters:
block_number The block of which the number of neighbors is sought

template<int DIM>
tbox::List< typename MultiblockPatchHierarchy< DIM >::Neighbor > & SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getNeighbors const int  block_number  ) 
 

Return a list of Neighbor objects describing all of the neighbors of the block indicated by the block_number.

Parameters:
block_number A list of neighbors of the given block is returned

template<int DIM>
hier::BoxList< DIM > & SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getSingularityBoxList const int  block_number  ) 
 

Return a BoxList that describes all of the singularities touched by the block indicated by block_number.

For every singularity point the block touches, the BoxList will contain a single-cell box that lies just outside the block domain, touching the block only at the singularity point. For line singularities, the BoxList will contain boxes of width 1 in all dimensions except 1, lying outside the block's coarse-level domain and touching the domain only along the line of singularity.

Parameters:
block_number Identifies block for which singularityes will be retrieved

template<int DIM>
void SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getTranslatedBlock hier::BoxArray< DIM > &  block_boxes,
const int  base_block,
const int  translated_block
 

Get a box array that describes the coarse-level domain of the translated_block in terms of the index space of base_block.

Parameters:
block_boxes Output consisting of the coarse-leve domain of the block identified by translated_block, represented in the index space of the block identified by base_block
base_block Integer identifier of the block whose index space will be used for the output boxes
translated_block Integer identifier of another block whose domain will be represented in the index space of the base block

template<int DIM>
void SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::translateBoxArray hier::BoxArray< DIM > &  boxes,
const hier::IntVector< DIM > &  ratio,
const int  base_block,
const int  translated_block
 

Modify boxes by rotating and shifting from the index space of the translated_block to the index space of the base_block at the resolution level defined by ratio.

Parameters:
boxes Input and output. The boxes will be translated from the translated_block index space to the base_block index space.
ratio The boxes will be refined to the ratio given. This should represent the refinement ratio of a level in the AMR hierarchy.
base_block Integer identifier of the block whose index space will be represented in the boxes output
translated_block Integer identifier of the block whose index space is represented in the boxes input

template<int DIM>
MultiblockPatchHierarchy< DIM >::RotationIdentifier SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getReverseRotationIdentifier const RotationIdentifier  rotation  )  [static]
 

static routine to get a reverse rotation identifier

A rotation identifier signifies a specific rotation of an index space. For each rotation there is another rotation that rotates in the exact opposite manner. This routine returns the identifier of the reverse rotation corresponding to the given rotation.

Parameters:
rotation Rotation for which the reverse rotation is sought

template<int DIM>
void SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::calculateReverseShift hier::IntVector< DIM > &  back_shift,
const hier::IntVector< DIM > &  shift,
const RotationIdentifier  back_rotation
[static]
 

static routine to get a reverse shift

template<int DIM>
int SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getFinestLevelNumber  )  const [virtual]
 

Get finest level number existing in multiblock patch hierarchy.

Implements SAMRAI::hier::BasePatchHierarchy< DIM >.

template<int DIM>
int SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getNumberLevels  )  const [virtual]
 

Return the number of levels that currently exist in the hierarchy.

Implements SAMRAI::hier::BasePatchHierarchy< DIM >.

template<int DIM>
bool SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::finerLevelExists const int  ln  )  const [virtual]
 

Returns true if the array of patch levels contains a patch level finer than the specified patch level. Otherwise, false is returned.

Parameters:
ln A given level number

Implements SAMRAI::hier::BasePatchHierarchy< DIM >.

template<int DIM>
void SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getDomainOutsideBlock hier::BoxList< DIM > &  domain_outside_block,
const int  block_number
 

Get a BoxList that contains all of the index space of all other blocks in the multiblock domain.

A BoxList will be constructed that contains the full set of the coarse level domains of all blocks except the one identified by block_number. The domains will all be translated into the index space represented by block_number.

Parameters:
domain_outside_block Output box list
block_number domain_outside_block will represent the domains of all blocks except this one.

template<int DIM>
bool SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::reducedConnectivityExists const int  block_number  )  const
 

Return true if block represented by block_number touches a reduced-connectivity singularity.

Parameters:
block_number Number of block to be tested

template<int DIM>
void SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::putToDatabase tbox::Pointer< tbox::Database database  )  [virtual]
 

Writes the state of the PatchHierarchy object and the PatchLevels it contains to the database. It should be noted that only those patch data which have been registered for restart with the hier::VariableDatabase<DIM> will be written to the database. This method implements the pure virtual method in tbox::Serializable class which is used by the tbox::RestartManager for writing the MultiblockPatchHierarchy to a restart file.

When assertion checking is active, the database pointer must be non-null.

Implements SAMRAI::hier::BasePatchHierarchy< DIM >.

template<int DIM>
void SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::putToDatabase tbox::Pointer< tbox::Database database,
const hier::ComponentSelector patchdata_write_table
 

!brief Writes the state of the MultiblockPatchHierarchy object and the PatchHierarchies it contains to the database. Only those patchdata corresponding to the set bits in the hier::ComponentSelector are written to the specified database.

When assertion checking is active, the database pointer must be non-null.

template<int DIM>
void SAMRAI::mblk::MultiblockPatchHierarchy< DIM >::getFromRestart const int  max_levels  )  [virtual]
 

Read in the entire hierarchy from the restart file. The database from which the restart data is read is determined by the object_name specified in the constructor.

Notes:

  • This method handles the memory allocation for each PatchLevel it reads in.

  • The number of levels read in is the minimum of the max_levels argument and the number of levels stored in the database.

When assertion checking is active, the max_levels argument must be greater than zero. An unrecoverable exception will result if the database cannot be found in the restart file or the data in the restart file is erroneous.

Parameters:
max_levels maximum number of levels to read in.

Implements SAMRAI::hier::BasePatchHierarchy< DIM >.


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:27:40 2005 for SAMRAI by  doxygen 1.4.2