Re: [Yade-dev] : Add damping coefficient to material

2012-01-18 Thread Anton Gladky
 > Real getDampCoeff() { return material->damping; };

Can you check here a material existence?

Anton



On Thu, Jan 19, 2012 at 8:14 AM, Klaus Thoeni  wrote:
> Hi guys,
>
> can anyone help me on this?
>
> Klaus
>
> On Thu, 12 Jan 2012 06:03:16 PM Klaus Thoeni wrote:
>> Hi guys,
>>
>> as discussed with Bruno in Barcelona I need different non-viscous damping
>> coefficients for different materials. I introduced this capability by
>> adding a variable damping to the base class material which is initialised
>> with NaN. The body class has a function getDampCoeff() and in
>> NewtonIntegrator I use this function in order to change the damping
>> coefficients. When running some examples it seems that everything works
>> fine. However, I just run 'yade --test' and it gives me a seg fault:
>>
>> testVelocity (yade.TestSimpleClump)
>> Clump: velocities of member assigned by NewtonIntegrator ... Segmentation
>> fault
>>
>> I think I now where the problem is. In NewtonIntegrator I call something
>> like:
>>
>> if(!isnan(b->getDampCoeff())) dampcoeff=b->getDampCoeff();
>>
>> where getDampCoeff() is defined in body.hpp as:
>>
>> Real getDampCoeff() { return material->damping; };
>>
>> I think the test doesn't have a material and therefore I get the seg fault.
>> Right? How can we fix this so that I can commit the code?
>>
>> Klaus
>
> ___
> 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

___
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


Re: [Yade-dev] : Add damping coefficient to material

2012-01-18 Thread Klaus Thoeni
Hi guys,

can anyone help me on this?

Klaus

On Thu, 12 Jan 2012 06:03:16 PM Klaus Thoeni wrote:
> Hi guys,
> 
> as discussed with Bruno in Barcelona I need different non-viscous damping
> coefficients for different materials. I introduced this capability by
> adding a variable damping to the base class material which is initialised
> with NaN. The body class has a function getDampCoeff() and in
> NewtonIntegrator I use this function in order to change the damping
> coefficients. When running some examples it seems that everything works
> fine. However, I just run 'yade --test' and it gives me a seg fault:
> 
> testVelocity (yade.TestSimpleClump)
> Clump: velocities of member assigned by NewtonIntegrator ... Segmentation
> fault
> 
> I think I now where the problem is. In NewtonIntegrator I call something
> like:
> 
> if(!isnan(b->getDampCoeff())) dampcoeff=b->getDampCoeff();
> 
> where getDampCoeff() is defined in body.hpp as:
> 
> Real getDampCoeff() { return material->damping; };
> 
> I think the test doesn't have a material and therefore I get the seg fault.
> Right? How can we fix this so that I can commit the code?
> 
> Klaus

___
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


Re: [Yade-dev] : Avoid new contact detection between group of particle

2012-01-18 Thread Klaus Thoeni
Just tried it out and you are both right. There is almost no speedup.

Thanks,
Klaus

On Tue, 17 Jan 2012 05:55:43 PM Anton Gladky wrote:
> I think, Bruno is right.
> There will unlikely be a speedup. But you can try anyway.
> 
> Anton
> 
> On Tue, Jan 17, 2012 at 7:23 AM, Klaus Thoeni  
wrote:
> > Hi Bruno,
> > 
> > On Mon, 16 Jan 2012 11:20:57 PM Bruno Chareyre wrote:
> >> >> It would work but it would be ugly to include WireMat.hpp in the
> >> >> collider's code.
> >> > 
> >> > I agree but I would need a quick solution.
> >> 
> >> The the sort of quick solution that you will never commit? Then try it.
> >> My bet is that, unfortunately, it will not give a very big speedup.
> >> The big task of the collider is to sort bounds, and it has to be done
> >> for all your elements anyway, since they can interact with other bodies.
> > 
> > Quick and dirty ;-) But I prefer you solution anyway.
> > 
> >> >> I'm thinking we could have a global "selfInteractionMask", so that if
> >> >> mask1==mask2 && !(mask1 & selfInteractionMask), we skip.
> >> > 
> >> > Please, can you give some more details? And how and where would this
> >> > "selfInteractionMask" be implemented?
> >> 
> >> Collider.cpp:13, this is where masks are compared in bool maycollide().
> >> You could test bodies masks with a self-interaction mask there, the new
> >> mask could be a member of the collider.
> >> Maybe try the first method before deciding if it's worth the additional
> >> test.
> > 
> > I will try to implement it in the next couple of days. So you think there
> > will be no speed-up? Any other suggestion how I can get some speed-up?
> > 
> > Thanks
> > 
> > 
> > ___
> > 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
> 
> ___
> 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

___
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


[Yade-dev] : yade.qt doc

2012-01-18 Thread Klaus Thoeni
Hi guys,

there is something wrong with the docmuentation of module yade.qt. Nothing is 
shown on the doc site:

https://yade-dem.org/doc/yade.qt.html

and it's not listed in the index:

https://yade-dem.org/doc/py-modindex.html

Have a look.

Klaus

___
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