Commit 2a10426b authored by Pietro Incardona's avatar Pietro Incardona

Adding testing files

parent 0348ff18
openfpm_devices @ 6614dc2b
Subproject commit 991e2a0d650da39025a86395e53b27e57995c11e
Subproject commit 6614dc2b99fc100730266111b254e43c44cd92d8
openfpm_io @ b2256f8d
Subproject commit 2d08be6a6ed83b85505c7df27d29e5d47e300f34
Subproject commit b2256f8dc0cf6bbe3e263e277de99a107db6be65
openfpm_vcluster @ ede7ff53
Subproject commit c561f911db7ecd76c18f5b86a6cb6cb211d1c6d6
Subproject commit ede7ff531adb025d0930de050d0aa65a4ead16cd
......@@ -720,9 +720,6 @@ public:
cart.domain = domain;
std::copy(spacing,spacing+3,cart.spacing);
//! Runtime virtual cluster
cart.v_cl = v_cl;
cart.bbox = bbox;
cart.ss_box = ss_box;
cart.ghost = g;
......@@ -762,9 +759,6 @@ public:
cart.domain = domain;
std::copy(spacing,spacing+3,cart.spacing);
//! Runtime virtual cluster
cart.v_cl = v_cl;
cart.ghost = ghost;
cart.bbox = bbox;
......@@ -795,9 +789,6 @@ public:
domain = cart.domain;
std::copy(cart.spacing,cart.spacing+3,spacing);
//! Runtime virtual cluster
v_cl = cart.v_cl;
ghost = cart.ghost;
bbox = cart.bbox;
......
......@@ -231,9 +231,6 @@ public:
// spacing does not change
std::copy(dec.spacing,dec.spacing+3,this->spacing);
//! Runtime virtual cluster
this->v_cl = dec.v_cl;
this->ghost = g;
this->dist = dec.dist;
......
......@@ -261,12 +261,12 @@ BOOST_AUTO_TEST_CASE( Parmetis_distribution_test)
//! [Initialize a ParMetis Cartesian graph and decompose]
if (v_cl.getProcessingUnits() == 0)
if (v_cl.getProcessUnitID() == 0)
{
// write the first decomposition
pmet_dist.write("vtk_parmetis_distribution_0.vtk");
pmet_dist.write("vtk_parmetis_distribution_0");
bool test = compare("vtk_parmetis_distribution_0.vtk","src/Decomposition/Distribution/test_data/vtk_parmetis_distribution_0_test.vtk");
bool test = compare(std::to_string(v_cl.getProcessUnitID()) + "_vtk_parmetis_distribution_0.vtk","src/Decomposition/Distribution/test_data/" + std::to_string(v_cl.getProcessUnitID()) + "_vtk_parmetis_distribution_0_test.vtk");
BOOST_REQUIRE_EQUAL(true,test);
}
......@@ -297,10 +297,10 @@ BOOST_AUTO_TEST_CASE( Parmetis_distribution_test)
{
std::stringstream str;
str << "vtk_parmetis_distribution_" << iter;
pmet_dist.write(str.str() + ".vtk");
pmet_dist.write(str.str());
// Check
bool test = compare(str.str() + ".vtk",std::string("src/Decomposition/Distribution/test_data/") + str.str() + "_test.vtk");
bool test = compare(std::to_string(v_cl.getProcessUnitID()) + "_" + str.str() + ".vtk", "src/Decomposition/Distribution/test_data/" + std::to_string(v_cl.getProcessUnitID()) + "_" + str.str() + "_test.vtk");
BOOST_REQUIRE_EQUAL(true,test);
}
}
......@@ -344,7 +344,7 @@ BOOST_AUTO_TEST_CASE( DistParmetis_distribution_test)
//! [Initialize a ParMetis Cartesian graph and decompose]
// write the first decomposition
pmet_dist.write("vtk_dist_parmetis_distribution_0.vtk");
pmet_dist.write("vtk_dist_parmetis_distribution_0");
if (v_cl.getProcessingUnits() == 0)
{
......@@ -377,7 +377,7 @@ BOOST_AUTO_TEST_CASE( DistParmetis_distribution_test)
std::stringstream str;
str << "vtk_dist_parmetis_distribution_" << iter;
pmet_dist.write(str.str() + ".vtk");
pmet_dist.write(str.str());
// Check
if (v_cl.getProcessUnitID() == 0)
......
......@@ -449,7 +449,6 @@ public:
check_valid(&mt,8);
check_valid(this,8);
#endif
this->v_cl = mt.v_cl;
this->gr = mt.gr;
this->domain = mt.domain;
this->gp = mt.gp;
......@@ -467,7 +466,6 @@ public:
check_valid(mt);
check_valid(this,8);
#endif
this->v_cl = mt.v_cl;
this->gr = mt.gr;
this->domain = mt.domain;
this->gp.swap(mt.gp);
......
......@@ -573,16 +573,12 @@ public:
*/
void write(const std::string & file)
{
//f (v_cl.getProcessUnitID() == 0)
//{
VTKWriter<Graph_CSR<nm_v, nm_e>, VTK_GRAPH> gv2(gp);
gv2.write(std::to_string(v_cl.getProcessUnitID()) + file);
//}
VTKWriter<Graph_CSR<nm_v, nm_e>, VTK_GRAPH> gv2(gp);
gv2.write(std::to_string(v_cl.getProcessUnitID()) + "_" + file + ".vtk");
}
const ParMetisDistribution<dim,T> & operator=(const ParMetisDistribution<dim,T> & dist)
{
v_cl = dist.v_cl;
gr = dist.gr;
domain = dist.domain;
gp = dist.gp;
......
# vtk DataFile Version 3.0
Graph
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 60 float
0 1 0.0
0 0 0.0
0 1 0.0
0 0 0.0
2 2 0.0
2 2 0.0
1 2 0.0
1 2 0.0
3 1 0.0
3 1 0.0
3 1 0.0
3 1 0.0
0 5 0.0
0 3 0.0
0 5 0.0
0 3 0.0
2 6 0.0
2 6 0.0
1 6 0.0
1 6 0.0
4 5 0.0
4 5 0.0
3 5 0.0
3 5 0.0
1 7 0.0
1 7 0.0
1 7 0.0
1 7 0.0
2 4 0.0
2 4 0.0
2 4 0.0
2 4 0.0
4 4 0.0
4 4 0.0
4 4 0.0
4 4 0.0
5 0 0.0
5 0 0.0
5 0 0.0
5 0 0.0
7 1 0.0
7 1 0.0
6 1 0.0
6 1 0.0
6 3 0.0
6 3 0.0
6 3 0.0
6 3 0.0
7 5 0.0
7 5 0.0
6 5 0.0
6 5 0.0
7 7 0.0
7 6 0.0
7 7 0.0
7 6 0.0
5 7 0.0
5 7 0.0
4 7 0.0
4 7 0.0
CELLS 15 75
4 0 1 2 3
4 4 5 6 7
4 8 9 10 11
4 12 13 14 15
4 16 17 18 19
4 20 21 22 23
4 24 25 26 27
4 28 29 30 31
4 32 33 34 35
4 36 37 38 39
4 40 41 42 43
4 44 45 46 47
4 48 49 50 51
4 52 53 54 55
4 56 57 58 59
CELL_TYPES 15
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
CELL_DATA 15
COLOR_SCALARS data 4
0.500004 0.000000 0.000000 1.0
0.565769 0.000000 0.000000 1.0
0.877803 0.000000 0.000000 1.0
0.729325 0.000000 0.000000 1.0
0.766384 0.000000 0.000000 1.0
0.609480 0.000000 0.000000 1.0
0.523522 0.000000 0.000000 1.0
0.839432 0.000000 0.000000 1.0
0.839648 0.000000 0.000000 1.0
0.967346 0.000000 0.000000 1.0
0.691751 0.000000 0.000000 1.0
0.759708 0.000000 0.000000 1.0
0.915483 0.000000 0.000000 1.0
0.517286 0.000000 0.000000 1.0
0.526731 0.000000 0.000000 1.0
# vtk DataFile Version 3.0
Graph
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 64 float
1 0 0.0
1 0 0.0
1 0 0.0
1 0 0.0
4 1 0.0
4 0 0.0
4 1 0.0
4 0 0.0
5 1 0.0
5 1 0.0
5 1 0.0
5 1 0.0
3 2 0.0
3 2 0.0
3 2 0.0
3 2 0.0
6 0 0.0
6 0 0.0
6 0 0.0
6 0 0.0
6 2 0.0
6 2 0.0
6 2 0.0
6 2 0.0
0 2 0.0
0 2 0.0
0 2 0.0
0 2 0.0
1 5 0.0
1 4 0.0
1 5 0.0
1 4 0.0
2 5 0.0
2 5 0.0
2 5 0.0
2 5 0.0
0 6 0.0
0 6 0.0
0 6 0.0
0 6 0.0
3 4 0.0
3 4 0.0
3 4 0.0
3 4 0.0
4 6 0.0
4 6 0.0
3 6 0.0
3 6 0.0
3 7 0.0
3 7 0.0
3 7 0.0
3 7 0.0
5 4 0.0
5 4 0.0
5 4 0.0
5 4 0.0
7 4 0.0
7 4 0.0
7 4 0.0
7 4 0.0
6 7 0.0
6 7 0.0
6 7 0.0
6 7 0.0
CELLS 16 80
4 0 1 2 3
4 4 5 6 7
4 8 9 10 11
4 12 13 14 15
4 16 17 18 19
4 20 21 22 23
4 24 25 26 27
4 28 29 30 31
4 32 33 34 35
4 36 37 38 39
4 40 41 42 43
4 44 45 46 47
4 48 49 50 51
4 52 53 54 55
4 56 57 58 59
4 60 61 62 63
CELL_TYPES 16
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
CELL_DATA 16
COLOR_SCALARS data 4
0.500004 0.000000 0.000000 1.0
0.565769 0.000000 0.000000 1.0
0.877803 0.000000 0.000000 1.0
0.729325 0.000000 0.000000 1.0
0.766384 0.000000 0.000000 1.0
0.609480 0.000000 0.000000 1.0
0.523522 0.000000 0.000000 1.0
0.839432 0.000000 0.000000 1.0
0.839648 0.000000 0.000000 1.0
0.967346 0.000000 0.000000 1.0
0.691751 0.000000 0.000000 1.0
0.759708 0.000000 0.000000 1.0
0.915483 0.000000 0.000000 1.0
0.517286 0.000000 0.000000 1.0
0.526731 0.000000 0.000000 1.0
0.764850 0.000000 0.000000 1.0
# vtk DataFile Version 3.0
Graph
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 44 float
3 0 0.0
3 0 0.0
2 0 0.0
2 0 0.0
2 1 0.0
2 1 0.0
1 1 0.0
1 1 0.0
7 0 0.0
7 0 0.0
7 0 0.0
7 0 0.0
5 3 0.0
5 2 0.0
4 3 0.0
4 2 0.0
6 4 0.0
6 4 0.0
6 4 0.0
6 4 0.0
3 3 0.0
3 3 0.0
1 3 0.0
1 3 0.0
7 3 0.0
7 2 0.0
7 3 0.0
7 2 0.0
5 6 0.0
5 5 0.0
5 6 0.0
5 5 0.0
6 6 0.0
6 6 0.0
6 6 0.0
6 6 0.0
0 7 0.0
0 7 0.0
0 7 0.0
0 7 0.0
2 7 0.0
2 7 0.0
2 7 0.0
2 7 0.0
CELLS 11 55
4 0 1 2 3
4 4 5 6 7
4 8 9 10 11
4 12 13 14 15
4 16 17 18 19
4 20 21 22 23
4 24 25 26 27
4 28 29 30 31
4 32 33 34 35
4 36 37 38 39
4 40 41 42 43
CELL_TYPES 11
8
8
8
8
8
8
8
8
8
8
8
CELL_DATA 11
COLOR_SCALARS data 4
0.500004 0.000000 0.000000 1.0
0.565769 0.000000 0.000000 1.0
0.877803 0.000000 0.000000 1.0
0.729325 0.000000 0.000000 1.0
0.766384 0.000000 0.000000 1.0
0.609480 0.000000 0.000000 1.0
0.523522 0.000000 0.000000 1.0
0.839432 0.000000 0.000000 1.0
0.839648 0.000000 0.000000 1.0
0.967346 0.000000 0.000000 1.0
0.691751 0.000000 0.000000 1.0
......@@ -6807,155 +6807,130 @@ LOOKUP_TABLE default
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2
2
0
0
0
0
0
2
2
2
0
0
0
0
0
2
2
2
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1