From e0d9fe9071f980331823255241af129ebdba457e Mon Sep 17 00:00:00 2001
From: Christian Godenschwager <christian.godenschwager@fau.de>
Date: Fri, 4 May 2018 16:34:31 +0200
Subject: [PATCH] Fix body id initialization in pe tests

---
 tests/pe/CollisionTobiasGJK.cpp | 2 +-
 tests/pe/SimpleCCD.cpp          | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/pe/CollisionTobiasGJK.cpp b/tests/pe/CollisionTobiasGJK.cpp
index bed8bc4ce..2c3fa052a 100644
--- a/tests/pe/CollisionTobiasGJK.cpp
+++ b/tests/pe/CollisionTobiasGJK.cpp
@@ -48,7 +48,7 @@
 using namespace walberla;
 using namespace walberla::pe;
 
-typedef boost::tuple<Box, Capsule, Plane, Sphere, Union<boost::tuple<Sphere, Union<boost::tuple<Sphere>>>>, Ellipsoid> BodyTuple ;
+typedef boost::tuple<Box, Capsule, Plane, Sphere, Union<boost::tuple<Sphere>>, Union<boost::tuple<Sphere, Union<boost::tuple<Sphere>>>>, Ellipsoid> BodyTuple ;
 
 bool gjkEPAcollideHybrid(GeomPrimitive &geom1, GeomPrimitive &geom2, Vec3& normal, Vec3& contactPoint, real_t& penetrationDepth)
 {
diff --git a/tests/pe/SimpleCCD.cpp b/tests/pe/SimpleCCD.cpp
index cd0095811..3bb653908 100644
--- a/tests/pe/SimpleCCD.cpp
+++ b/tests/pe/SimpleCCD.cpp
@@ -19,18 +19,19 @@
 //======================================================================================================================
 
 #include "pe/Materials.h"
-#include "pe/rigidbody/Sphere.h"
 #include "pe/Types.h"
 #include "pe/rigidbody/BodyStorage.h"
+#include "pe/rigidbody/SetBodyTypeIDs.h"
+#include "pe/rigidbody/Sphere.h"
 #include "pe/ccd/SimpleCCD.h"
 #include "pe/ccd/HashGrids.h"
 #include "pe/fcd/SimpleFCD.h"
-#include "core/DataTypes.h"
 
+#include "core/DataTypes.h"
+#include "core/UniqueID.h"
 #include "core/timing/TimingPool.h"
 #include "core/debug/TestSubsystem.h"
 #include "core/math/Random.h"
-#include "core/UniqueID.h"
 
 using namespace walberla;
 using namespace walberla::pe;
@@ -43,6 +44,8 @@ int main( int argc, char** argv )
 
     walberla::MPIManager::instance()->initializeMPI( &argc, &argv );
 
+    SetBodyTypeIDs<BodyTuple>::execute();
+
     MaterialID iron = Material::find("iron");
 
     BodyStorage globalStorage;
-- 
GitLab