Clump size limited to 256 bodies.

Bug #1273172 reported by Kneib François
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Low
Christian Jakob

Bug Description

Hi,

I noticed that there is a limited number of bodies you can add to clump::members : 256. Whatever method you use, if you put 257 members into a clump, the c++ map "members" will have the right number of keys (257), but all corresponding values of Se3r will be set to "nan". If you create a clump of 256 bodies, it will be ok first, but if you add one more body all clump members will be corrupted (see the script attached).

I think the problem doesn't come from the "map" type of C++ or the "dict" type of python, because they always have the right size, even if the clump size exceeds 256. It looks like a variable doesn't have sufficient memory allocated and I really wonder where ...

Does someone have an idea ?

Thanks

Tags: clump size
Revision history for this message
Kneib François (francois-kneib) wrote :
Revision history for this message
Kneib François (francois-kneib) wrote :

I would like to add one more precision :
Into the script I have sent, all spheres are aligned and if I put more than 256 spheres into the clump it will not work (with NaN). But if you replace (l. 37)

utils.sphere((i,0,0),0.5

by :

utils.sphere((i,rand(),rand()),0.5

then you have one chance out of two not to get the bug.

And if you put seed(x) somewhere at the top of the script (replacing x by whatever int you want), then it will always bugs, or always works depending on the int you choose.

Revision history for this message
Kneib François (francois-kneib) wrote :

I noticed that it seems to happen only when the spheres are geometrically tangent or nearly tangent (you can try this by modifying the radius into the script).
I looked at the code and the problem seems to come from the "updateProperties()" method, it seems that "state->ori" is NaN. It comes from the inertia tensor eigen vectors, if some values are NaN (see the comment line 205 : "has NaNs for identity matrix??").
As this is a *very* special case, I change the bug importance.

Changed in yade:
importance: High → Low
Changed in yade:
assignee: nobody → Christian Jakob (jakob-ifgt)
Revision history for this message
Christian Jakob (jakob-ifgt) wrote :
Changed in yade:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.