distribute_mesh(self,
mesh,
partition=None)
| source code
|
Take the Mesh instance `mesh' and distribute it according to
`partition'.
If partition is an integer, invoke PyMetis to partition the mesh into
this many parts, distributing over the first `partition' ranks.
If partition is None, act as if partition was the integer
corresponding to the current number of ranks on the job.
If partition is not an integer, it must be a mapping from element
number to rank. (A list or tuple of rank numbers will do, for example, or
so will a full-blown dict.)
Returns a mesh chunk.
We deliberately do not define the term `mesh chunk'. The return value
of this function is to be treated as opaque by the user, only to be used
as an argument to make_discretization().
This routine may only be invoked on the head rank.
- Overrides:
RunContext.distribute_mesh
- (inherited documentation)
|