From 88dee2bb1bc10c2b9cd787ea7ad915cb61c081fe Mon Sep 17 00:00:00 2001
From: Pietro Incardona <incardon@mpi-cbg.de>
Date: Tue, 20 Oct 2015 19:15:50 +0200
Subject: [PATCH] Update data to use the latest modules

---
 example/Vector/0_simple/main.cpp | 10 +++++++++-
 openfpm_data                     |  2 +-
 openfpm_vcluster                 |  2 +-
 src/Vector/vector_dist.hpp       | 15 +++++----------
 4 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/example/Vector/0_simple/main.cpp b/example/Vector/0_simple/main.cpp
index 9dd3b292..8fb81a1c 100644
--- a/example/Vector/0_simple/main.cpp
+++ b/example/Vector/0_simple/main.cpp
@@ -118,7 +118,15 @@ int main(int argc, char* argv[])
 	v_cl.execute();
 	
 	//
-	// ### WIKI 14 ###
+	// ### WIKI 9 ###
+	//
+	// Output the particle position for each processor
+	//
+
+	vd.write("output");
+
+	//
+	// ### WIKI 10 ###
 	//
 	// Deinitialize the library
 	//
diff --git a/openfpm_data b/openfpm_data
index 08dd51a9..a05857e3 160000
--- a/openfpm_data
+++ b/openfpm_data
@@ -1 +1 @@
-Subproject commit 08dd51a9c1a9ecf4317d9f4d68f8d55ae81b70f3
+Subproject commit a05857e34fe1ddfc266d8ae80e8c4d673be88d00
diff --git a/openfpm_vcluster b/openfpm_vcluster
index 54fcd2ae..3e846786 160000
--- a/openfpm_vcluster
+++ b/openfpm_vcluster
@@ -1 +1 @@
-Subproject commit 54fcd2aeb78744c3b4f085d8f58b86cb8e325e52
+Subproject commit 3e846786367e20cf01e7658af9c1ec4c277c6ce3
diff --git a/src/Vector/vector_dist.hpp b/src/Vector/vector_dist.hpp
index 40c2fe41..73dc114d 100644
--- a/src/Vector/vector_dist.hpp
+++ b/src/Vector/vector_dist.hpp
@@ -749,18 +749,13 @@ public:
 	 */
 	inline bool write(std::string out, int opt = NO_GHOST)
 	{
-		if (hasEnding(out,".csv"))
-		{
-			// CSVWriter test
-			CSVWriter<openfpm::vector<Point<dim,St>>, openfpm::vector<prop> > csv_writer;
-
-			std::string output = std::to_string(v_cl.getProcessUnitID()) + std::string("_") + out;
+		// CSVWriter test
+		CSVWriter<openfpm::vector<Point<dim,St>>, openfpm::vector<prop> > csv_writer;
 
-			// Write the CSV
-			return csv_writer.write(output,v_pos.get(INTERNAL),v_prp.get(INTERNAL));
-		}
+		std::string output = std::to_string(out + std::to_string(v_cl.getProcessUnitID()) + std::to_string(".csv"));
 
-		return false;
+		// Write the CSV
+		return csv_writer.write(output,v_pos.get(INTERNAL),v_prp.get(INTERNAL));
 	}
 };
 
-- 
GitLab