yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02450
Re: Help with changes
> In two separate files, I see something like
> (Body::byId(id1,ncb)->physicalParameters.get())->se3.position;
> And I see Dem3DofGeom->se31.position , which is different.
First is position of the body, the second one is stored inside the
interaction (copied at every step from the body) (for reasons of memory
locality).
> In python it looks like O.bodies.phys['se3'] which is more similar to
> the 1st one. In addition to these function, I guess the names for the
> classes have changed too.
>
> Q1. What are the new C++ and python codes to track geometrical and
> physical parameters?
Body::state, class is State in c++.
In python, there are shortcuts. O.bodies[id].state.pos (which is really
the same as O.bodies[i].state['pos'], but faster). Keep bugging me, I
will document those. For now, you can have a look at documentation of
yade.wrapper module, which exposes Body and State classes:
http://beta.arcig.cz/~eudoxos/yade/epydoc/
http://beta.arcig.cz/~eudoxos/yade/epydoc/toc-yade.wrapper-module.html
http://beta.arcig.cz/~eudoxos/yade/epydoc/yade.wrapper.Body-class.html
http://beta.arcig.cz/~eudoxos/yade/epydoc/yade.wrapper.State-class.html
> Q2. Do I have to go through BodyContainer to get the id, to assess
> the parameters?
Generally, no. Functors should get all they should need via arguments.
Cheers, v.
Follow ups
References