yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02629
[Bug 495358] [NEW] problem importing spheres from ASCII file
Public bug reported:
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()
** Affects: yade
Importance: Undecided
Status: New
--
problem importing spheres from ASCII file
https://bugs.launchpad.net/bugs/495358
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
Status in Yet Another Dynamic Engine: New
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()
Follow ups
References