IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
|
#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/SecondaryHierarchy.h>
Public Member Functions | |
SecondaryHierarchy (std::string name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > gridding_algorithm_db, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > load_balancer_db) | |
void | reinit (int coarsest_patch_level_number, int finest_patch_level_number, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy) |
void | reinit (int coarsest_patch_level_number, int finest_patch_level_number, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, int workload_idx) |
void | transferPrimaryToSecondary (int level_number, int primary_data_idx, int secondary_data_idx, double data_time, SAMRAI::xfer::RefinePatchStrategy< NDIM > *patch_strategy=nullptr) |
void | transferSecondaryToPrimary (int level_number, int primary_data_idx, int secondary_data_idx, double data_time, SAMRAI::xfer::RefinePatchStrategy< NDIM > *patch_strategy=nullptr) |
std::shared_ptr< IBTK::SAMRAIDataCache > | getSAMRAIDataCache () |
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > | getPrimaryHierarchy () |
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > | getSecondaryHierarchy () |
Class encapsulating the idea of a secondary hierarchy. In practice, this is an equivalent (same index space) hierarchy to a given PatchHierarchy, but is partitioned in parallel in a different way.
IBTK::SecondaryHierarchy::SecondaryHierarchy | ( | std::string | name, |
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > | gridding_algorithm_db, | ||
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > | load_balancer_db | ||
) |
Constructor - requires that the object be reinitialized. At the present time this object still requires manual setup of the various gridding classes.
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > IBTK::SecondaryHierarchy::getPrimaryHierarchy | ( | ) |
Get a copy of the pointer to the primary hierarchy.
std::shared_ptr< IBTK::SAMRAIDataCache > IBTK::SecondaryHierarchy::getSAMRAIDataCache | ( | ) |
Get a copy of the pointer to the secondary scratch object.
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > IBTK::SecondaryHierarchy::getSecondaryHierarchy | ( | ) |
Get a copy of the pointer to the primary hierarchy.
void IBTK::SecondaryHierarchy::reinit | ( | int | coarsest_patch_level_number, |
int | finest_patch_level_number, | ||
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > | patch_hierarchy | ||
) |
Reinitialize the secondary hierarchy by performing a copy of the input hierarchy. This is useful during staggered initialization when we may not yet want to actually perform hierarchy-specific load balancing.
void IBTK::SecondaryHierarchy::reinit | ( | int | coarsest_patch_level_number, |
int | finest_patch_level_number, | ||
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > | patch_hierarchy, | ||
int | workload_idx | ||
) |
Reinitialize the secondary hierarchy based on a new patch hierarchy.
void IBTK::SecondaryHierarchy::transferPrimaryToSecondary | ( | int | level_number, |
int | primary_data_idx, | ||
int | secondary_data_idx, | ||
double | data_time, | ||
SAMRAI::xfer::RefinePatchStrategy< NDIM > * | patch_strategy = nullptr |
||
) |
Transfer data from the primary hierarchy to the secondary hierarchy.
If needed, a SAMRAI::xfer::RefinePatchStrategy object can be provided for filling ghost data at physical boundaries.
void IBTK::SecondaryHierarchy::transferSecondaryToPrimary | ( | int | level_number, |
int | primary_data_idx, | ||
int | secondary_data_idx, | ||
double | data_time, | ||
SAMRAI::xfer::RefinePatchStrategy< NDIM > * | patch_strategy = nullptr |
||
) |
Transfer data from the secondary hierarchy to the primary hierarchy.
If needed, a SAMRAI::xfer::RefinePatchStrategy object can be provided for filling ghost data at physical boundaries.
|
protected |
Box generator.
|
protected |
Coarsest level on which there are patches with elements (i.e., patches which should be considered by this object).
|
protected |
Error detector.
|
protected |
Scratch index data object for the patch hierarchy managed by this class.
|
protected |
Finest level on which there are patches with elements (i.e., patches which should be considered by this object).
|
protected |
Gridding algorithm.
|
protected |
Load balancer.
|
protected |
Object name.
|
protected |
Pointer to the primary patch hierarchy (i.e., the one not by this class).
|
protected |
Pointer to the secondary patch hierarchy (i.e., the one managed by this class).
|
protected |
Tag strategy. Since this class does not have any notion of refinement or coarsening this object will simply tag cells in such a way that we end up with exactly the same refinement pattern on the secondary hierarchy as the primary hierarchy.
|
protected |
Refinement schedules for transferring data from the secondary hierarchy (i.e., the one managed by this object) to the primary hierarchy. The key type is the level number and a pair of indices (the primary and scratch, in that order).
|
protected |
Refinement schedules for transferring data from the primary hierarchy to the secondary (i.e., this) hierarchy. The key type is the level number and a pair of indices (the primary and scratch, in that order).