My next questions (result of not knowing the code well enough): - is asssert necessary in [1]? - why is IPhysDispatcher defined as autosymmetric (default template argument) [3]?
[1] http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/pkg/common/InteractionLoop.cpp#L116 [3] http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/pkg/common/Dispatching.hpp#L113 ** Description changed: - When you use two different shapes and two different materials, it might - happen that IntreactionLoop ends with error [1]. It is because the - interaction might be swapped in IGeom stage (ok) and in IPhys stage (see + When you use two different materials, it might happen that + IntreactionLoop ends with error [1]. It is because of IPhys stage (see also the comment in [1], but in reality Ip2 can by non-symmetric). Possible solutions: - 1) define both Ip2_Mat1_Mat2 and Ip2_Mat2_Mat1 - 2) replace assert [1] (something like if (swap) { I->functorCase.phys=physDispatcher->getFunctor2D(b2->material,b1->material,swap); swap=false }) + 1) define both Ip2_Mat1_Mat2 and Ip2_Mat2_Mat1 (according to [2] maybe does not work..) + 2) replace assert [1] (something like if (swap) { I->functorCase.phys=physDispatcher->getFunctor2D(b2->material,b1->material,swap); swap=false }). Is the assert necessary at all? 3) make option 1) somehow automatic (using some macro?) Pros and cons: 1) would mess the source code and documentation a bit, but otherwise I think it is ok 2) would it have some side effects? Is it ok for Law2 stage? etc etc? 3) maybe the best option if the solution is reasonable cheers Jan [1] http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/pkg/common/InteractionLoop.cpp#L116 [2] https://answers.launchpad.net/yade/+question/269315 -- You received this bug notification because you are a member of Yade developers, which is subscribed to Yade. https://bugs.launchpad.net/bugs/1475844 Title: Swap problem in InteractionLoop Status in Yade: New Bug description: When you use two different materials, it might happen that IntreactionLoop ends with error [1]. It is because of IPhys stage (see also the comment in [1], but in reality Ip2 can by non-symmetric). Possible solutions: 1) define both Ip2_Mat1_Mat2 and Ip2_Mat2_Mat1 (according to [2] maybe does not work..) 2) replace assert [1] (something like if (swap) { I->functorCase.phys=physDispatcher->getFunctor2D(b2->material,b1->material,swap); swap=false }). Is the assert necessary at all? 3) make option 1) somehow automatic (using some macro?) Pros and cons: 1) would mess the source code and documentation a bit, but otherwise I think it is ok 2) would it have some side effects? Is it ok for Law2 stage? etc etc? 3) maybe the best option if the solution is reasonable cheers Jan [1] http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/pkg/common/InteractionLoop.cpp#L116 [2] https://answers.launchpad.net/yade/+question/269315 To manage notifications about this bug go to: https://bugs.launchpad.net/yade/+bug/1475844/+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