#include <source/multiblock/MultiblockPatchHierarchy.h>
Inheritance diagram for SAMRAI::mblk::MultiblockPatchHierarchy< DIM >:
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... |
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.
|
|
Constructor for MultiblockPatchHierarchy.
|
|
Destructor for multiblock.
|
|
Get a pointer to a single patch hierarchy represented by the specified block number.
|
|
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.
|
|
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>.
Implements SAMRAI::hier::BasePatchHierarchy< DIM >. |
|
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.
|
|
Returns the number of blocks in the multiblock domain.
|
|
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
|
|
Return a list of Neighbor objects describing all of the neighbors of the block indicated by the 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.
|
|
Get a box array that describes the coarse-level domain of the translated_block in terms of the index space of base_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.
|
|
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.
|
|
static routine to get a reverse shift
|
|
Get finest level number existing in multiblock patch hierarchy.
Implements SAMRAI::hier::BasePatchHierarchy< DIM >. |
|
Return the number of levels that currently exist in the hierarchy. Implements SAMRAI::hier::BasePatchHierarchy< DIM >. |
|
Returns true if the array of patch levels contains a patch level finer than the specified patch level. Otherwise, false is returned.
Implements SAMRAI::hier::BasePatchHierarchy< DIM >. |
|
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.
|
|
Return true if block represented by block_number touches a reduced-connectivity singularity.
|
|
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 >. |
|
!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. |
|
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:
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.
Implements SAMRAI::hier::BasePatchHierarchy< DIM >. |