The Code is crashed when there are two balls with same position and radius

Bug #1759633 reported by Meng Qing Xiang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
New
Undecided
Unassigned

Bug Description

I just find that if there are two balls with the same position and radius and the program is crashed without any information.

Revision history for this message
Robert Caulk (rcaulk) wrote :

Hello,

Will you please provide a minimal working example to demonstrate this bug [1]?

Cheers,

Robert

[1]https://yade-dem.org/wiki/Howtoask

Revision history for this message
Meng Qing Xiang (642229461-k) wrote :

Hello, Sorry to reply later.
I use a simple example given by Jan.
This is OK:
O.periodic = True
O.cell.setBox(6,10,14)
b1 = sphere((0,0,0),1,color=(1,0,0))
b2 = sphere((2,4,4),1,color=(0,1,0))
b3 = sphere((4,8,8),1,color=(0,1,1))
O.bodies.append((b1,b2,b3))
O.step()
b3.state.vel = 5e-5*Vector3(-1.1,-2,-2.2)
#
from yade import qt
qt.View()
O.run()

This code is wrong:
O.periodic = True
O.cell.setBox(6,10,14)
b1 = sphere((0,0,0),1,color=(1,0,0))
b2 = sphere((2,4,4),1,color=(0,1,0))
b3 = sphere((4,8,8),1,color=(0,1,1))
b4 = sphere((4,8,8),1,color=(0,1,1))
O.bodies.append((b1,b2,b3,b4))
O.step()
b3.state.vel = 5e-5*Vector3(-1.1,-2,-2.2)
#
from yade import qt
qt.View()
O.run()

Yours,
Meng

Revision history for this message
Jérôme Duriez (jduriez) wrote :

Hi,

It's true using the "wrong code" I got an infinite (it seems) number of "ValueError: cannot convert float NaN to integer" even when running just one iteration.

Is it what you call "code is crashed" ?
If yes, could you please try to shorten your script ? (for this behavior to occur do we need 4 spheres ? everything coming after O.step() ?) See if this is periodic boundary-dependent, or more general ?

Jérôme

Revision history for this message
Janek Kozicki (cosurgi) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers