Commit 6b9ab5c7 authored by tonynsyde's avatar tonynsyde

Small fixes in distributed graph and DistParmetisDistribution

parent b7fafe44
# vtk DataFile Version 3.0
Graph
ASCII
DATASET POLYDATA
POINTS 16 float
0.500000 0.000000 0.000000
0.750000 0.000000 0.000000
0.500000 0.250000 0.000000
0.750000 0.250000 0.000000
0.000000 0.000000 0.000000
0.250000 0.000000 0.000000
0.000000 0.250000 0.000000
0.250000 0.250000 0.000000
0.500000 0.500000 0.000000
0.750000 0.500000 0.000000
0.500000 0.750000 0.000000
0.750000 0.750000 0.000000
0.000000 0.500000 0.000000
0.250000 0.500000 0.000000
0.000000 0.750000 0.000000
0.250000 0.750000 0.000000
VERTICES 16 32
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
LINES 48 144
2 0 1
2 0 5
2 0 2
2 1 0
2 1 3
2 2 3
2 2 7
2 2 8
2 2 0
2 3 2
2 3 9
2 3 1
2 4 5
2 4 6
2 5 0
2 5 4
2 5 7
2 6 7
2 6 12
2 6 4
2 7 2
2 7 6
2 7 13
2 7 5
2 8 9
2 8 13
2 8 10
2 8 2
2 9 8
2 9 11
2 9 3
2 10 11
2 10 15
2 10 8
2 11 10
2 11 9
2 12 13
2 12 14
2 12 6
2 13 8
2 13 12
2 13 15
2 13 7
2 14 15
2 14 12
2 15 10
2 15 14
2 15 13
POINT_DATA 16
VECTORS x float
0.500000 0.000000 0.000000
0.750000 0.000000 0.000000
0.500000 0.250000 0.000000
0.750000 0.250000 0.000000
0.000000 0.000000 0.000000
0.250000 0.000000 0.000000
0.000000 0.250000 0.000000
0.250000 0.250000 0.000000
0.500000 0.500000 0.000000
0.750000 0.500000 0.000000
0.500000 0.750000 0.000000
0.750000 0.750000 0.000000
0.000000 0.500000 0.000000
0.250000 0.500000 0.000000
0.000000 0.750000 0.000000
0.250000 0.750000 0.000000
SCALARS id unsigned_long
LOOKUP_TABLE default
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SCALARS global_id unsigned_long
LOOKUP_TABLE default
2
3
6
7
0
1
4
5
10
11
14
15
8
9
12
13
CELL_DATA 64
SCALARS srcgid unsigned_long
LOOKUP_TABLE default
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2
2
3
3
6
6
6
6
7
7
7
0
0
1
1
1
4
4
4
5
5
5
5
10
10
10
10
11
11
11
14
14
14
15
15
8
8
8
9
9
9
9
12
12
13
13
13
SCALARS dstgid unsigned_long
LOOKUP_TABLE default
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
1
6
2
7
7
5
10
2
6
11
3
1
4
2
0
5
5
8
0
6
4
9
1
11
9
14
6
10
15
7
15
13
10
14
11
9
12
4
10
8
13
5
13
8
14
12
9
# vtk DataFile Version 3.0
Graph
ASCII
DATASET POLYDATA
POINTS 16 float
0.500000 0.000000 0.000000
0.750000 0.000000 0.000000
0.500000 0.250000 0.000000
0.750000 0.250000 0.000000
0.500000 0.500000 0.000000
0.750000 0.500000 0.000000
0.000000 0.750000 0.000000
0.000000 0.500000 0.000000
0.000000 0.000000 0.000000
0.250000 0.000000 0.000000
0.000000 0.250000 0.000000
0.250000 0.250000 0.000000
0.500000 0.750000 0.000000
0.750000 0.750000 0.000000
0.250000 0.500000 0.000000
0.250000 0.750000 0.000000
VERTICES 16 32
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
LINES 48 144
2 0 1
2 0 9
2 0 2
2 1 0
2 1 3
2 2 3
2 2 11
2 2 4
2 2 0
2 3 2
2 3 5
2 3 1
2 4 5
2 4 14
2 4 12
2 4 2
2 5 4
2 5 13
2 5 3
2 6 15
2 6 7
2 7 14
2 7 6
2 7 10
2 8 9
2 8 10
2 9 0
2 9 8
2 9 11
2 10 11
2 10 7
2 10 8
2 11 2
2 11 10
2 11 14
2 11 9
2 12 13
2 12 15
2 12 4
2 13 12
2 13 5
2 14 4
2 14 7
2 14 15
2 14 11
2 15 12
2 15 6
2 15 14
POINT_DATA 16
VECTORS x float
0.500000 0.000000 0.000000
0.750000 0.000000 0.000000
0.500000 0.250000 0.000000
0.750000 0.250000 0.000000
0.500000 0.500000 0.000000
0.750000 0.500000 0.000000
0.000000 0.750000 0.000000
0.000000 0.500000 0.000000
0.000000 0.000000 0.000000
0.250000 0.000000 0.000000
0.000000 0.250000 0.000000
0.250000 0.250000 0.000000
0.500000 0.750000 0.000000
0.750000 0.750000 0.000000
0.250000 0.500000 0.000000
0.250000 0.750000 0.000000
SCALARS id unsigned_long
LOOKUP_TABLE default
0
1
2
3
5
6
7
4
8
9
10
11
12
13
14
15
SCALARS global_id unsigned_long
LOOKUP_TABLE default
2
3
6
7
10
11
12
8
0
1
4
5
14
15
9
13
CELL_DATA 64
SCALARS srcgid unsigned_long
LOOKUP_TABLE default
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2
2
3
3
6
6
6
6
7
7
7
10
10
10
10
11
11
11
12
12
8
8
8
0
0
1
1
1
4
4
4
5
5
5
5
14
14
14
15
15
9
9
9
9
13
13
13
SCALARS dstgid unsigned_long
LOOKUP_TABLE default
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
1
6
2
7
7
5
10
2
6
11
3
11
9
14
6
10
15
7
13
8
9
12
4
1
4
2
0
5
5
8
0
6
4
9
1
15
13
10
14
11
10
8
13
5
14
12
9
openfpm_data @ 524a87a9
Subproject commit 7e41886aadce576e0e46c8f0eb60ba11473b64ca
Subproject commit 524a87a925b8230b019264ca957293f686974f88
openfpm_io @ 136310cb
Subproject commit dbc37efff49ac7622db19f3944422e496fc5cdc6
Subproject commit 136310cb5b8b776eb405f58d5721c879a8d013b5
......@@ -137,6 +137,18 @@ private:
//! Cell-list that store the geometrical information of the local internal ghost boxes
CellList<dim, T, FAST> lgeo_cell;
// Heap memory receiver
HeapMemory hp_recv;
// vector v_proc
openfpm::vector<size_t> v_proc;
// Receive counter
size_t recv_cnt;
// reference counter of the object in case is shared between object
long int ref_cnt;
/*! \brief Constructor, it decompose and distribute the sub-domains across the processors
*
* \param v_cl Virtual cluster, used internally for communications
......@@ -356,18 +368,6 @@ private:
}
}
// Heap memory receiver
HeapMemory hp_recv;
// vector v_proc
openfpm::vector<size_t> v_proc;
// Receive counter
size_t recv_cnt;
// reference counter of the object in case is shared between object
long int ref_cnt;
public:
/*! \brief Cart decomposition constructor
......@@ -478,8 +478,8 @@ public:
| | | | | |
| | | | | |
+--------------+---+---------------------------+----+ |
| |
+-----------------------------------+
| |
+-----------------------------------+
\endverbatim
......@@ -510,8 +510,8 @@ public:
| | | | | |
| | | | | |
+--------------+------------------------------------+ | |
| | | |
+----------------------------------------+----+------------------------------+
| | | |
+----------------------------------------+----+------------------------------+
\endverbatim
......@@ -523,18 +523,18 @@ public:
*
*
\verbatim
^ p2[1]
|
|
+----+----+
| |
| |
p1[0]<-----+ +----> p2[0]
| |
| |
+----+----+
|
v p1[1]
^ p2[1]
|
|
+----+----+
| |
| |
p1[0]<-----+ +----> p2[0]
| |
| |
+----+----+
|
v p1[1]
\endverbatim
......@@ -655,7 +655,7 @@ public:
dist.decompose();
createSubdomains(v_cl);
//createSubdomains(v_cl);
}
/*! \brief Refine the decomposition, available only for ParMetis distribution, for Metis it is a null call
......@@ -681,7 +681,7 @@ public:
dlb.setUnbalance(unbalance);
if (v_cl.getProcessUnitID() == 0)
{
//std::cout << std::setprecision(3) << unbalance << "\n";
std::cout << std::setprecision(3) << unbalance << "\n";
}