← Back to team overview

yade-dev team mailing list archive

Re: Fwd: [Yade-users] Critical bugfix for periodic boundaries (part 2)

 

Hello,

Thank you for detailed reply. Indeed, I understand the periodic annulus does not need to be zero-based in principle. I'll consider removing the clamping (after triple-checking that it is effectively harmless... it was hard enough to spot the bug previously).

On 06/01/2017 05:30 PM, Václav Šmilauer wrote:

In doubt, I inserted a (cheap) additional loop to clamp the bounds [2]. With this loop all bounds are in [0,size] after the sort. Not sure it is needed though.

This is unrelated to loIdx. Speaking of https://github.com/yade/trunk/commit/9ea3fa9aa63070a3af1dad067204f6eba0b0990a I am just looking at that and do not understand much. v[i].coord is assigned in https://github.com/yade/trunk/blob/master/pkg/common/InsertionSortCollider.cpp#L296 , the coordinate pre-processed by cellWrap, so it will be always within 0..cellSize as far as I see - for the collider.
Some v[i].coord were really outside 0..cellSize previously, as I found empiricaly. This is because cellWrap is only if "doInitSort", else there are only unit jumps from one period to another as it results from the sort operation (and because of sorting failures they were left unbounded). It could be that due to the other changes it does not happen any longer.

I am not able to test this one, sorry :)

No surprise...

Bruno




References