← Back to team overview

yade-users team mailing list archive

Re: [Question #661471]: Find particle id given its position

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
> when you say rewrite the code in C++, how would this work?

- write your function in both c++ and python (have a look how, e.g., utils.sumForces is implemented [1,2,3])
- you have to (re)compile yade from source [4]
- then you can call your faster c++ function from python

Jan

[1] https://github.com/yade/trunk/blob/master/py/_utils.hpp#L55
[2] https://github.com/yade/trunk/blob/master/py/_utils.cpp#L160
[3] https://github.com/yade/trunk/blob/master/py/_utils.cpp#L476
[4] https://yade-dem.org/doc/installation.html#source-code

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.