Re: [Yade-dev] bool MatchMaker

2013-09-05 Thread Bruno Chareyre
> Hi Bruno > > I think in terms of performance it might be better to keep MatchMaker in IP2 > rather to add some in the Law functor. Further I think maybe we could get rid > of includeMoment=True/False in the Law functor. > > My suggestion is MatchMaker for eta, krot and ktwist. This makes a

Re: [Yade-dev] bool MatchMaker

2013-09-03 Thread Klaus Thoeni
Hi Bruno I think in terms of performance it might be better to keep MatchMaker in IP2 rather to add some in the Law functor. Further I think maybe we could get rid of includeMoment=True/False in the Law functor. My suggestion is MatchMaker for eta, krot and ktwist. This makes as well more sens

Re: [Yade-dev] bool MatchMaker

2013-08-28 Thread Eulitz, Alexander
@lists.launchpad.net Betreff: Re: [Yade-dev] bool MatchMaker > > Another option is to make MatchMakers for krot and ktwist and set > > them to 0 so the moment will be 0. It might be an easier solution > > but not the most efficient. > The best thing I can imagine is to add a Matc

Re: [Yade-dev] bool MatchMaker

2013-08-28 Thread Bruno Chareyre
> BTW, don't you think it would make sense to make MatchMakers for most of the > parameters in the IP2 functors? It would give more flexibility when working > with different materials. It would surely make sense. It has not done because it is tedious work to put them everywhere. So, they have b

Re: [Yade-dev] bool MatchMaker

2013-08-28 Thread Klaus Thoeni
> > Another option is to make MatchMakers for krot and ktwist and set them to > > 0 so the moment will be 0. It might be an easier solution but not the > > most efficient. > The best thing I can imagine is to add a MatchMaker that would not > replace includeMoment, let's call it momentMatch here. >

Re: [Yade-dev] bool MatchMaker

2013-08-28 Thread Bruno Chareyre
> Well, ((*includeMoment)(mat1->id,mat2->id) != 0) should work as well for the > case if includeMoment is none No, I guess it will crash (dereferencing null pointer). This would be ok: if (includeMoment && (*includeMoment)(mat1->id,mat2->id) != 0)) > which corresponds to the default (false)

Re: [Yade-dev] bool MatchMaker

2013-08-28 Thread Klaus Thoeni
> > I completely forgot about it but changing this should not be a problem. > > The > > definition just needs to be changed to: > > (shared_ptr,includeMoment,,,"bool to consider rolling > > resistance") > Yes. > > > I could use 0 and 1 instead of False and True in the python script: > > includeMom

Re: [Yade-dev] bool MatchMaker

2013-08-28 Thread Bruno Chareyre
> > I completely forgot about it but changing this should not be a problem. The > definition just needs to be changed to: > (shared_ptr,includeMoment,,,"bool to consider rolling resistance") Yes. > > I could use 0 and 1 instead of False and True in the python script: > includeMoment=MatchMaker(m

Re: [Yade-dev] bool MatchMaker

2013-08-28 Thread Klaus Thoeni
Hi Bruno On Wednesday 28 August 2013 12:07:40 Bruno Chareyre wrote: > Hi Klaus, > There are other problems in this line. > * The parameter itself has to be declared as a matchMaker. For instance > Ip2_FrictMat_FrictMat_MindlinPhys::en is a MatchMaker (or None, then > default code is used). include

Re: [Yade-dev] bool MatchMaker

2013-08-28 Thread Bruno Chareyre
Hi Klaus, There are other problems in this line. * The parameter itself has to be declared as a matchMaker. For instance Ip2_FrictMat_FrictMat_MindlinPhys::en is a MatchMaker (or None, then default code is used). includeMoment is not a MatchMaker, so it will not work. * The code itself has to use

[Yade-dev] bool MatchMaker

2013-08-27 Thread Klaus Thoeni
Hi guys it seems that MatchMakers are working with Real only. I tried something like this: O.engines=[ ... [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=MatchMaker(matches=((mat1,mat1,True), (mat1,mat2,False] ... ] which gives the following error: TypeError: No registered converter was ab