Hi.
For a square mesh I would like get local mesh data from each processor (for example from 2 processors). I supposed that the function LocalMeshData(mesh) returns local mesh data corresponding to a part of global mesh for the given processor. However I obtained only half part of local mesh data and the data was distributed among processors. The code is called with mpirun -np 2.
Thanks for any ideas.
UnitSquareMesh mesh(4, 4);
Poisson::FunctionSpace V(mesh);
...
std::string ss = LocalMeshData(mesh).str(true);
std::cout << ss << "\n";
Output:
<LocalMeshData with 7 vertices (out of 15) and 8 cells (out of 16)>
Vertex coordinates
------------------
0: 0 0.75
1: 0.5 0.75
2: 0.75 0.75
3: 0.25 1
4: 0 1
5: 0.5 1
6: 0.75 1
Vertex indices
--------------
0: 8
1: 9
2: 10
3: 11
4: 12
5: 13
6: 14
Cell vertices
------------
0: 4 7 9
1: 6 9 10
2: 8 7 11
3: 8 12 11
4: 7 9 13
5: 7 11 13
6: 9 10 14
7: 9 13 14
<LocalMeshData with 8 vertices (out of 15) and 8 cells (out of 16)>
Vertex coordinates
------------------
0: 0 0
1: 0.25 0
2: 0.25 0.25
3: 0 0.25
4: 0.25 0.5
5: 0 0.5
6: 0.5 0.5
7: 0.25 0.75
Vertex indices
--------------
0: 0
1: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
Cell vertices
------------
0: 0 1 2
1: 0 3 2
2: 3 2 4
3: 3 5 4
4: 2 4 6
5: 5 4 7
6: 5 8 7
7: 4 6 9