yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12573
[Bug 1560171] [NEW] O.save() / O.load() with clumps segfaults.
Public bug reported:
Dear all,
in my simulations I use clumps of spheres and write restart files regularly (using O.save()). When I reload these files, I get an error:
python: /home/bettinasuhr/myYade20/trunk/core/ForceContainer.hpp:106: void ForceContainer::addTorqueUnsynced(Body::id_t, const Vector3r&): Assertion `(size_t)id<size' failed.
aborted (core dumped)
I use yade-1.20.0, compiled, without modifications and Cundall-Strack contact law.
Below, a minimal working example is given, which writes some restart files. The error does not occur if spheres instead of clumps are used. The problem seems to be related to clumps.
utils.readParamsFromTable(partType='clumps')#'spheres')#
from yade.params.table import *
from yade import pack
#define material for all bodies:
id_Mat=O.materials.append(FrictMat(young=1e6,poisson=0.3,density=1000,frictionAngle=1))
#define engines:
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7,gravity=[0,0,-9.81])
]
#create a box:
O.bodies.append(geom.facetBox(center=(0.0,0.0,0.25),extents = (0.125,0.125,0.25), wallMask=31))
#add particles eiter spheres or clumps
if partType=='spheres':
sp=pack.SpherePack()
sp.makeCloud( (-0.125,-0.125,0), ( 0.125,0.125,0.5), rMean=37.6e-3/2.,rRelFuzz=0.0,num=100)
sp.toSimulation()
O.bodies.updateClumpProperties(discretization=10)# correct mass, volume, inertia!!
elif partType=='clumps':
sp=pack.SpherePack()
c1=pack.SpherePack([ ((0.,0.,0.),37.6e-3/2.), ((37.6e-3/2.,0.,0.),25e-3/2.) ])# overlap between both spheres
sp.makeClumpCloud( (-0.125,-0.125,0), ( 0.125,0.125,0.5), [c1],num=100)
sp.toSimulation()
O.bodies.updateClumpProperties(discretization=10)# correct mass, volume, inertia!!
else:
print "ERROR! choose either spheres or clumps for partType!"
O.dt=1e-6
#write some restart files
O.save('restartMinWorkEx_'+partType+'_Initial')
O.run(100000,True)
O.save('restartMinWorkEx_'+partType+str(O.iter))
O.run(300000,True)
O.save('restartMinWorkEx_'+partType+str(O.iter))
The error occurs when:
O.load(‘restartMinWorkEx_clumps100000‘)
O.run(1000, True)
Is called.
Can somebody please help me? I don’t understand what causes the error.
Before, I was using restart files in the same way and never had any of
these problems.
Thanks in advance,
Bettina
** Affects: yade
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1560171
Title:
O.save() / O.load() with clumps segfaults.
Status in Yade:
New
Bug description:
Dear all,
in my simulations I use clumps of spheres and write restart files regularly (using O.save()). When I reload these files, I get an error:
python: /home/bettinasuhr/myYade20/trunk/core/ForceContainer.hpp:106: void ForceContainer::addTorqueUnsynced(Body::id_t, const Vector3r&): Assertion `(size_t)id<size' failed.
aborted (core dumped)
I use yade-1.20.0, compiled, without modifications and Cundall-Strack contact law.
Below, a minimal working example is given, which writes some restart files. The error does not occur if spheres instead of clumps are used. The problem seems to be related to clumps.
utils.readParamsFromTable(partType='clumps')#'spheres')#
from yade.params.table import *
from yade import pack
#define material for all bodies:
id_Mat=O.materials.append(FrictMat(young=1e6,poisson=0.3,density=1000,frictionAngle=1))
#define engines:
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7,gravity=[0,0,-9.81])
]
#create a box:
O.bodies.append(geom.facetBox(center=(0.0,0.0,0.25),extents = (0.125,0.125,0.25), wallMask=31))
#add particles eiter spheres or clumps
if partType=='spheres':
sp=pack.SpherePack()
sp.makeCloud( (-0.125,-0.125,0), ( 0.125,0.125,0.5), rMean=37.6e-3/2.,rRelFuzz=0.0,num=100)
sp.toSimulation()
O.bodies.updateClumpProperties(discretization=10)# correct mass, volume, inertia!!
elif partType=='clumps':
sp=pack.SpherePack()
c1=pack.SpherePack([ ((0.,0.,0.),37.6e-3/2.), ((37.6e-3/2.,0.,0.),25e-3/2.) ])# overlap between both spheres
sp.makeClumpCloud( (-0.125,-0.125,0), ( 0.125,0.125,0.5), [c1],num=100)
sp.toSimulation()
O.bodies.updateClumpProperties(discretization=10)# correct mass, volume, inertia!!
else:
print "ERROR! choose either spheres or clumps for partType!"
O.dt=1e-6
#write some restart files
O.save('restartMinWorkEx_'+partType+'_Initial')
O.run(100000,True)
O.save('restartMinWorkEx_'+partType+str(O.iter))
O.run(300000,True)
O.save('restartMinWorkEx_'+partType+str(O.iter))
The error occurs when:
O.load(‘restartMinWorkEx_clumps100000‘)
O.run(1000, True)
Is called.
Can somebody please help me? I don’t understand what causes the error.
Before, I was using restart files in the same way and never had any of
these problems.
Thanks in advance,
Bettina
To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1560171/+subscriptions
Follow ups