← Back to team overview

yade-mpi team mailing list archive

Fwd: about insertAtId function.


Hi Deepak, thanks for spotting problem. I have no answer right now but I'm
forwarding to yade-mpi for future reference since it is becoming a
collaborative effort.

---------- Forwarded message ---------
From: Deepak Kunhappan <deepak.kunhappan@xxxxxxxxxxxxxxx>
Date: Thu, 13 Dec 2018 at 18:50
Subject: about insertAtId function.
To: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxxxxxx>


I  noticed something about the insertAtId function  (BodyContainer.cpp,
line: 30), inserting a new body at an erased location does not seem to
work, although the function returns the ID, the interactions and the state
of the body is not updated, and querying this body in the O.bodies list
returns None.

This is what I had tried :

b = sphere([0,0,0], 0.05)

b1, b2 = sphere([0,0,0], 0.05), sphere([0.25,0,0], 0.05)

O.bodies.append(b1); O.bodies.append(b2)


O.bodies.insertAtId(b,1) -->  returs '1'

and then :

O.bodies[1].state.pos --> returns "'NoneType' object has no attribute

Do I have to call a function to set the body state and other things after

this line to be added in yadeWrapper.cpp :

&pyBodyContainer::insertAtId,(py::arg("insertatid")),"Insert a body at the
id, (no body should exist in this id)")

thanks and regards,

On 12/12/18 10:27 PM, Bruno Chareyre wrote:

Arbitrary sized vectors are the problem i think.

Le mer. 12 déc. 2018 15:22, Deepak Kunhappan <
deepak.kunhappan@xxxxxxxxxxxxxxx> a écrit :

> I forgot to tell:
> Qt crashes (segmentation fault) when I try to display the bounds in the
> controller (from a saved simulation, with the present verison of
> Subdomain.hpp).
> On 12/12/18 2:54 PM, Bruno Chareyre wrote:
> I think it will crash Qt interface (if I remember correctly) so it needs
> another way. There are many options.