From 623e50249f1c87f2d37f0c19bd359715ef1dcd9d Mon Sep 17 00:00:00 2001
From: Incardona Pietro <incardon@mpi-cbg.de>
Date: Fri, 28 May 2021 22:08:09 +0200
Subject: [PATCH] Fixing getPos for grid

---
 src/Grid/tests/grid_dist_id_unit_test.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/Grid/tests/grid_dist_id_unit_test.cpp b/src/Grid/tests/grid_dist_id_unit_test.cpp
index 8d8186ea9..1be88e3f7 100644
--- a/src/Grid/tests/grid_dist_id_unit_test.cpp
+++ b/src/Grid/tests/grid_dist_id_unit_test.cpp
@@ -100,12 +100,16 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_domain_grid_unit_converter3D_test)
 		auto it = g_dist.getDomainIterator();
 
 		auto key = it.get();
+		auto gkey = it.getGKey(key);
 
 		auto pos = g_dist.getPos(key);
 
-		BOOST_REQUIRE_CLOSE(pos.get(0),-0.3f,0.0001);
-		BOOST_REQUIRE_CLOSE(pos.get(1),-0.3f,0.0001);
-		BOOST_REQUIRE_CLOSE(pos.get(2),-0.3f,0.0001);
+		if (gkey.get(0) == 0 && gkey.get(1) == 0 && gkey.get(2) == 0)
+		{
+			BOOST_REQUIRE_CLOSE(pos.get(0),-0.3f,0.0001);
+			BOOST_REQUIRE_CLOSE(pos.get(1),-0.3f,0.0001);
+			BOOST_REQUIRE_CLOSE(pos.get(2),-0.3f,0.0001);
+		}
 
 		bool check = false;
 
-- 
GitLab