ParallelComm data about shared entity sets. More...
#include <SharedSetData.hpp>
Classes | |
struct | less_vect |
struct | SharedSetTagData |
per-set tag data More... | |
Public Member Functions | |
SharedSetData (Interface &moab, int pcID, unsigned rank) | |
~SharedSetData () | |
ErrorCode | get_owning_procs (std::vector< unsigned > &ranks_out) const |
Get ranks of sharing procs. More... | |
ErrorCode | get_sharing_procs (EntityHandle entity_set, std::vector< unsigned > &ranks_out) const |
Get ranks of sharing procs. More... | |
ErrorCode | get_shared_sets (Range &sets_out) const |
Get handles for all shared sets. More... | |
ErrorCode | get_shared_sets (unsigned rank, Range &sets_out) const |
Get handles for all sets shared with specified process. More... | |
ErrorCode | get_owner (EntityHandle set, unsigned &rank_out, EntityHandle &remote_handle_out) const |
Get owner and owner's handle for shared set. More... | |
ErrorCode | get_owner (EntityHandle set, unsigned &rank_out) const |
Get owner of shared set. More... | |
ErrorCode | get_owner_handle (EntityHandle set, EntityHandle &handle_out) const |
Get owner's handle for shared set. More... | |
ErrorCode | get_local_handle (unsigned owner_rank, EntityHandle remote_handle, EntityHandle &local_handle_out) const |
Get local handle for shared set. More... | |
ErrorCode | set_owner (EntityHandle set, unsigned owner_rank, EntityHandle owner_handle) |
ErrorCode | set_sharing_procs (EntityHandle set_handle, std::vector< unsigned > &ranks) |
set/update sharing list for a set More... | |
Private Types | |
typedef RangeMap< EntityHandle, EntityHandle > | ProcHandleMapType |
typedef std::map< unsigned, ProcHandleMapType > | RHMap |
typedef std::set< std::vector< unsigned >, less_vect > | RProcMap |
Static Private Member Functions | |
static void | append_local_handles (const ProcHandleMapType &map, Range &append_to_this) |
Private Attributes | |
Interface & | mb |
Tag | sharedSetTag |
RHMap | handleMap |
RProcMap | procListMap |
ParallelComm data about shared entity sets.
Definition at line 30 of file SharedSetData.hpp.
|
private |
Map type for lookup of local handle given remote handle
Definition at line 100 of file SharedSetData.hpp.
|
private |
Definition at line 145 of file SharedSetData.hpp.
|
private |
Definition at line 146 of file SharedSetData.hpp.
moab::SharedSetData::SharedSetData | ( | Interface & | moab, |
int | pcID, | ||
unsigned | rank | ||
) |
Definition at line 15 of file SharedSetData.cpp.
References ErrorCode, mb, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_OPAQUE, moab::SharedSetData::SharedSetTagData::ownerHandle, moab::SharedSetData::SharedSetTagData::ownerRank, sharedSetTag, moab::SharedSetData::SharedSetTagData::sharingProcs, and moab::Interface::tag_get_handle().
moab::SharedSetData::~SharedSetData | ( | ) |
Definition at line 41 of file SharedSetData.cpp.
References mb, sharedSetTag, and moab::Interface::tag_delete().
|
staticprivate |
Definition at line 178 of file SharedSetData.cpp.
References moab::Range::begin(), moab::RangeMap< KeyType, ValType, NullVal >::begin(), moab::RangeMap< KeyType, ValType, NullVal >::end(), and moab::Range::insert().
Referenced by get_shared_sets().
ErrorCode moab::SharedSetData::get_local_handle | ( | unsigned | owner_rank, |
EntityHandle | remote_handle, | ||
EntityHandle & | local_handle_out | ||
) | const |
Get local handle for shared set.
Definition at line 109 of file SharedSetData.cpp.
References handleMap, and MB_SUCCESS.
Referenced by moab::ParallelComm::get_entityset_local_handle().
|
inline |
ErrorCode moab::SharedSetData::get_owner | ( | EntityHandle | set, |
unsigned & | rank_out, | ||
EntityHandle & | remote_handle_out | ||
) | const |
Get owner and owner's handle for shared set.
Definition at line 91 of file SharedSetData.cpp.
References ErrorCode, mb, MB_SUCCESS, moab::SharedSetData::SharedSetTagData::ownerHandle, moab::SharedSetData::SharedSetTagData::ownerRank, sharedSetTag, moab::SharedSetData::SharedSetTagData::sharingProcs, and moab::Interface::tag_get_data().
Referenced by moab::ParallelComm::get_entityset_owner(), get_owner(), and get_owner_handle().
|
inline |
Get owner's handle for shared set.
Definition at line 68 of file SharedSetData.hpp.
References get_owner().
ErrorCode moab::SharedSetData::get_owning_procs | ( | std::vector< unsigned > & | ranks_out | ) | const |
Get ranks of sharing procs.
Get list of all process ranks that own at least one set that is shared with this process.
Definition at line 46 of file SharedSetData.cpp.
References handleMap, and MB_SUCCESS.
Referenced by moab::ParallelComm::get_entityset_owners().
Get handles for all shared sets.
Definition at line 67 of file SharedSetData.cpp.
References append_local_handles(), moab::Range::clear(), handleMap, and MB_SUCCESS.
Referenced by moab::ParallelComm::get_owned_sets(), and moab::ParallelComm::get_shared_sets().
Get handles for all sets shared with specified process.
Definition at line 78 of file SharedSetData.cpp.
References append_local_handles(), moab::Range::clear(), handleMap, and MB_SUCCESS.
ErrorCode moab::SharedSetData::get_sharing_procs | ( | EntityHandle | entity_set, |
std::vector< unsigned > & | ranks_out | ||
) | const |
Get ranks of sharing procs.
Get list of all process ranks with which this process the passed set. Returns an empty list for non-shared sets.
Definition at line 55 of file SharedSetData.cpp.
References ErrorCode, mb, MB_SUCCESS, sharedSetTag, moab::SharedSetData::SharedSetTagData::sharingProcs, and moab::Interface::tag_get_data().
Referenced by moab::ParallelComm::get_entityset_procs().
ErrorCode moab::SharedSetData::set_owner | ( | EntityHandle | set, |
unsigned | owner_rank, | ||
EntityHandle | owner_handle | ||
) |
Definition at line 131 of file SharedSetData.cpp.
References ErrorCode, handleMap, mb, MB_SUCCESS, moab::SharedSetData::SharedSetTagData::ownerHandle, moab::SharedSetData::SharedSetTagData::ownerRank, sharedSetTag, moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by moab::ParallelComm::resolve_shared_sets().
ErrorCode moab::SharedSetData::set_sharing_procs | ( | EntityHandle | set_handle, |
std::vector< unsigned > & | ranks | ||
) |
set/update sharing list for a set
\NOTE sorts ranks
vector
Definition at line 161 of file SharedSetData.cpp.
References ErrorCode, mb, MB_SUCCESS, procListMap, sharedSetTag, moab::SharedSetData::SharedSetTagData::sharingProcs, moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by moab::ParallelComm::resolve_shared_sets().
|
private |
Map for lookup of ProcHandleMapType instance by rank
Definition at line 150 of file SharedSetData.hpp.
Referenced by get_local_handle(), get_owning_procs(), get_shared_sets(), and set_owner().
|
private |
Definition at line 86 of file SharedSetData.hpp.
Referenced by get_owner(), get_sharing_procs(), set_owner(), set_sharing_procs(), SharedSetData(), and ~SharedSetData().
|
private |
Storage of sharing lists
Definition at line 153 of file SharedSetData.hpp.
Referenced by set_sharing_procs().
|
private |
Shared set data: opaque tag containing struct SharedSetTagData
Definition at line 97 of file SharedSetData.hpp.
Referenced by get_owner(), get_sharing_procs(), set_owner(), set_sharing_procs(), SharedSetData(), and ~SharedSetData().