Index: src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.cpp
===================================================================
--- src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.cpp	(revision 450adf0e68db3480279d96bc40bfd5dc2ba3ec36)
+++ src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.cpp	(revision 0983e6d346c0bf4b6017c772fa674db9ba07dcb3)
@@ -68,4 +68,8 @@
 CPPUNIT_TEST_SUITE_REGISTRATION( SphericalPointDistributionTest );
 
+/** due to root-taking in function we only have limited numerical precision,
+ * basically half of the double range.
+ */
+const double CenterAccuracy = sqrt(std::numeric_limits<double>::epsilon()*1e2);
 
 void SphericalPointDistributionTest::setUp()
@@ -638,4 +642,88 @@
 }
 
+/** UnitTest for matchSphericalPointDistributions() with four points and weights
+ * not all equal to one.
+ */
+void SphericalPointDistributionTest::matchSphericalPointDistributionsTest_multiple()
+{
+  SphericalPointDistribution SPD(1.);
+
+  // test with four points: one point having weight of two
+  {
+    SphericalPointDistribution::WeightedPolygon_t polygon;
+    polygon += std::make_pair( Vector(1.,0.,0.), 2);
+    SphericalPointDistribution::Polygon_t newpolygon =
+        SPD.get<4>();
+    SphericalPointDistribution::Polygon_t expected;
+    expected += Vector(-0.5773502691896,-5.551115123126e-17,0.8164965809277);
+    expected += Vector(-0.5773502691896,-5.551115123126e-17,-0.8164965809277);
+    SphericalPointDistribution::Polygon_t remaining =
+        SphericalPointDistribution::matchSphericalPointDistributions(
+            polygon,
+            newpolygon);
+//    std::cout << std::setprecision(13) << "Matched polygon is " << remaining << std::endl;
+//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
+    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
+  }
+
+  // test with five points: one point having weight of two
+  {
+    SphericalPointDistribution::WeightedPolygon_t polygon;
+    polygon += std::make_pair( Vector(1.,0.,0.), 2);
+    SphericalPointDistribution::Polygon_t newpolygon =
+        SPD.get<5>();
+    SphericalPointDistribution::Polygon_t expected;
+    expected += Vector(-0.7071067811865,0.7071067811865,0);
+    expected += Vector(-0.3535533905933,-0.3535533905933,0.8660254037844);
+    expected += Vector(-0.3535533905933,-0.3535533905933,-0.8660254037844);
+    SphericalPointDistribution::Polygon_t remaining =
+        SphericalPointDistribution::matchSphericalPointDistributions(
+            polygon,
+            newpolygon);
+//    std::cout << std::setprecision(13) << "Matched polygon is " << remaining << std::endl;
+//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
+    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
+  }
+
+
+  // test with five points: one point having weight of two, one weight of one
+  {
+    SphericalPointDistribution::WeightedPolygon_t polygon;
+    polygon += std::make_pair( Vector(M_SQRT1_2,M_SQRT1_2,0.), 2);
+    polygon += std::make_pair( Vector(-1.,0.,0.), 1);
+    SphericalPointDistribution::Polygon_t newpolygon =
+        SPD.get<5>();
+    SphericalPointDistribution::Polygon_t expected;
+    expected += Vector(0.3535533786708,-0.3535533955317,-0.8660254066357);
+    expected += Vector(0.3535534025157,-0.3535533856548,0.8660254009332);
+    SphericalPointDistribution::Polygon_t remaining =
+        SphericalPointDistribution::matchSphericalPointDistributions(
+            polygon,
+            newpolygon);
+//    std::cout << std::setprecision(13) << "Matched polygon is " << remaining << std::endl;
+//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
+    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
+  }
+
+  // test with six points: two points each having weight of two
+  {
+    SphericalPointDistribution::WeightedPolygon_t polygon;
+    polygon += std::make_pair( Vector(M_SQRT1_2,-M_SQRT1_2,0.), 2);
+    polygon += std::make_pair( Vector(-M_SQRT1_2,M_SQRT1_2,0.), 2);
+    SphericalPointDistribution::Polygon_t newpolygon =
+        SPD.get<6>();
+    SphericalPointDistribution::Polygon_t expected;
+    expected += Vector(0.,0.,-1.);
+    expected += Vector(0.,0.,1.);
+    SphericalPointDistribution::Polygon_t remaining =
+        SphericalPointDistribution::matchSphericalPointDistributions(
+            polygon,
+            newpolygon);
+//    std::cout << std::setprecision(13) << "Matched polygon is " << remaining << std::endl;
+//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
+    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
+  }
+}
+
 /** UnitTest for matchSphericalPointDistributions() with five points
  */
Index: src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.hpp
===================================================================
--- src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.hpp	(revision 450adf0e68db3480279d96bc40bfd5dc2ba3ec36)
+++ src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.hpp	(revision 0983e6d346c0bf4b6017c772fa674db9ba07dcb3)
@@ -31,4 +31,5 @@
     CPPUNIT_TEST ( matchSphericalPointDistributionsTest_7 );
     CPPUNIT_TEST ( matchSphericalPointDistributionsTest_8 );
+    CPPUNIT_TEST ( matchSphericalPointDistributionsTest_multiple );
     CPPUNIT_TEST_SUITE_END();
 
@@ -45,4 +46,5 @@
       void matchSphericalPointDistributionsTest_7();
       void matchSphericalPointDistributionsTest_8();
+      void matchSphericalPointDistributionsTest_multiple();
 
 private:
