yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #16886
[Question #665341]: iterations in c++
New question #665341 on Yade:
https://answers.launchpad.net/yade/+question/665341
Good evening.
This question might be a bit naive.
I have the following python function.
def checkAndDelete(boundaries):
for b in O.bodies:
if isinstance(b.shape,Sphere):
x,y,z = b.state.pos
if (x<boundaries[0] or x>boundaries[1] or y<boundaries[2] or y>boundaries[3] or z<boundaries[4] or z>boundaries[5]): # modify this condition to your needs
loc2glob.remove(b.id)
O.bodies.erase(b.id)
And many similar to this were i iterate through the body container and do something to it.
My question is. Since those bodies are huge it has been suggested that i write those functions in c++. I know how to write functions in c++to import in python.
I am not really sure however how to define a body in c++.
Any help is really appreciated
Thanks
--
You received this question notification because your team yade-users is
an answer contact for Yade.