Hello,
When I access facets and cells in parallel, their indices are not global but the one in each process. How can I access the global index?
The code I run is:
from dolfin import *
parameters['ghost_mode'] = 'shared_facets'
N = 2
mesh = UnitSquareMesh(N,N)
for c in cells(mesh):
for f in facets(c):
print(c.index(), f.index())
Here is the ouput in serial:
0 4
0 2
0 0
1 7
1 2
1 1
2 6
2 5
2 3
3 10
3 5
3 4
4 11
4 9
4 7
5 14
5 9
5 8
6 13
6 12
6 10
7 15
7 12
7 11
And here is the output with mpirun -n 2 python3.8 test_parallel.py
:
0 3
0 1
0 0
0 3
0 1
0 0
1 4
1 4
1 1
1 2
1 1
1 2
2 5
2 6
2 5
2 6
2 4
2 4
3 8
3 8
3 6
3 7
3 6
3 7
I use dolfin 2019.1.0 on ubuntu.