Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package yade Yade upstream have found a critical bug in so-called periodic boundaries contact detection [1]. It would be good to have this fix in Debian as well. I cherry-picked the upstream's patch, which is attached to this mail. unblock yade/2017.01a-8 [1] http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg12355.html Thanks, Anton
diff -Nru yade-2017.01a/debian/changelog yade-2017.01a/debian/changelog --- yade-2017.01a/debian/changelog 2017-02-28 22:03:24.000000000 +0100 +++ yade-2017.01a/debian/changelog 2017-04-14 12:43:59.000000000 +0200 @@ -1,3 +1,10 @@ +yade (2017.01a-8) unstable; urgency=medium + + [ Bruno Chareyre ] + * [be08409] Critical bugfix for periodic boundaries. + + -- Anton Gladky <gl...@debian.org> Fri, 14 Apr 2017 12:43:59 +0200 + yade (2017.01a-7) unstable; urgency=medium * [31387da] Add missing dependency on python-pyqt5.qtsvg in python-yade. diff -Nru yade-2017.01a/debian/patches/09_fix_periodic_boundaries.patch yade-2017.01a/debian/patches/09_fix_periodic_boundaries.patch --- yade-2017.01a/debian/patches/09_fix_periodic_boundaries.patch 1970-01-01 01:00:00.000000000 +0100 +++ yade-2017.01a/debian/patches/09_fix_periodic_boundaries.patch 2017-04-14 12:42:33.000000000 +0200 @@ -0,0 +1,28 @@ +From c7c8e6f62d452c81a31415f05a12587a6cc8c452 Mon Sep 17 00:00:00 2001 +From: bchareyre <bruno.chare...@grenoble-inp.fr> +Date: Fri, 14 Apr 2017 12:04:32 +0200 +Subject: [PATCH] Critical bugfix for collision detection in periodic boundary + conditions. Bounds lists were left partially unordered, then some + interactions were never detected (my toughest yade debugging until now). + +--- + pkg/common/InsertionSortCollider.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/pkg/common/InsertionSortCollider.cpp b/pkg/common/InsertionSortCollider.cpp +index dc5d7ac..163a4f4 100644 +--- a/pkg/common/InsertionSortCollider.cpp ++++ b/pkg/common/InsertionSortCollider.cpp +@@ -410,8 +410,10 @@ Real InsertionSortCollider::cellWrapRel(const Real x, const Real x0, const Real + void InsertionSortCollider::insertionSortPeri(VecBounds& v, InteractionContainer* interactions, Scene*, bool doCollide){ + assert(periodic); + long &loIdx=v.loIdx; const long &size=v.size; +- for(long _i=0; _i<size; _i++){ +- const long i=v.norm(_i); ++ /* We have to visit each bound at least once (first condition), but this is not enough. The correct ordering in the begining of the list needs a second pass to connect begin and end consistently (the second condition). Strictly the second condition should include "+ (v.norm(j+1)==loIdx ? v.cellDim : 0)" but it is ok as is since the shift is added inside the loop. */ ++ long _i=0; ++ for(; (_i<size) || (v[v.norm(_i)].coord < v[v.norm(_i-1)].coord); _i++){ ++ const long i=v.norm(_i);//FIXME: useless, and many others can probably be removed + const long i_1=v.norm(i-1); + //switch period of (i) if the coord is below the lower edge cooridnate-wise and just above the split + if(i==loIdx && v[i].coord<0){ v[i].period-=1; v[i].coord+=v.cellDim; loIdx=v.norm(loIdx+1); } diff -Nru yade-2017.01a/debian/patches/series yade-2017.01a/debian/patches/series --- yade-2017.01a/debian/patches/series 2017-02-26 20:21:22.000000000 +0100 +++ yade-2017.01a/debian/patches/series 2017-04-14 12:42:59.000000000 +0200 @@ -1,3 +1,4 @@ 01_remove_google_analytics.patch 08_fix_gui.patch +09_fix_periodic_boundaries.patch