← Back to team overview

yade-users team mailing list archive

Re: [Question #153589]: Adding an IGeomFunctor subclass

 

Question #153589 on Yade changed:
https://answers.launchpad.net/yade/+question/153589

    Status: Open => Answered

Chareyre proposed the following answer:
The relevant thread is the one doing the simulation loop (thread 2 in
your case - read from bottom to top):


#7  0x00007f2137c6a941 in *__GI___assert_fail (assertion=0x7f2123fdaef4 "px != 0", file=<value optimized out>, line=418, function=0x7f2123fdbde0 "T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T = CylScGeom]") at assert.c:81
#8  0x00007f2123e3859d in boost::shared_ptr<CylScGeom>::operator-> (this=0x7f2100ddd4e0) at /usr/include/boost/smart_ptr/shared_ptr.hpp:418
#9  0x00007f2123dba59d in Ig2_Sphere_ChainedCylinder_CylScGeom::go (this=0x3632950, cm1=..., cm2=..., state1=..., state2=..., shift2=..., force=@0x7f2100ddd8ab, c=...) at pkg/common/Cylinder.cpp:83
#10 0x00007f2123dbbbd1 in Ig2_Sphere_ChainedCylinder_ScGeom6D::go (this=0x3632950, cm1=..., cm2=..., state1=..., state2=..., shift2=..., force=@0x7f2100ddd8ab, c=...) at pkg/common/Cylinder.cpp:187


It seems you use a null pointer at line 83 (since it's a modified
version of the file, I can't check which line exactly).

Regarding the rotation, if you don't want it computed, it's enough to
turn "updateRotation" false in Ig2_Sphere_ChainedCylinder_ScGeom6D.

I realize another problem now: if you want 6D interaction between
spheres and cylinders, you need to generate a 6D version of CylScGeom,
not ScGeom.
There is maybe a conversion problem somewhere due to that, and leading
to the crash.
Basically, you need something very similar to
Ig2_Sphere_ChainedCylinder_CylScGeom::go, but generating a CylScGeom6D
instead of a CylScGeom; with CylScGeom6D inheriting from ScGeom6D.

I hope it helps.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.