← Back to team overview

yade-users team mailing list archive

Re: simulation main loop

 


Bruno Chareyre a écrit :
>> My question: is there a way, with the current code, to avoid that?
>> For instance am I allowed to create an engine doing a loop over all the 
>> bodies and calling inside the loop, for each body, the engines 
>> MagnetEngine and GravityEngine.
>>
>>   
> What you suggest would work (some would call it a "hack" though...), 
> except that you need at least two engines : one for loops on bodies and 
> one for loops on interactions.
> Not sure how much time it would save, I'm really wondering too.

In fact, I think about that because it is what is done in SDEC. For the
bodies you need at least two engines: one to apply perturbations in
forces (called before the application of the Newton's law) another one
to apply perturbations in positions (called after the leap frog 
integration).
If you want to apply perturbation in body velocities you also need an 
engine called between the two steps of the leap frog integration.

I didn't think about interaction so far.

But maybe a loop over 10,000 bodies is very fast and it would be 
useless. I remember, we spoke about that with Janek in the first time of 
Yade and he was not very worried by this multiplication of loop.

Please, do not think that I am saying that it's bad, and that you have 
to change something. It is just to be sure to really understand how Yade 
works and what I can do with ;-)

   Luc


> 
> Bruno
> 
> 
> 
> 
>> Thanks for your answers,
>>
>>    Luc
>>
>>
>>   
> 
> 

-- 
Luc Sibille, Université de Nantes - Laboratoire GeM, maître de conférence

Adresse/address:
IUT de Saint Nazaire - Département de Génie-Civil
58, rue Michel-Ange - BP 420
44606 Saint-Nazaire Cedex   France

Tel: +33 2 40 17 81 78     Fax: +33 2 40 17 81 60

_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users



References