inciter::Partitioner class

Partitioner Charm++ chare group class

Instantiations of Partitioner comprise a processor aware Charm++ chare group. When instantiated, a new object is created on each PE and not more (as opposed to individual chares or chare array object elements). See also the Charm++ interface file partitioner.ci.

Constructors, destructors, conversion operators

Partitioner(const tk::PartitionerCallback& cbp, const tk::RefinerCallback& cbr, const tk::SorterCallback& cbs, const CProxy_Transporter& host, const tk::CProxy_Solver& solver, const CProxy_Refiner& refiner, const CProxy_Sorter& sorter, const Scheme& scheme, const std::map<int, std::vector<std::size_t>>& belem, const std::map<int, std::vector<std::size_t>>& faces, const std::map<int, std::vector<std::size_t>>& bnode)
Constructor.

Public functions

void lboff()
Turn off automatic load balancing.
void partition(int nchare)
Partition the computational mesh into a number of chares.
void offset(int p, std::size_t u)
Receive number of uniquely assigned global mesh node IDs from lower PEs.
void request(int p, const std::unordered_set<std::size_t>& nd)
Request new global node IDs for old node IDs.
void neworder(const std::unordered_map<std::size_t, std::tuple<std::size_t, tk::UnsMesh::Coord>>& nodes)
Receive new (reordered) global node IDs and coordinates.
void addPeMesh(int frompe, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::CoordMap& cm)
Receive mesh elements and their node coordinates after partitioning.
void addMesh(int frompe, const std::unordered_map<int, std::tuple<std::vector<std::size_t>, tk::UnsMesh::CoordMap>>& chmesh)
Receive mesh associated to chares we own after refinement.
void recvMesh()
Acknowledge received mesh after initial mesh refinement.
void refine()
Optionally start refining the mesh.

Function documentation

inciter::Partitioner::Partitioner(const tk::PartitionerCallback& cbp, const tk::RefinerCallback& cbr, const tk::SorterCallback& cbs, const CProxy_Transporter& host, const tk::CProxy_Solver& solver, const CProxy_Refiner& refiner, const CProxy_Sorter& sorter, const Scheme& scheme, const std::map<int, std::vector<std::size_t>>& belem, const std::map<int, std::vector<std::size_t>>& faces, const std::map<int, std::vector<std::size_t>>& bnode)

Constructor.

Parameters
cbp in Charm++ callbacks for Partitioner
cbr in Charm++ callbacks for Refiner
cbs in Charm++ callbacks for Sorter
host in Host Charm++ proxy we are being called from
solver in Linear system solver proxy
refiner in Mesh refiner proxy
sorter in Mesh reordering (sorter) proxy
scheme in Discretization scheme
belem in File-internal elem ids of side sets (whole mesh)
faces in Elem-relative face ids of side sets (whole mesh)
bnode in Node lists of side sets (whole mesh)

void inciter::Partitioner::partition(int nchare)

Partition the computational mesh into a number of chares.

Parameters
nchare in Number of parts the mesh will be partitioned into

This function calls the mesh partitioner to partition the mesh. The number of partitions equals the number nchare argument which must be no lower than the number of PEs.

void inciter::Partitioner::addMesh(int frompe, const std::unordered_map<int, std::tuple<std::vector<std::size_t>, tk::UnsMesh::CoordMap>>& chmesh)

Receive mesh associated to chares we own after refinement.

Parameters
frompe in PE call coming from
chmesh in Map associating mesh connectivities to global node ids and node coordinates for mesh chunks we are assigned by the partitioner