tk::UnsMeshMap class

Charm++ array map for initial placement of array elements using an unstructured grid.

The map object is used by the Charm++ array manager to determine the "home" PE of each element. The home PE is the PE upon which the array element is initially placed, which will retain responsibility for maintaining the location of the element.

Constructors, destructors, conversion operators

UnsMeshMap(std::size_t npoin, const std::vector<std::vector<std::size_t>>& point) explicit
Constructor.

Public functions

auto procNum(int, const CkArrayIndex& idx) override -> int
Return the home processor number for the array element based on unstructured-mesh-aware distribution computed in the constructor.
void populateInitial(int, CkArrayOptions& opt, void* msg, CkArrMgr* mgr) override
Create initial set of array elements based on the unstructured-mesh-aware distribution computed in the constructor.

Function documentation

tk::UnsMeshMap::UnsMeshMap(std::size_t npoin, const std::vector<std::vector<std::size_t>>& point) explicit

Constructor.

Parameters
npoin in Total number of points in mesh
point in Global mesh point ids owned by each array element

int tk::UnsMeshMap::procNum(int, const CkArrayIndex& idx) override

Return the home processor number for the array element based on unstructured-mesh-aware distribution computed in the constructor.

Parameters
idx in Charm++ array index object containing the array element index to assign a PE to
Returns PE assigned

void tk::UnsMeshMap::populateInitial(int, CkArrayOptions& opt, void* msg, CkArrMgr* mgr) override

Create initial set of array elements based on the unstructured-mesh-aware distribution computed in the constructor.

Parameters
opt in Charm++ array options object containing the number of initial array elements to be created
msg in Charm++ messsage to use for array element creation
mgr in Array manager to use