moved from https://bugs.launchpad.net/yade/+bug/1099812 to https://gitlab.com/yade-dev/trunk/issues/16
-- You received this bug notification because you are a member of Yade developers, which is subscribed to Yade. https://bugs.launchpad.net/bugs/1099812 Title: functions/attributes not reflecting the changes in interaction storage Status in Yade: New Bug description: As pointed out by Jan here (#3): https://answers.launchpad.net/yade/+question/212834, the function returning the interactions for a given body Id is iterating on all the interaction container, while we have now access of interactions per- body after Anton's changes. Then the code below is suboptimal (Body.cpp): // return list of interactions of this particle python::list Body::py_intrs(){ Scene* scene=Omega::instance().getScene().get(); // potentially unsafe with multiple simulations python::list ret; FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){ if(!I->isReal()) continue; if(I->getId1()==id || I->getId2()==id) ret.append(I); } return ret; } There is also a body attribute that could be updated (or the documentation, at least is outdated): ((MapId2IntrT,intrs,,Attr::hidden,"Map from otherId to Interaction with otherId, managed by InteractionContainer. NOTE: (currently) does not contain all interactions with this body (only those where otherId>id), since performance issues with such data duplication have not yet been investigated.")) Possibly many other places would benefit from a new eye now that each body stores interactions. To manage notifications about this bug go to: https://bugs.launchpad.net/yade/+bug/1099812/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp