← Back to team overview

yade-dev team mailing list archive

Accessing bodies from interactions

 

Hello

Today, I found myself trying to get velocities of interacting body1 and body2(*), and I realized I couldn't make it, because the metabody is not a parameter of InteractionGeometryEngineUnit::go().

Does someone have a simple solution in mind?

Does the new class "state" affect this problem (will we pass "state" to IGUnits?)? I feel like it will, but I still need a solution without "state" because the Yade/snow code Alsidqi is working with has not been updated for a while and will not be updated anytime soon (yes, I know...).

More fundamental aspects :

I can't explain why metabody is a parameter of many functions in Yade. All engines should be able to access the simulation they belong to, since they can't belong to two simulations at the same time. So why do we pass this "ncb" all the time to, e.g., NewtonsDampedLaw::action(MetaBody * ncb)? On the other hand, why was it decided that ncb would not be passed to IGEngineUnits, but that Se3's, InteractingGeometries, and the interaction itself would be given instead? I mean,the metabody and the interaction would have been enough to access anything (Se3, IGeom., and a lot more, like the velocities I need now). Is there a benefit for parallelization for instance?

Bruno


(*) The precise reason is we want to rotate the normal based on the movement of interacting bodies, instead of just positions and rotations as in other engines. It can be done in the constitutive law to, but the it makes more sense to do that in the GeometryEngine, since the contact law is usually using the updated normal to define the rotation of the local coordinate system.




--

_______________
Chareyre Bruno
Maître de Conférences

Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




Follow ups