← Back to team overview

yade-users team mailing list archive

Re: simulation main loop

 

>> 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.
>   
You would need more, since typical scenario mixes loops over bodies and
interactions like this:

(0. reset physical actions, increate time by dt etc.)
1. loop over bodies: create bounding boxes, collide them, create contacts.
2. loop over contacts: create interactionGeometry and interactionPhysics
for them; use some material law to deduce forces on bodies in interaction.
3. loop over bodies: to apply other forces (gravity etc), get
accelerations, integrate and displace.

The module spherical-dem-simulator (which I never used): non-modular
spherical DEM that could be benchmarked against the same scenario with
regular engine-based architecture. Since Bruno said we are like 30%
behind PFC for dem (which I would think is monolithic), I would be
inclined to attribute those 30% to modularity.

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



Follow ups

References