|
IBAMR
IBAMR version 0.19.
|
Class MultiblockPatchHierarchy<DIM> manages an array of patch hierarchies that represent a multiblock domain, and describes the relationship between these hierarchies. More...
#include <MultiblockPatchHierarchy.h>

Classes | |
| struct | Neighbor |
| Structure to represent the neighbor of a given block. More... | |
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 std::string &object_name, tbox::Pointer< tbox::Database > input_db, tbox::Pointer< hier::MultiblockGridGeometry< DIM > > &geometry, const bool register_for_restart=true) | |
| Constructor for MultiblockPatchHierarchy. More... | |
| ~MultiblockPatchHierarchy () | |
| Destructor for multiblock. More... | |
| tbox::Pointer< hier::PatchHierarchy< DIM > > & | getHierarchy (const int block_num) |
| Get a pointer to a single patch hierarchy represented by the specified block number. More... | |
| tbox::Pointer< MultiblockPatchLevel< DIM > > | getMultiblockPatchLevel (const int level_num) const |
| Get a pointer to a MultiblockPatchLevel<DIM> associated with the given level number. More... | |
| 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. More... | |
| void | adjustMultiblockPatchLevelBoundaries (tbox::Pointer< MultiblockPatchLevel< DIM > > level) |
| Adjust boundary data of a level to be consistent with the multiblock nature of the domain. More... | |
| int | getNumberOfBlocks () const |
| Returns the number of blocks in the multiblock domain. More... | |
| int | getNumberOfNeighbors (const int block_number) |
| Return the number of neighbors a specific block of the Multiblock domain has. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| int | getFinestLevelNumber () const |
| Get finest level number existing in multiblock patch hierarchy. More... | |
| int | getNumberOfLevels () 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
Static Public Member Functions | |
| static RotationIdentifier | getReverseRotationIdentifier (const RotationIdentifier rotation) |
| static routine to get a reverse rotation identifier More... | |
| static void | calculateReverseShift (hier::IntVector< DIM > &back_shift, const hier::IntVector< DIM > &shift, const RotationIdentifier back_rotation) |
| static routine to get a reverse shift More... | |
Private Member Functions | |
| bool | areNeighbors (const int a, const int b) |
| Returns true if block a and block b are neighbors. More... | |
| Neighbor | createNeighbor (int id, hier::BoxArray< DIM > &domain, const RotationIdentifier rotation, const hier::IntVector< DIM > &shift, const bool is_singularity) |
| Create a neighbor. More... | |
| void | registerNeighbors (int block_a, int block_b, RotationIdentifier rotation_b_to_a, hier::IntVector< DIM > &shift_b_to_a, const int neighbor_type) |
| Register a relationship between two neighboring blocks of a multiblock domain. More... | |
| RotationIdentifier | getRotationIdentifier (const tbox::Array< std::string > &rotation_string) const |
| Map a string identifier of a rotation operation to an integer id. More... | |
| void | adjustBoundaryBoxesOnPatch (const hier::Patch< DIM > &patch, const tbox::Pointer< hier::GridGeometry< DIM > > geometry, const hier::BoxList< DIM > &pseudo_domain, const hier::IntVector< DIM > &gcw, const hier::BoxList< DIM > &singularity) |
Private Attributes | |
| std::string | d_object_name |
| bool | d_registered_for_restart |
| int | d_number_blocks |
| tbox::Array< tbox::Pointer< hier::PatchHierarchy< DIM > > > | d_hierarchies |
| tbox::Array< tbox::List< Neighbor > > | d_block_neighbors |
| tbox::Array< hier::BoxList< DIM > > | d_singularity |
| tbox::Pointer< hier::MultiblockGridGeometry< DIM > > | d_geometry |
| tbox::Array< bool > | d_reduced_connect |
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.
| enum SAMRAI::hier::MultiblockPatchHierarchy::RotationIdentifier |
| SAMRAI::hier::MultiblockPatchHierarchy< DIM >::MultiblockPatchHierarchy | ( | const std::string & | object_name, |
| tbox::Pointer< tbox::Database > | input_db, | ||
| tbox::Pointer< hier::MultiblockGridGeometry< DIM > > & | geometry, | ||
| const bool | register_for_restart = true |
||
| ) |
| object_name | String identifier for database operations |
| input_db | Input Database |
| geometry | Geometry |
| register_for_restart | Boolean switch for restart registration |
| SAMRAI::hier::MultiblockPatchHierarchy< DIM >::~MultiblockPatchHierarchy | ( | ) |
| tbox::Pointer< hier::PatchHierarchy<DIM> >& SAMRAI::hier::MultiblockPatchHierarchy< DIM >::getHierarchy | ( | const int | block_num | ) |
| block_num | Integer block number, corresponding to array index of the hiearchy array passed into the constructor |
| tbox::Pointer< MultiblockPatchLevel<DIM> > SAMRAI::hier::MultiblockPatchHierarchy< DIM >::getMultiblockPatchLevel | ( | const int | level_num | ) | const |
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.
| level_num | Level number in AMR hierachy of desired multiblock patch level. |
|
virtual |
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>.
| level_num | Level number in AMR hierachy of desired multiblock patch level. |
Implements SAMRAI::hier::BasePatchHierarchy< DIM >.
| void SAMRAI::hier::MultiblockPatchHierarchy< DIM >::adjustMultiblockPatchLevelBoundaries | ( | tbox::Pointer< MultiblockPatchLevel< DIM > > | level | ) |
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.
| level | Multiblock level where boundaries need to be adjusted. |
| int SAMRAI::hier::MultiblockPatchHierarchy< DIM >::getNumberOfBlocks | ( | ) | const |
| int SAMRAI::hier::MultiblockPatchHierarchy< DIM >::getNumberOfNeighbors | ( | const int | block_number | ) |
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
| block_number | The block of which the number of neighbors is sought |
| tbox::List<Neighbor>& SAMRAI::hier::MultiblockPatchHierarchy< DIM >::getNeighbors | ( | const int | block_number | ) |
| block_number | A list of neighbors of the given block is returned |
| hier::BoxList<DIM>& SAMRAI::hier::MultiblockPatchHierarchy< DIM >::getSingularityBoxList | ( | const int | 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.
| block_number | Identifies block for which singularityes will be retrieved |
| void SAMRAI::hier::MultiblockPatchHierarchy< DIM >::getTranslatedBlock | ( | hier::BoxArray< DIM > & | block_boxes, |
| const int | base_block, | ||
| const int | translated_block | ||
| ) |
| 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 |
| void SAMRAI::hier::MultiblockPatchHierarchy< DIM >::translateBoxArray | ( | hier::BoxArray< DIM > & | boxes, |
| const hier::IntVector< DIM > & | ratio, | ||
| const int | base_block, | ||
| const int | translated_block | ||
| ) |
| 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 |
|
static |
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.
| rotation | Rotation for which the reverse rotation is sought |
|
static |
|
virtual |
Implements SAMRAI::hier::BasePatchHierarchy< DIM >.
|
virtual |
Return the number of levels that currently exist in the hierarchy.
Implements SAMRAI::hier::BasePatchHierarchy< DIM >.
|
virtual |
| ln | A given level number |
Implements SAMRAI::hier::BasePatchHierarchy< DIM >.
| void SAMRAI::hier::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.
| domain_outside_block | Output box list |
| block_number | domain_outside_block will represent the domains of all blocks except this one. |
| bool SAMRAI::hier::MultiblockPatchHierarchy< DIM >::reducedConnectivityExists | ( | const int | block_number | ) | const |
| block_number | Number of block to be tested |
|
virtual |
When assertion checking is active, the database pointer must be non-null.
Implements SAMRAI::hier::BasePatchHierarchy< DIM >.
|
virtual |
!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.
Implements SAMRAI::hier::BasePatchHierarchy< DIM >.
|
virtual |
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.
| max_levels | maximum number of levels to read in. |
Implements SAMRAI::hier::BasePatchHierarchy< DIM >.
|
private |
|
private |
| id | The block number of the neighboring block |
| domain | The neighboring block's domain in the current block's index space |
| rotation | The rotation to represent the neighboring block in the current index space. |
| shift | The shift needed to shift the neighboring block to its correct position in the current index space. |
| is_singularity | Boolean telling whether the current block and the neighboring block abut at a singularity |
|
private |
| block_a | One block in the relationship |
| block_b | The other block |
| rotation_b_to_a | The rotation that align's block b's index space with block a's |
| shift_b_to_a | The post-rotation shift to move b into its correct location within a's index space |
| neighbor_type | The type (codimension) of the neighbor relationship |
|
private |
| rotation_string |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17