problem importing spheres from ASCII file

Bug #495358 reported by Luc Scholtès
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Undecided
Unassigned

Bug Description

ubuntu karmic
yade version 1886

I get this error message when I try to import spheres from an ascci file,:

TypeError: No registered converter was able to produce a C++ rvalue of type boost::shared_ptr<Body> from this Python object of type int

and the simulation does not run, even if I can view the assembly when I ask for a new 3D view.

here is my script, and attached the ascii file

###############################################################################################

O=Omega()

from yade import pack,utils,ymport

facetMat=O.materials.append(GranularMat(young=2e7,frictionAngle=30,poisson=0.2,density=3000))
Ground=O.bodies.append(utils.facetBox((0,0,-0.5),(10,10,-0.5),wallMask=16,color=(0,0,1),wire=False,material=facetMat))

sphereMat=O.materials.append(GranularMat(young=2e7,frictionAngle=30,poisson=0.2,density=3000))

O.bodies.append(ymport.ascii('testImport.spheres',material=sphereMat))

############################

O.initializers=[BoundDispatcher([InteractingSphere2AABB(),InteractingFacet2AABB(),MetaInteractingGeometry2AABB()])]

O.engines=[

 BexResetter(),
 #BoundDispatcher([InteractingSphere2AABB(),InteractingFacet2AABB(),MetaInteractingGeometry2AABB()]),
 BoundDispatcher([InteractingSphere2AABB(),InteractingFacet2AABB()]),
 InsertionSortCollider(),

 ################### Law2_Dem3Dof_Elastic_Elastic -> OK
 #InteractionGeometryDispatcher([Ig2_Sphere_Sphere_Dem3DofGeom(),ef2_Facet_Sphere_Dem3DofGeom()]),
 #InteractionPhysicsDispatcher([SimpleElasticRelationships()]),
 #LawDispatcher([Law2_Dem3Dof_Elastic_Elastic()]),
 ## Rk: can be written as
 #InteractionDispatchers([ef2_Sphere_Sphere_Dem3DofGeom(),ef2_Facet_Sphere_Dem3DofGeom()],[SimpleElasticRelationships()],[Law2_Dem3Dof_Elastic_Elastic()],),

 #################### CundallStrack Law -> OK
 InteractionGeometryDispatcher([Ig2_Sphere_Sphere_Dem3DofGeom(),ef2_Facet_Sphere_Dem3DofGeom()]),
 InteractionPhysicsDispatcher([Ip2_BMP_BMP_CSPhys()]),
 LawDispatcher([Law2_Dem3Dof_CSPhys_CundallStrack()]),

 #################### ViscoelasticPM -> ERROR "terminate called without an active exception / terminate called recursively"
 #InteractionGeometryDispatcher([Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()]),
 #InteractionPhysicsDispatcher([Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys()]),
 #LawDispatcher([Law2_Spheres_Viscoelastic_SimpleViscoelastic()]),

 ################### ConcretePM -> ERROR "terminate called without an active exception"
 #InteractionGeometryDispatcher([Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()]),
 #InteractionPhysicsDispatcher([Ip2_CpmMat_CpmMat_CpmPhys()]),
 #LawDispatcher([Law2_Dem3DofGeom_CpmPhys_Cpm()]),

 ################### RockPM -> ERROR "segmentation fault"
 #InteractionGeometryDispatcher([Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()]),
 #InteractionPhysicsDispatcher([Ip2_RpmMat_RpmMat_RpmPhys()]),
 #LawDispatcher([Law2_Dem3DofGeom_RockPMPhys_Rpm()]),

 GravityEngine(gravity=[0,0,-9.81]),

 #RotationEngine(rotateAroundZero=True,zeroPoint=(0,0,0),rotationAxis=(0,0,1),angularVelocity=-1,subscribedBodies=Ground),
 #TranslationEngine(translationAxis=[1,0,0],velocity=20,subscribedBodies=Ground),

 NewtonIntegrator(damping=0.10)

]

############################

O.dt=0.3*utils.PWaveTimeStep()
print 'Timestep',O.dt

O.save('/home/sch50p/Desktop/YADE/bin/test.xml');

from yade import qt
v=qt.Controller()
v=qt.View()

O.run(1000); O.wait()

Related branches

Revision history for this message
Luc Scholtès (luc) wrote :
Revision history for this message
Anton Gladky (gladky-anton) wrote :

r1887 fixes this bug

Changed in yade:
status: New → Confirmed
Revision history for this message
Václav Šmilauer (eudoxos) wrote :

r1888

Changed in yade:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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