本文整理汇总了C++中hier::Box::getOwnerRank方法的典型用法代码示例。如果您正苦于以下问题:C++ Box::getOwnerRank方法的具体用法?C++ Box::getOwnerRank怎么用?C++ Box::getOwnerRank使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hier::Box
的用法示例。
在下文中一共展示了Box::getOwnerRank方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
CoarsenCopyTransaction::CoarsenCopyTransaction(
const std::shared_ptr<hier::PatchLevel>& dst_level,
const std::shared_ptr<hier::PatchLevel>& src_level,
const std::shared_ptr<hier::BoxOverlap>& overlap,
const hier::Box& dst_box,
const hier::Box& src_box,
const CoarsenClasses::Data** coarsen_data,
int item_id):
d_dst_patch_rank(dst_box.getOwnerRank()),
d_src_patch_rank(src_box.getOwnerRank()),
d_overlap(overlap),
d_coarsen_data(coarsen_data),
d_item_id(item_id),
d_incoming_bytes(0),
d_outgoing_bytes(0)
{
TBOX_ASSERT(dst_level);
TBOX_ASSERT(src_level);
TBOX_ASSERT(overlap);
TBOX_ASSERT_OBJDIM_EQUALITY4(*dst_level,
*src_level,
dst_box,
src_box);
TBOX_ASSERT(dst_box.getLocalId() >= 0);
TBOX_ASSERT(src_box.getLocalId() >= 0);
TBOX_ASSERT(coarsen_data != 0);
TBOX_ASSERT(item_id >= 0);
if (d_dst_patch_rank == dst_level->getBoxLevel()->getMPI().getRank()) {
d_dst_patch = dst_level->getPatch(dst_box.getGlobalId());
}
if (d_src_patch_rank == src_level->getBoxLevel()->getMPI().getRank()) {
d_src_patch = src_level->getPatch(src_box.getGlobalId());
}
}
示例2:
RefineCopyTransaction::RefineCopyTransaction(
const std::shared_ptr<hier::PatchLevel>& dst_level,
const std::shared_ptr<hier::PatchLevel>& src_level,
const std::shared_ptr<hier::BoxOverlap>& overlap,
const hier::Box& dst_box,
const hier::Box& src_box,
const RefineClasses::Data** refine_data,
int item_id):
d_dst_patch_rank(dst_box.getOwnerRank()),
d_src_patch_rank(src_box.getOwnerRank()),
d_overlap(overlap),
d_refine_data(refine_data),
d_item_id(item_id),
d_incoming_bytes(0),
d_outgoing_bytes(0)
{
TBOX_ASSERT(dst_level);
TBOX_ASSERT(src_level);
TBOX_ASSERT(overlap);
TBOX_ASSERT(dst_box.getLocalId() >= 0);
TBOX_ASSERT(src_box.getLocalId() >= 0);
TBOX_ASSERT(item_id >= 0);
TBOX_ASSERT(refine_data[item_id] != 0);
TBOX_ASSERT_OBJDIM_EQUALITY4(*dst_level,
*src_level,
dst_box,
src_box);
// Note: s_num_coarsen_items cannot be used at this point!
if (d_dst_patch_rank == dst_level->getBoxLevel()->getMPI().getRank()) {
d_dst_patch = dst_level->getPatch(dst_box.getGlobalId());
}
if (d_src_patch_rank == dst_level->getBoxLevel()->getMPI().getRank()) {
d_src_patch = src_level->getPatch(src_box.getGlobalId());
}
}