From c4743c03083fddf27c8c20d00daf09c97dd6ae55 Mon Sep 17 00:00:00 2001
From: Pietro Incardona <i-bird@linux.fritz.box>
Date: Wed, 6 Jan 2016 16:46:59 -0500
Subject: [PATCH] lid driven cavity 3d

---
 openfpm_data                           |  2 +-
 openfpm_devices                        |  2 +-
 openfpm_io                             |  2 +-
 openfpm_numerics                       |  2 +-
 openfpm_vcluster                       |  2 +-
 src/Graph/CartesianGraphFactory.hpp    |  7 ++++++-
 src/Grid/grid_dist_id.hpp              |  3 +++
 src/Grid/grid_dist_id_iterator_sub.hpp | 10 ++++------
 8 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/openfpm_data b/openfpm_data
index dc5e8ac1..9804ca9a 160000
--- a/openfpm_data
+++ b/openfpm_data
@@ -1 +1 @@
-Subproject commit dc5e8ac1ad2768f591b8fe79eda98720e979acdc
+Subproject commit 9804ca9a401bebee77567a135448faac396f32b1
diff --git a/openfpm_devices b/openfpm_devices
index 91963829..52aa2cff 160000
--- a/openfpm_devices
+++ b/openfpm_devices
@@ -1 +1 @@
-Subproject commit 919638297d5c92749400c69c4a271a2d742cf594
+Subproject commit 52aa2cffd29ad7e4fc306e4f58fd2be2e596fd81
diff --git a/openfpm_io b/openfpm_io
index 7988298e..ffeaddc8 160000
--- a/openfpm_io
+++ b/openfpm_io
@@ -1 +1 @@
-Subproject commit 7988298e26138d0470851e9053e6640511793363
+Subproject commit ffeaddc8646f25c2fcd664af3596a8d9b81fdd6a
diff --git a/openfpm_numerics b/openfpm_numerics
index 7be65314..90e8aaa8 160000
--- a/openfpm_numerics
+++ b/openfpm_numerics
@@ -1 +1 @@
-Subproject commit 7be6531420de26986cd584e3bec0f5ee51afdef1
+Subproject commit 90e8aaa87e5626d888ff78918e3161ddffd5a2a0
diff --git a/openfpm_vcluster b/openfpm_vcluster
index 2840e1b5..24fb89ec 160000
--- a/openfpm_vcluster
+++ b/openfpm_vcluster
@@ -1 +1 @@
-Subproject commit 2840e1b55c52b5006bd54250f7a87ef4b5e6eb9e
+Subproject commit 24fb89ec03a51ac994152ad39a28bf3bb780c129
diff --git a/src/Graph/CartesianGraphFactory.hpp b/src/Graph/CartesianGraphFactory.hpp
index 428e34d8..7269cc91 100644
--- a/src/Graph/CartesianGraphFactory.hpp
+++ b/src/Graph/CartesianGraphFactory.hpp
@@ -196,6 +196,11 @@ public:
 	//! Construct cartesian graph
 	static Graph construct(const size_t ( & sz)[dim], Box<dim,T> dom)
 	{
+		size_t bc[dim];
+
+		for (size_t i = 0 ; i < dim ; i++)
+			bc[i] = NON_PERIODIC;
+
 		// Calculate the size of the hyper-cubes on each dimension
 
 		T szd[dim];
@@ -272,7 +277,7 @@ public:
 					// Calculate the start point id
 
 					size_t start_v = g.LinId(key);
-					size_t end_v = g.template LinId<CheckExistence>(key,c[j].getComb());
+					size_t end_v = g.template LinId<CheckExistence>(key,c[j].getComb(),bc);
 
 					// Add an edge and set the the edge property to the size of the face (communication weight)
 					gp.template addEdge<CheckExistence>(start_v,end_v);
diff --git a/src/Grid/grid_dist_id.hpp b/src/Grid/grid_dist_id.hpp
index 1322be66..e46174a8 100644
--- a/src/Grid/grid_dist_id.hpp
+++ b/src/Grid/grid_dist_id.hpp
@@ -667,6 +667,9 @@ public:
 	grid_dist_id(const size_t (& g_sz)[dim],const Box<dim,St> & domain, const Ghost<dim,St> & g)
 	:domain(domain),ghost(g),dec(*global_v_cluster),v_cl(*global_v_cluster),ginfo(g_sz),ginfo_v(g_sz)
 	{
+#ifdef SE_CLASS2
+		check_new(this,8,GRID_DIST_EVENT,4);
+#endif
 		// Increment the reference counter of the decomposition
 		this->dec.incRef();
 
diff --git a/src/Grid/grid_dist_id_iterator_sub.hpp b/src/Grid/grid_dist_id_iterator_sub.hpp
index 4ae562c8..bec272ac 100644
--- a/src/Grid/grid_dist_id_iterator_sub.hpp
+++ b/src/Grid/grid_dist_id_iterator_sub.hpp
@@ -48,9 +48,6 @@ class grid_dist_iterator_sub
 	//! stop key
 	grid_key_dx<dim> stop;
 
-	//! margin of the grid iterator
-	size_t m;
-
 	/*! \brief compute the subset where it has to iterate
 	 *
 	 * \param g_c Actual grid
@@ -119,8 +116,9 @@ class grid_dist_iterator_sub
 		g_c = tmp.g_c;
 		gList = tmp.gList;
 		gdb_ext = tmp.gdb_ext;
+		start = tmp.start;
+		stop = tmp.stop;
 		a_it.reinitialize(tmp.a_it);
-		m = tmp.m;
 
 		return *this;
 	}
@@ -131,7 +129,7 @@ class grid_dist_iterator_sub
 	*
 	*/
 	grid_dist_iterator_sub(const grid_dist_iterator_sub<dim,device_grid> & tmp)
-	:g_c(tmp.g_c),gList(tmp.gList),gdb_ext(gdb_ext),m(tmp.m)
+	:g_c(tmp.g_c),gList(tmp.gList),gdb_ext(gdb_ext),start(tmp.start),stop(tmp.stop)
 	{
 		a_it.reinitialize(tmp.a_it);
 	}
@@ -145,7 +143,7 @@ class grid_dist_iterator_sub
 	 *
 	 */
 	grid_dist_iterator_sub(const grid_key_dx<dim> & start, const grid_key_dx<dim> & stop ,const Vcluster_object_array<device_grid> & gk, const openfpm::vector<GBoxes<device_grid::dims>> & gdb_ext)
-	:g_c(0),gList(gk),gdb_ext(gdb_ext),start(start),stop(stop),m(0)
+	:g_c(0),gList(gk),gdb_ext(gdb_ext),start(start),stop(stop)
 	{
 		// Initialize the current iterator
 		// with the first grid
-- 
GitLab