Distributed memory¶
- class meshmode.distributed.InterRankBoundaryInfo(local_part_id: Hashable, remote_part_id: Hashable, remote_rank: int, local_boundary_connection: DirectDiscretizationConnection)[source]¶
- local_part_id¶
An opaque, hashable, picklable identifier for the local part.
- remote_part_id¶
An opaque, hashable, picklable identifier for the remote part.
- remote_rank¶
The MPI rank with which this boundary communicates.
- local_boundary_connection¶
A
DirectDiscretizationConnection
from the volume onto the boundary described byBTAG_PARTITION(remote_part_id)
.
- class meshmode.distributed.MPIBoundaryCommSetupHelper(mpi_comm: mpi4py.MPI.Intracomm, actx: ArrayContext, inter_rank_bdry_info: Sequence[InterRankBoundaryInfo] | Mapping[int, DirectDiscretizationConnection], bdry_grp_factory: ElementGroupFactory)[source]¶
Helper for setting up inter-part facial data exchange.
- __init__(mpi_comm: mpi4py.MPI.Intracomm, actx: ArrayContext, inter_rank_bdry_info: Sequence[InterRankBoundaryInfo] | Mapping[int, DirectDiscretizationConnection], bdry_grp_factory: ElementGroupFactory)[source]¶
- Parameters:
bdry_grp_factory – Group factory to use when creating the remote-to-local boundary connections
- complete_some()[source]¶
Returns a
dict
mapping a subset of remote parts to remote-to-local boundary connections, where a remote-to-local boundary connection is aDirectDiscretizationConnection
that performs data exchange across faces from part i_remote_part to the local mesh. When an empty dictionary is returned, setup is complete.
- meshmode.distributed.get_partition_by_pymetis(mesh, num_parts, *, connectivity='facial', **kwargs)[source]¶
Return a mesh partition created by
pymetis
.- Parameters:
mesh – A
meshmode.mesh.Mesh
instancenum_parts – the number of parts in the mesh partition
connectivity – the adjacency graph to be used for partitioning. Either
"facial"
or"nodal"
(based on vertices).kwargs – Passed unmodified to
pymetis.part_graph()
.
- Returns:
a
numpy.ndarray
with one entry per element indicating to which part each element belongs, with entries between0
andnum_parts-1
.
Changed in version 2020.2: connectivity was added.
- meshmode.distributed.membership_list_to_map(membership_list: ndarray[Any, Any]) Mapping[Hashable, ndarray] [source]¶
Convert a
numpy.ndarray
that maps an index to a key into adict
that maps a key to a set of indices (with each set of indices stored as a sortednumpy.ndarray
).
- meshmode.distributed.get_connected_parts(mesh: Mesh) Sequence[Hashable] [source]¶
For a local mesh part in mesh, determine the set of connected parts.
- class meshmode.distributed.RemoteGroupInfo(inter_part_adj_groups: List[meshmode.mesh.InterPartAdjacencyGroup], vol_elem_indices: numpy.ndarray, bdry_elem_indices: numpy.ndarray, bdry_faces: numpy.ndarray)[source]¶
- class meshmode.distributed.make_remote_group_infos(actx: ArrayContext, remote_part_id: Hashable, bdry_conn: DirectDiscretizationConnection)[source]¶