Control mesh partition in parallel

Hi All,

When we are running our script in parallel, can we control the partition lines of our mesh?

For example,

from dolfin import *
mesh = UnitIntervalMesh(20)
V = FunctionSpace(mesh, "CG", 1)
istart, iend = V.dofmap().ownership_range() 
print(iend, istart)

When I run;

mpirun -np 4 python3 mwe.py

It gives;

0 4
10 15
15 21
4 10

But I want something like;

0 10
10 14
14 17
17 21

I need an unbalanced mesh partition for my problem. Are the partition points can be controlled ?

If so what is the elegant way of doing this?

Thanks for your responses in advance.

2 Likes